Add crates for wasmtime integration and a cli interface#7
Merged
Conversation
b7c1aca to
b916474
Compare
b916474 to
9a45c2f
Compare
292733b to
eb6d3ae
Compare
eb6d3ae to
47a6c40
Compare
dicej
approved these changes
Jun 30, 2025
dicej
left a comment
Owner
There was a problem hiding this comment.
LGTM; thanks so much for doing this! Just a couple of inline comments, both optional.
| with: | ||
| toolchain: stable | ||
| target: wasm32-wasip2 | ||
| - name: check |
Owner
There was a problem hiding this comment.
I'd be in favor of running clippy here unless there's a good reason not to.
| }" | ||
| }); | ||
|
|
||
| // rustc won't allow using a a Cell in a static, but since this is a component (which is always |
Owner
There was a problem hiding this comment.
Nit: using AtomicBool here would be simpler and require less explanation.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This is a pretty big PR towards making component-init usable standalone:
component-init-get-memoryto no longer try to use a__stack_pointerglobal, which only exists in the waycomponent-initexpects 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.