WebAssembly / WebAssembly/component-model
Explicit field offsets in records?
Nobody has claimed this yet.
- Dominant language
- WebAssembly
- Stars
- 1.4k
- Forks
- 130
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 15
Description
In some situations, we might want to describe record types from existing binary formats or low-level software layers that already have fixed layouts that cannot be changed. Sometimes such records have alignment or unused space between fields. A natural way to express this is to have (byte) offsets on fields, rather than relying on a particular packing behavior.
For example, I've found this particular useful for describing file formats and kernel interfaces in a related project.
Is this something that could be added to the WIT record definition, e.g. as an optional field offset?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the WIT record definition and the fixed-layout binary format and kernel interface use cases described in the issue. Determine the scope and semantics of optional field offsets, with the WIT specification updated only after the design is agreed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- wasm
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100