bytecodealliance / wasm-tools

CLI and Rust libraries for low-level manipulation of WebAssembly modules
Apache License 2.0
1.34k stars 244 forks source link

wasm-compose example is broken #1272

Closed tomasol closed 11 months ago

tomasol commented 1 year ago

The wasm-componse example seems to be broken:

crates/wasm-compose/example/service 
❯ cargo component build
   Compiling bitflags v2.4.1
   Compiling wit-bindgen v0.13.1
   Compiling cargo-component-bindings v0.4.0
   Compiling svc v0.1.0 (/home/tomas/work/workspaces/workflow/simple-wit/wasm-tools/crates/wasm-compose/example/service)
error[E0432]: unresolved import `bindings::exports::example::service::handler::Handler`
 --> src/lib.rs:3:59
  |
3 | use bindings::exports::example::service::handler::{Error, Handler, Request, Response};
  |                                                           ^^^^^^^ no `Handler` in `bindings::exports::example::service::handler`

For more information about this error, try `rustc --explain E0432`.
error: could not compile `svc` (lib) due to previous error

Replacing Handler with Guest in both service and middleware sources fixes the issue.

Mossaka commented 11 months ago

I think this has been fixed by #1261

alexcrichton commented 11 months ago

Indeed!