-
Notifications
You must be signed in to change notification settings - Fork 82
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
feat(wamr): add wasm-mico-runtime shim implementation #508
base: main
Are you sure you want to change the base?
Conversation
this commit adds an additional shim implementation: Wamr using wamr-rust-sdk Signed-off-by: jiaxiao zhou <jiazho@microsoft.com>
@@ -3,7 +3,7 @@ INSTALL ?= install | |||
CARGO ?= cargo | |||
LN ?= ln -sf | |||
TEST_IMG_NAME ?= wasmtest:latest | |||
RUNTIMES ?= wasmedge wasmtime wasmer | |||
RUNTIMES ?= wasmedge wasmtime wasmer wamr |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to add wamr to CI
this is GREAT! |
Signed-off-by: jiaxiao zhou <jiazho@microsoft.com>
let instance = WamrInstnace::new(&module, 1024 * 64) | ||
.map_err(|e| anyhow::Error::msg(format!("Failed to create instance: {:?}", e)))?; | ||
|
||
// TODO: bug: failed at line above saying: `thread signal env initialized failed` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am thinking about Self { runtime }
may has been destroyed. It happened several times in my test cases when implementing rust-sdk. Is there a quick way we can confirm that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah i believe that when the variable let runtime = Runtime::new()
goes out of scope, the Drop()
will be invoked to destruct it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's probably why I favor the design of a binding the runtime to the variable and pass that to instances like wasmtime does.
let engine = Engine::default();
let module = Module::new(&engine, wat)?;
let mut store = Store::new(&engine, 4);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
about that, bytecodealliance/wamr-rust-sdk#8
this commit adds an additional shim implementation: Wamr using wamr-rust-sdk. At the moment, the shim isn't working with an error
"thread signal env initialized failed"
which I am not sure exactly sure what it means. Will ask the Wamr team for clarification. There are also some pain points using the newly created wamr-rust-sdk which I wrote as TODOs in the comment.This PR should close #337
FYI @squillace @0xE282B0 @lum1n0us