Skip to content

Add wit-bindgen fixtures for remaining type families #10

@avrabe

Description

@avrabe

Context

Issue #1 introduced wit-bindgen composed-runner components as test cases. We now have 4 fixtures passing with full runtime verification (numbers, strings, lists, records).

Remaining type families

The wit-bindgen test suite covers additional type families that would exercise more adapter code paths:

  • variantsvariant, enum, option<T>, result<T, E>
  • flags — bitflags types
  • resources — handle types (may require resource table support)
  • nested records — deeply nested record types with inner pointers
  • multi-return — functions returning multiple values

How to generate

From the wit-bindgen source tree:

wit-bindgen test --languages rust --artifacts artifacts \
  --rust-wit-bindgen-path crates/guest-rust/ tests/runtime

Fixtures end up in artifacts/<name>/composed-runner.rs-test.rs.wasm.

Test structure

Follow the existing pattern in meld-core/tests/wit_bindgen_runtime.rs:

  1. Fusion as CoreModule — validate with wasmparser
  2. Fusion as Component — validate
  3. Runtime execution — fuse, load in wasmtime with WASI, call run()

ref #1

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