Repository navigation
feat: add support for WASIp1 programs (Flatware) - #78
Merged
Merged
Conversation
Collect the human-written interface and handle specifications and repository guidelines.
Keep allocator growth within the linker-defined user heap rather than assuming an address-space location.
Return the replaced entry from nested mappings, expose implemented Table reads, and retain shared Table backing. Cover these behaviors in kernel mapping tests.
Contributor
Author
|
For what it's worth each commit on this branch is meant to be an independent change, GitHub just won't let me make it a PR stack unless I create a new branch for each one. |
Akshay-Srivatsan
force-pushed
the
flatware
branch
3 times, most recently
from
October 6, 2026 01:42
bfcc15c to
b75b214
Compare
Use Handle for existing Fix values and Value adaptors for pending values. Read from borrowed lookup paths or recipe memory and interpret returned values through the C bridge with one scratch Memory and Table. Provide eager child callbacks, checked TryFrom conversions, tuple Tree construction and unpacking, allocation-free iteration, and vector-returning reads. Delegate equality to Fix. Recursive clients can return Fix application thunks or use Rc<dyn Value> when allocating.
Provide thin C Wasm imports and explicit Memory and Table operations. Cover the native bindings with an integration test and gate Rust vector-returning reads behind alloc. Add clang-format and clang-tidy checks for SDK C sources, include them in repository checks, and provide a general autoformatter for Rust and SDK C.
Add blob, addition, and directory-path programs in each language. Keep Rust path lookup allocator-free using Fix application thunks. Exercise path lookup with references, missing entries, and empty directories, and validate standalone launchers using the C programs.
Akshay-Srivatsan
force-pushed
the
flatware
branch
2 times, most recently
from
October 8, 2026 07:17
e895d5d to
107bb57
Compare
Run all jobs on Ubuntu 26.04 and separate their Bazel disk caches from Ubuntu 24.04. Install the distro Binaryen package alongside native build tools so Flatware has wasm-merge. Document the local build prerequisite.
Link standard WASIp1 guests with a separate-memory Fix adapter using wasm-merge. Support buffered standard streams, files and directory preopens, deterministic clocks, MT19937-64 random bytes, and proc_exit. Use canonical descriptor/stat trees and the upstream allocator and PRNG dependencies. Cover filesystem capabilities and compile Rust WASIp1 programs for integration tests.
Run WASIp1 modules against directory snapshots with buffered stdin, host stdout/stderr, guest exit status, and returned files in a fresh temporary directory. Add runnable ls, wc, cat, and head programs and end-to-end runner tests.
Expose freestanding C compilations as individual CppCompile actions and extract their flags with pinned Hedron. Adapt its Python/C++ rules and header discovery for Bazel 9. Add bazel run //:lsp to regenerate both compile_commands.json and rust-project.json. Preserve Wasm link optimization and ABI flags when separating compile and link actions.
Akshay-Srivatsan
force-pushed
the
flatware
branch
from
October 8, 2026 23:07
107bb57 to
4866c13
Compare
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 bit of an omnibus PR since I kept running into random things I meant to clean up anyway, but roughly this PR:
BitPack. The representation is almost what we designed for the old Fix, but it's extended for the three-way canonical/machine/local distinction and for the Eq bit. The Handles are now uniformly represented as either[u8; 32](kernel) oru8x32(userspace); we no longer unpack them into a Rust enum.Still TBD:
With my apologies to anyone who tries to review this 14000 line diff... this PR adds almost a third to the codebase. Although at least it's only like 7000 lines of actual code? And the final total is now about the same as the original Fix codebase?