Skip to content
This repository has been archived by the owner on Sep 12, 2023. It is now read-only.

Sync up with WasmEdge 0.9.1 release #17

Open
hydai opened this issue Feb 21, 2022 · 7 comments · May be fixed by #19
Open

Sync up with WasmEdge 0.9.1 release #17

hydai opened this issue Feb 21, 2022 · 7 comments · May be fixed by #19
Assignees

Comments

@hydai
Copy link
Member

hydai commented Feb 21, 2022

Since WasmEdge has released 0.9.1, this repo should also be updated.

@hydai hydai self-assigned this Feb 21, 2022
@hydai hydai linked a pull request May 20, 2022 that will close this issue
@proohit
Copy link

proohit commented Jan 25, 2023

Hey, any updates on this? I need it for wasi-socket

@juntao
Copy link
Member

juntao commented Jan 25, 2023

Do you have to use 0.9? Is there any particular reason why you cannot use 0.11 or the latest? Thanks.

@proohit
Copy link

proohit commented Jan 25, 2023

No latest should also work or may even be necesarry. I'm getting the following error with 0.9.0:

[2023-01-25 19:22:03.558] [error] instantiation failed: unknown import, Code: 0x62
[2023-01-25 19:22:03.558] [error]     When linking module: "wasi_snapshot_preview1" , function name: "sock_setsockopt"
[2023-01-25 19:22:03.558] [error]     At AST node: import description
[2023-01-25 19:22:03.558] [error]     When linking module: "wasi_snapshot_preview1" , function name: "sock_setsockopt"
[2023-01-25 19:22:03.558] [error]     At AST node: import description
[2023-01-25 19:22:03.558] [error]     At AST node: import section
[2023-01-25 19:22:03.558] [error]     At AST node: module

Those are the expected imports of my module (compiled to wasm32-wasi with std::fs and wasmedge_wasi_socket)

  (import "wasi_snapshot_preview1" "sock_setsockopt" (func (;0;) (type 6)))
  (import "wasi_snapshot_preview1" "sock_open" (func (;1;) (type 5)))
  (import "wasi_snapshot_preview1" "sock_send" (func (;2;) (type 6)))
  (import "wasi_snapshot_preview1" "sock_recv" (func (;3;) (type 7)))
  (import "wasi_snapshot_preview1" "sock_bind" (func (;4;) (type 5)))
  (import "wasi_snapshot_preview1" "sock_listen" (func (;5;) (type 1)))
  (import "wasi_snapshot_preview1" "sock_accept" (func (;6;) (type 1)))
  (import "wasi_snapshot_preview1" "sock_getpeeraddr" (func (;7;) (type 8)))
  (import "wasi_snapshot_preview1" "sock_shutdown" (func (;8;) (type 1)))
  (import "wasi_snapshot_preview1" "fd_write" (func (;9;) (type 8)))
  (import "wasi_snapshot_preview1" "environ_get" (func (;10;) (type 1)))
  (import "wasi_snapshot_preview1" "environ_sizes_get" (func (;11;) (type 1)))
  (import "wasi_snapshot_preview1" "fd_close" (func (;12;) (type 9)))
  (import "wasi_snapshot_preview1" "fd_fdstat_get" (func (;13;) (type 1)))
  (import "wasi_snapshot_preview1" "fd_fdstat_set_flags" (func (;14;) (type 1)))
  (import "wasi_snapshot_preview1" "proc_exit" (func (;15;) (type 0)))

@proohit
Copy link

proohit commented Jan 25, 2023

Okay, turned out I had 0.9.0 installed locally. With 0.11.2, this error occurs and seems like the same as #18

process.dlopen(module, binding_path,
        ^

Error: libwasmedge_c.so: cannot open shared object file: No such file or directory
    at Object.<anonymous> (/home/direnc/workspace/custom-framework/examples/node/node_modules/wasmedge-core/index.js:7:9)
    at Module._compile (node:internal/modules/cjs/loader:1159:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
    at Module.load (node:internal/modules/cjs/loader:1037:32)
    at Module._load (node:internal/modules/cjs/loader:878:12)
    at Module.require (node:internal/modules/cjs/loader:1061:19)
    at require (node:internal/modules/cjs/helpers:103:18)
    at Object.<anonymous> (/home/direnc/workspace/custom-framework/examples/node/lib.js:3:18)
    at Module._compile (node:internal/modules/cjs/loader:1159:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1213:10) {
  code: 'ERR_DLOPEN_FAILED'
}

@hydai
Copy link
Member Author

hydai commented Jan 29, 2023

Hi @proohit
This repo is suspended to update after the 0.9.0 release. We move the development focus to wasmedge-quickjs.
It will not be compatible with the newer version due to the API change.

Doesn't the wasmedge-quickjs fit your use cases?

@proohit
Copy link

proohit commented Jan 30, 2023

I wasn't looking for executing js inside wasmedge but rather embed wasmedge in js just like the other SDKs for other languages and similar to the WebAssembly runtime in V8. Is this use case applicable by quickjs?

@hydai
Copy link
Member Author

hydai commented Jan 30, 2023

Ah, then the quickjs is not suitable for your scenario.

Do you have any timeline for using this SDK? Currently, we don't have more engineering power on this issue. Please raise a standalone issue to discuss the use cases if this hurry. So we can evaluate the priority and update our development roadmap.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants