-
Notifications
You must be signed in to change notification settings - Fork 134
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 nil backend #1794
feat: add nil backend #1794
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1794 +/- ##
==========================================
+ Coverage 54.68% 57.01% +2.33%
==========================================
Files 151 152 +1
Lines 10316 10352 +36
==========================================
+ Hits 5641 5902 +261
+ Misses 4675 4450 -225
Continue to review full report at Codecov.
|
@platten Note that this makes the "static binary" problem much more acute since the dependency graphs are now overlapping. |
@npmccallum Can you elaborate on how this makes the static binary problem more acute? |
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.
So AIUI the reason to split out exec-wasmtime into lib and bin crates is so that we can make the lib optional and avoid building wasmtime twice, once for the host and once for musl, since wasmtime takes a while to build. @npmccallum This isn't a new bug in bindeps, because it's expected behavior; bindeps allows you to have both an artifact and a normal dependency via the lib = true
key, but there's no facility to make lib = true
optional, and it's unclear how you'd even expose that. So this is bindeps working as intended, and is not relevant to the known optional = true
bug ( rust-lang/cargo#10526 ).
Instead, the ultimate fix for this would be multidep ( rust-lang/cargo#10061 ), which would allow us to have a single exec-wasmtime crate and rely on it twice from within Cargo.toml, once as an optional direct dependency and once as a bindep. Please leave a FIXME somewhere mentioning that we can undo this split once multidep arrives.
Shouldn't we open an issue which tracks the external multidep and a second one depending on this to fix our monorepo? |
Signed-off-by: Harald Hoyer <harald@profian.com>
This backend calls `exec-wasmtime` directly via a library call, without using any elf binary. ``` ❯ cargo run -- run --backend nil hello_wasi_snapshot1.wasm Hello, world! ``` Signed-off-by: Harald Hoyer <harald@profian.com>
Signed-off-by: Harald Hoyer <harald@profian.com>
This backend calls
exec-wasmtime
directly via a library call, without using any elf binary and shim.