-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Serve command behaves differently for jco and wasmtime / wasm produces by jco is not compatible with wasmtime #559
Comments
Make sure you are using Jco 1.9.1 with the latest WASI support. |
Hey @mschuwalow , I think the issue you're running into is that when you run Short storyLike in the README, use $ wasmtime serve -S common http-hello-world.wasm
Serving HTTP on http://0.0.0.0:8080/ Long storyWhen It's possible to You can use wasm-tools component wit path/to/your/component.wasm If I run that for the world root {
import wasi:io/poll@0.2.2;
import wasi:clocks/monotonic-clock@0.2.2;
import wasi:io/error@0.2.2;
import wasi:io/streams@0.2.2;
import wasi:http/types@0.2.2;
import wasi:cli/stdin@0.2.2;
import wasi:cli/stdout@0.2.2;
import wasi:cli/stderr@0.2.2;
import wasi:cli/terminal-input@0.2.2;
import wasi:cli/terminal-output@0.2.2;
import wasi:cli/terminal-stdin@0.2.2;
import wasi:cli/terminal-stdout@0.2.2;
import wasi:cli/terminal-stderr@0.2.2;
import wasi:clocks/wall-clock@0.2.2;
import wasi:filesystem/types@0.2.2;
import wasi:filesystem/preopens@0.2.2;
import wasi:random/random@0.2.2;
import wasi:http/outgoing-handler@0.2.2;
export wasi:http/incoming-handler@0.2.2;
}
// ... omitted As you can see there, So this is where your error is coming from -- I can reproduce it when I run
If I run with ❯ wasmtime serve -S common http-hello-world.wasm
Serving HTTP on http://0.0.0.0:8080/ And things work fine :) [EDIT] Also note that you can run |
Using the example: https://github.com/bytecodealliance/jco/tree/e083d5a0699856bfa6b4eab2776ca04ada125138/examples/components/http-hello-world
With jco:
With wasm:
The text was updated successfully, but these errors were encountered: