Skip to content

feat: custom annotation syntax support (Wasm 3.0) #312

@guybedford

Description

@guybedford

Wasm 3.0 standardises custom annotation syntax for the text format, allowing arbitrary annotations to be placed in WAT source. These are analogous to custom sections in the binary format.

walrus currently skips the annotations proposal spec tests entirely:

// crates/tests/tests/spec-tests.rs
Some("annotations") => return Ok(()),

Since walrus operates on the binary format, the binary impact is minimal — annotations in the text format round-trip through custom sections, which walrus already preserves. The work here is:

  • Confirm walrus correctly round-trips modules that contain annotation-derived custom sections
  • Investigate whether wasmparser surfaces any annotation-specific binary constructs that walrus needs to handle
  • Re-enable the annotations proposal spec tests once confirmed passing

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions