Merge wasiless into this repo#76
Merged
Merged
Conversation
`cargo build --target wasm32-wasip2`
…or more interfaces impls.
Also rename the top-level WIT file, which I had forgot to do.
… unready pollable. Stop doing that. Returning seems to me much preferable to freezing forever.
…so we can build it with just `cargo build`.
Here, move binding generation to its own module.
These files aren't getting any shorter.
Starting to simply throw `unimplemented!()`. It makes the stubs faster to write, and it's not clear that eager failure isn't preferable, unless Python demands actual operational routines. It's likely I'll go back and change the present mock-ish implementations to `unimplemented!()` as well.
…nder Viceroy. I skipped ahead using wit-bindgen to generate all the stubs to see what would happen, and I ran into a link error. It turns out that the `wasm32-wasip2` target adds a lot of extra imports, 0.2.3 WASI ones, which Viceroy doesn't provide and we obviously cannot provide to ourselves. We'll just have to wrap our output in a component ourselves with wasm-tools after building. We'll work that into the build process eventually.
…least panicking stubs for everything.
CPython calls these on startup.
Rust stdlib has no RNGs yet. `rand` crate doesn't support JS-less wasm. Perhaps the experimental RNG stuff in Rust nightly would work.
…a crash eventually. Crash promptly so the crash is easy to track down.
…bbcc9e92e43545224. It made no different in the WIT of the emitted component.
This solves the immediate `pollable` type mismatch when `wac`ing together a Python component.
…invocation. See ed84dc3 for details on target selection.
This lets us substitute wasiless items in for WASI ones without `wac` having errors about conflicting resource types. (`resource` directives actually create resource-type singletons, and `wac` does not unify them. Thus, we have to give unique package paths to what would otherwise be conflicting ones.)
This reverts commit 970bd61. This gambit didn't work. We were with the same error upon `wac`: ``` error: the encoding of the graph failed validation Caused by: type mismatch for import `wasi:filesystem/types@0.2.0` type mismatch in instance export `input-stream` resource types are not the same (ResourceId { globally_unique_id: 2, contextually_unique_id: 124 } vs. ResourceId { globally_unique_id: 2, contextually_unique_id: 6 }) (at offset 0x291a051) ```
…e implementations. * Export (in the `wasiless` world) only things used by Python but not provided by the Fastly Compute runtime. * Remove implementations of things we don't need for Python (or that are covered by Compute). * Flatten out contents of `wit` dir. These WITs are extracted from the Python+app component and are a little non-canonical, doing things like importing 0.2.6 interfaces into `filesystem/types@0.2.0`. Let's stick with this for now, since it works.
…us to move composition to the compute-sdk-python repo.
It's 71K instead of 3MB.
…mpute-sdk-python repo.
This reduces submodule paperwork for the foreseeable future. If we ever support some other runtime for which wasiless is useful, we can break it out again.
posborne
approved these changes
Apr 2, 2026
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 reduces submodule paperwork for the foreseeable future. If we ever support some other runtime for which wasiless is useful, we can break it out again.