wit-bindgen
wit-bindgen copied to clipboard
wasmtime: Allow Import of External Definitions
Unless I'm missing something, it currently does not seem possible for one wit_bindgen_wasmtime::export/import!() macro to use definitions produced by another export!/import! macro.
My use case is allowing crates to use core definitions provided by another crate.
It could look something like:
outer.wit:
use {...} from core
...
wit_bindgen_rust::import!({
paths: ["outer.wit"],
external: [ "core" ],
});
This would prevent all the core definintions from core.wit to be generated, but instead expect a core Rust module to be in scope.