-
Notifications
You must be signed in to change notification settings - Fork 824
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
Using WASI from wasmer cli #2978
Comments
In general, this should work, WASI is active by default. One suspicion though: You're not by any chance using For reference: You can save this file as (module
(import "wasi_unstable" "args_sizes_get"
(func $__wasi_args_sizes_get (param i32 i32) (result i32)))
(func $_start)
(memory 1)
(export "memory" (memory 0))
(export "_start" (func $_start))
) (If |
Ah, Ah... Nice catch. yes I'm using the --invoke. Let me try without that.
…On Wed, Jun 29, 2022 at 8:58 AM jcaesar ***@***.***> wrote:
In general, this should work, WASI is active by default. One suspicion
though: You're not by any chance using wasmer run --invoke _foobar?
Because using --invoke deactivates WASI.
For reference: You can save this file as test.wat and execute it with wasmer
run test.wat just fine (not that it does anything):
(module
(import "wasi_unstable" "args_sizes_get"
(func $__wasi_args_sizes_get (param i32 i32) (result i32)))
(func $_start)
(memory 1)
(export "memory" (memory 0))
(export "_start" (func $_start))
)
—
Reply to this email directly, view it on GitHub
<#2978 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAED4KYFJ257PKUUUPFY43VRPXZ7ANCNFSM5Z6PG22Q>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Possibly related to #1716. |
@fschutt Thank you for fixing this. For reference, an easy way to reproduce this problem from a rust-compiled binary is #[no_mangle]
pub extern "system" fn invokeme() {
println!("Hello, world!");
} You'll have to compile that as a |
Hi all,
I'm generating WASM module from a compiler of my own. In one of the module I wrote I'd like to use the WASI interface. I am therefore importing the various WASI functions from the module wasi_unstable but when I try to execute this model with the wasmer runtime through the command line I get the following error:
Is it that I am importing the wrong module name ? Or is there an option on the wasmer CLI to "activate" the WASI module at execution time ?
Thanks for your help.
The text was updated successfully, but these errors were encountered: