Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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-micro-runtime shim implementation #716
feat(wamr): add wasm-micro-runtime shim implementation #716
Changes from all commits
8f93996
e2fb956
7532700
11dffb0
d5fe22e
5030afa
49455b9
2ca5ea7
bc9f649
9e964e7
99f5a39
dc777e5
77db97b
3046d3e
d1d062c
89eac6e
a47e85a
0b1d720
dd1d892
dea9609
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.
question: Could you add a comment as to why this is safe to do? I guess
Runtime
is notSend
/Sync
, shouldRuntime
be madeSend
/Sync
upstream?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 believe the
Runtime
should be madeSend
/Sync
upstreamThere 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.
@lum1n0us is this the case? Does Wamr
Runtime
contain any thread-local storage? Does it have any shared internal states?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.
question: Is this correct? doesn't
Runtime
hold any state? I don't remember why we require the engine to beClone
:-\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.
We want the
Engine
to beClone
because we want cheap copies of the Runtime for each container in the pod. This is the case for Wasmtime, WasmEdge and Wasmer. I believe it should be the case for Wamr as well.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.
But we don't clone the engine for each container, we clone the process...
In any case, if we create a new runtime with each clone, we might as well use a marker struct for the Engine and create a new runtime inside the run_wasi method.
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 agree with you that we clone the entire process so there is no point to clone the engine.
at least for wasmtime,
Engine::clone()
is a cheap operation: https://docs.wasmtime.dev/api/wasmtime/struct.Engine.html#engines-and-clone