Hi, passing a directory path to the generate! macro of the guest-rust crate seems to not generate a export macro for the world, rendering the re-implemented use keyword unusable.
is this intentional? and if so how do I export the world?
https://github.com/bytecodealliance/wit-bindgen/blob/main/crates/wit-bindgen-demo/src/lib.rs#L9
the current version expects the wit file to be in ./wits/{name}.wit and you specify the name without an ending
Yes, but if the wits directory contains a deps
directory it does generate however without the export_${world} macro.
And if there were multiple files (using with pkg) no export_${world} macro is generated
Consider this test
https://github.com/bytecodealliance/wasm-tools/tree/main/crates/wit-parser/tests/ui/multi-file
For the deps-directory, this wit-parser test highlights it as well
https://github.com/bytecodealliance/wasm-tools/tree/main/crates/wit-parser/tests/ui/foreign-deps
Last updated: Nov 22 2024 at 17:03 UTC