-
Notifications
You must be signed in to change notification settings - Fork 19
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: add support for .so dylib files #103
Conversation
add support for .so dylib files implement a missing wasi_intruction (prestat)
add support for .so dylib files implement a missing wasi_intruction (prestat)
…ystems/aWsm into integrate-dylib-into-runtime
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.
Looks great! only small issues around 1. wasmception, 2. clarifying the abi wording, and 3. if ifdefs are necessary or if we can just use separate compilation.
.github/workflows/main.yaml
Outdated
@@ -34,7 +34,8 @@ jobs: | |||
|
|||
strategy: | |||
matrix: | |||
libc: [wasmception, wasi-sdk] | |||
libc: [wasi-sdk] | |||
# libc: [wasmception, wasi-sdk] |
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 don't think that @Others is OK with this.
runtime/runtime.c
Outdated
// If a function is registered using the (start) instruction, call it | ||
WEAK void awsm_abi__start_fn() {} | ||
|
||
#ifdef DYNAMIC_LINKING_WASM_SO |
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.
Is the only way to do this with ifdef
s? I thought we tried to avoid them in awsm as much as possible. Could be misremembering.
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.
Given your later code, is it accurate to say that this is the complete set of symbols that an environment depends on an awsm module for?
I don't think it captures all of the symbols that a module depends on an environment for, right?
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.
Got rid of the ifdef everywhere...
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.
ended up separating the wasm instructions for all the architectures in the repo (mpx, cortex-m ...)
I did a complete new cleanup on the repo. Sorry, it is very a lot to review I guess. But the majority is just the wat files that were missing a line and a keyword change for new version of the wabt app. |
@Others You OK with this? Just adding a runtime that can run the awsm-generated code in a .so. Useful for dynamic loading of functions, and for testing this scenario (which is what we do in sledge). |
@Others This is an increasingly useful feature to test out interesting support for extensible sandboxes. We're testing strange TLS stuff with it. What do you think about it? |
@Others: A little bit more details, and some thoughts. When we use an Just a little background. Love to hear you thoughts. I know you're busy; I just wanted to write the above while it is in my head. |
add support for .so dylib files
seperate the wasm instructions from runtime code
implement a missing wasi_intruction (prestat)