pchickey opened Issue #1920:
Feature
The
wasmtime-wigglecrate assumes the user has provided a path to the same witx file as thewigglegenerator used. If the witx documents used are different, it will probably mean that the generated code will fail to type-check. This mismatch will probably be puzzling to the user and tricky track down.Determine some way to check equivalence of the wasmtime-wiggle's witx document and the target witx document at proc macro time. This may or may not be possible.
Benefit
Better assurance of correctness, and it will be more comprehensible when something goes wrong.
Implementation
My first thought was that the wasmtime-wiggle macro should emit a
#[test]that checks the equivalence between the two witx documents (available via thewiggle_metadatafeature) at runtime. However, this approach won't work if the code the macro emits fails to type-check.I'm not sure how to actually do this.
Alternatives
Last updated: Dec 13 2025 at 21:03 UTC