-
Notifications
You must be signed in to change notification settings - Fork 6
Add crates for wasmtime integration and a cli interface #7
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
Conversation
b7c1aca
to
b916474
Compare
b916474
to
9a45c2f
Compare
292733b
to
eb6d3ae
Compare
eb6d3ae
to
47a6c40
Compare
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.
LGTM; thanks so much for doing this! Just a couple of inline comments, both optional.
with: | ||
toolchain: stable | ||
target: wasm32-wasip2 | ||
- name: check |
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'd be in favor of running clippy here unless there's a good reason not to.
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.
Good idea! 10a0482
test-programs/src/bin/test.rs
Outdated
}" | ||
}); | ||
|
||
// rustc won't allow using a a Cell in a static, but since this is a component (which is always |
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.
Nit: using AtomicBool
here would be simpler and require less explanation.
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.
Yep 24fb6dd
This is a pretty big PR towards making component-init usable standalone:
component-init-get-memory
to no longer try to use a__stack_pointer
global, which only exists in the waycomponent-init
expects in components crated withwasm-tools component link
. Instead, a new allocation strategy is used that ignores all contents of the module and just callsmem.grow
, which it uses to store the return value pointing to the previous full range of memory.In addition to the newly written tests, I tested my work against componentize-py and posted the following PR to update componentize-py to this version of component-init bytecodealliance/componentize-py#159. That PR should wait to land until we publish component-init to crates.io, in my opinion.