wasmerio / wasmer-ruby

💎🕸 WebAssembly runtime for Ruby
https://wasmer.io
MIT License
465 stars 18 forks source link

WASI / import function support ? #39

Closed ljulliar closed 3 years ago

ljulliar commented 4 years ago

I have a number of import statement in my WASM code to declare WASI functions and wahen I instantiate Wasmer and try to execute, I get the following error

RuntimeError: Failed to instantiate the module:
    5 link errors:
(1 of 5) Import not found, namespace: wasi_unstable, name: args_sizes_get
(2 of 5) Import not found, namespace: wasi_unstable, name: args_get
(3 of 5) Import not found, namespace: wasi_unstable, name: fd_write
(4 of 5) Import not found, namespace: wasi_unstable, name: fd_read
(5 of 5) Import not found, namespace: wasi_unstable, name: proc_exit

Wasmer is supposed to support WASI so I was wondering if this could be something to modify in ruby-ext-wasm to "make the connection" with imported functions ? (Not specifically WASI functions by the way....)

Thanks!

Hywan commented 4 years ago

Sorry for the late reply. Wasmer supports WASI but not the integration inside Ruby. It'll come in the next release. Thanks for your patience.

ljulliar commented 4 years ago

Thanks for your reply Ivan. That's good news.

Laurent

On Mon, Jul 6, 2020 at 11:40 AM Ivan Enderlin notifications@github.com wrote:

Sorry for the late reply. Wasmer supports WASI but not the integration inside Ruby. It'll come in the next release. Thanks for your patience.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/wasmerio/ruby-ext-wasm/issues/39#issuecomment-654128802, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAED4LYV2Y4WBCOSEDSAVTR2GL2LANCNFSM4M6GCAUA .

Hywan commented 3 years ago

WASI support has been introduced in #48. Closing this issue :-).

ljulliar commented 3 years ago

Great. Thanks!