Hi, this error comes when trying to use the export! macro with or without "with_types_in self".
error[E0433]: failed to resolve: could not find `__export_world_example_cabi` in the crate root
--> component/src/bindings.rs:90:35
|
90 | ...o_types_root)*:: __export_world_example_cabi!($ty with_types_in
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ could not find `__export_world_example_cabi` in the crate root
|
::: component/src/lib.rs:14:1
|
14 | bindings::export!(Compoenent with_types_in self);
| ------------------------------------------------ in this macro invocation
|
Without the macro the build throws :
error: failed to decode world from module
Caused by:
0: module was not valid
1: module does not export required function `register`
where register
is an exported function in the .wit file
I think you'll need to change with_types_in self
to with_types_in bindings
because that's the root of the generated bindings
Thank you. I just generated a simple component and saw it there
Bozhidar Manev has marked this topic as resolved.
Last updated: Nov 22 2024 at 17:03 UTC