Closed baisijian closed 2 years ago
Hmm, I'm not able to reproduce that. Could you share more details please? E.g.
Thanks!
Hmm, I'm not able to reproduce that. Could you share more details please? E.g.
- what operating system are you on
- what version of Rust are you on
- what command are you using to build
- is there any location information associated with the error
Thanks!
what operating system are you on linux what version of Rust are you on rustc 1.56.1 cargo 1.56.0 what command are you using to build run --package wagi --bin wagi -- -c examples/modules.toml is there any location information associated with the error
Okay, so it looks like wagi
itself is compiling okay, but one of the Wasm modules referenced in examples/modules.toml
is not working with the current version of the Wasm outbound HTTP proposal. In examples/modules.toml
, could you try commenting out the example that makes an outbound HTTP request please?
# [[module]]
# route = "/http-example"
# module = "examples/http-example.wasm"
# allowed_hosts = ["https://api.brigade.sh"]
# http_max_concurrency = 2
and see if that helps? Thanks!
@radu-matei Do you know where this sample came from or if it is likely to need updating? It's been there since the year dot and I can't see the source code for it...
Okay, so it looks like
wagi
itself is compiling okay, but one of the Wasm modules referenced inexamples/modules.toml
is not working with the current version of the Wasm outbound HTTP proposal. Inexamples/modules.toml
, could you try commenting out the example that makes an outbound HTTP request please?# [[module]] # route = "/http-example" # module = "examples/http-example.wasm" # allowed_hosts = ["https://api.brigade.sh"] # http_max_concurrency = 2
and see if that helps? Thanks!
@radu-matei Do you know where this sample came from or if it is likely to need updating? It's been there since the year dot and I can't see the source code for it...
yes,commenting out is working, thanks
@baisijian — thanks for pointing that out. We started putting together the Wagi examples in a single repo, but we never got around to adding all of them — see https://github.com/deislabs/wagi-examples
The HTTP example is mostly the same as — (with a main
and proper content type headers) https://github.com/deislabs/wasi-experimental-http/blob/main/tests/rust/src/lib.rs#L3-L20
Reopening as this is an issue with the way Wagi instantiates modules. Thank you so much for the report, @baisijian.
So there are two places where prepare_wasm_instance
gets called in Wagi — once in the handler
, and once in the dispatcher
.
The dispatcher
does not set the proper HTTP linker imports:
hi : I compiled the source code get anerror:
wasi_experimental_http::close
has not been defined