hi, following https://github.com/bytecodealliance/wasm-tools/tree/main/crates/wasm-compose/example#building-the-components I get the following error:
error[E0433]: failed to resolve: use of undeclared crate or module `bindings`
--> src/lib.rs:1:5
|
1 | use bindings::exports::example::service::handler::{Error, Handler, Request, Response};
| ^^^^^^^^ use of undeclared crate or module `bindings`
error[E0433]: failed to resolve: use of undeclared crate or module `bindings`
--> src/lib.rs:31:1
|
31 | bindings::export!(Component);
| ^^^^^^^^ use of undeclared crate or module `bindings`
For more information about this error, try `rustc --explain E0433`.
error: could not compile `svc` (lib) due to 2 previous errors
this is what I did:
rustup target add wasm32-wasi
git clone https://github.com/bytecodealliance/wasm-tools.git
cd wasm-tools
cargo install --path .
cd wasm-tools/crates/wasm-compose/
# https://github.com/bytecodealliance/wasm-tools/tree/main/crates/wasm-compose/example#building-the-components
cd service
cargo component build --release
am I missing a step?
Unfortunately the example is out of date.
I'll push up a fix in a little bit
I put up https://github.com/bytecodealliance/wasm-tools/pull/1154 to get the example working again.
Mariano Guerra has marked this topic as resolved.
Last updated: Dec 23 2024 at 13:07 UTC