-
Notifications
You must be signed in to change notification settings - Fork 65
Add component-init
project to this repo
#138
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
Open
pchickey
wants to merge
32
commits into
bytecodealliance:main
Choose a base branch
from
pchickey:pch/upstream_component_init
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Add component-init
project to this repo
#138
pchickey
wants to merge
32
commits into
bytecodealliance:main
from
pchickey:pch/upstream_component_init
Conversation
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
Signed-off-by: Joel Dice <joel.dice@fermyon.com>
Signed-off-by: Joel Dice <joel.dice@fermyon.com>
Signed-off-by: Joel Dice <joel.dice@fermyon.com>
…c count Signed-off-by: Joel Dice <joel.dice@fermyon.com>
Signed-off-by: Joel Dice <joel.dice@fermyon.com>
Signed-off-by: Jamey Sharp <jsharp@fastly.com>
First draft of a README
This allows the caller to specify two separate components during pre-initialization: one to instrument (which we call "stage 1"), and the other to which to apply the snapshot captured after pre-initialization (which we call "stage 2"). Normally, you'll want these to be the same component, but there are cases where they might not be: e.g. when the "stage 1" component needs access to WASI imports during pre-init, but the "stage 2" component does not have those imports. The second parameter to `initialize_staged` is an optional tuple of the "stage 1" component and a function which maps module indices from "stage 2" to "stage 1". Signed-off-by: Joel Dice <joel.dice@fermyon.com>
* Update deps * switch back to upstream `wasm-convert` dep Signed-off-by: Joel Dice <joel.dice@fermyon.com> --------- Signed-off-by: Joel Dice <joel.dice@fermyon.com> Co-authored-by: Joel Dice <joel.dice@fermyon.com>
* Update deps * refactor: update float64 to new f64 keyword * don't do function counting for new thread functions * Move back to upstream wasm-convert
Signed-off-by: Joel Dice <joel.dice@fermyon.com>
…ance#7) * scaffold * just enough machinery to run in a cli * test-programs * test: debug print * wat component passes tests, idk whats going on with rust one * fix rust guest to actually mutate shared state * remove debug * add github CI that runs tests, checks fmt and docs * cargo +nightly fmt * ci wibbles * sort * test program: use AtomicBool per Joel's code review * add clippy to CI, and fix clippy lints
…ecodealliance#10) * rename root `component-init` crate to `component-init-transform` and move it to a child directory. This leave the `component-init` crate name available for a guest crate that creates a nice DX for this feature. * nightly fmt * cargo doc needs wasm32-wasip2 installed because test-programs-artifacts build.rs uses it
Signed-off-by: Joel Dice <joel.dice@fermyon.com>
Signed-off-by: Joel Dice <joel.dice@fermyon.com>
…ance#11) * create a new component-init crate with an attr macro wraps up wit-bindgen pretty trivially * fmt
…ytecodealliance#12) * restructure transform into more intermediate datatypes and functions * clippy and rustfmt * code review fixes
Signed-off-by: Joel Dice <joel.dice@fermyon.com>
Signed-off-by: Joel Dice <joel.dice@fermyon.com>
…nto pch/upstream_component_init
that is only to be used as part of `cargo fuzz`
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.
@dicej and I would like to add the component-init project to this repo. It has been developed at https://github.com/dicej/component-init. I moved the entire contents of that repo into the
component-init/
subdirectory, and then merged the unrelated history into this repo.Aside from changing the repository, this PR changes the license from
MIT
toApache 2.0 WITH LLVM-Exception
per Bytecode Alliance policy.In the future, we will refactor and merge this tool into wizer itself. For now, we are just moving it to this repo so that its clear that its under Bytecode Alliance governance.
I tried to make as few changes as possible to wizer to land this. CI now tests the entire workspace. In order to maintain the
RUSTFLAGS: -Dwarnings
flag we used in.github/workflows/ci.yml
for component-init, I put#[expect(...)]
on benign uses of static mut in the tests. Nothing is added to.github/workflows/release.yml
- we will figure out a release flow in a future PR.