alec-deason opened issue #8477:
#8441 recently added support for additional_derives in
wasmtime::component::bindgen
but the new version appears not to apply the derives to all types. In particular it seems to miss variants which are only used as fields in records, as in this definition:package test:bindgen-test; interface types { variant inner-variant { a, b, c } record outer-record{ inner: inner-variant } } world bindgen-test { use types.{outer-record}; export test-failure: func() -> outer-record; }
In my testing the derives will be applied to OuterRecord but not to InnerVariant.
Attached is a complete test case which fails to compile.
bindgen_case.tgz
fibonacci1729 commented on issue #8477:
@alec-deason Sorry about that! I added the fix in #8482.
alexcrichton closed issue #8477:
#8441 recently added support for additional_derives in
wasmtime::component::bindgen
but the new version appears not to apply the derives to all types. In particular it seems to miss variants which are only used as fields in records, as in this definition:package test:bindgen-test; interface types { variant inner-variant { a, b, c } record outer-record{ inner: inner-variant } } world bindgen-test { use types.{outer-record}; export test-failure: func() -> outer-record; }
In my testing the derives will be applied to OuterRecord but not to InnerVariant.
Attached is a complete test case which fails to compile.
bindgen_case.tgz
Last updated: Dec 23 2024 at 13:07 UTC