Remove system-interface from wasmtime-wasi#13109
Merged
alexcrichton merged 7 commits intobytecodealliance:mainfrom Apr 16, 2026
Merged
Remove system-interface from wasmtime-wasi#13109alexcrichton merged 7 commits intobytecodealliance:mainfrom
system-interface from wasmtime-wasi#13109alexcrichton merged 7 commits intobytecodealliance:mainfrom
Conversation
811aa01 to
9af284c
Compare
system-interface from wasi-commonsystem-interface from wasmtime-wasi
pchickey
approved these changes
Apr 15, 2026
1f0e535 to
5e8b6bf
Compare
This commit removes the `system-interface` dependency from `wasi-common`, reimplementing necessary functionality within the crate itself as appropriate. The goal of this commit is to trim our dependency tree. The `system-interface` crate has not received an update in over a year and continues to pull in an older `rustix` dependency for example. Additionally I've personally found it confusing and surprising in the past to trace through all the layers of abstractions from `wasmtime-wasi` to the OS, and I'd like to start slimming this down to be more local within Wasmtime rather than depending on a tree of crates. The `system-interface` crate is a relatively thin wrapper around `cap-std`-style crates providing a platform-agnostic API. This sometimes fits what WASI wants, and sometimes doesn't. For example all reads/writes to files within WASI currently require that Wasmtime maintains a file cursor itself meaning that the underlying OS file cursor doesn't actually matter. Reads and writes through the `system-interface` abstraction, however, keep the cursor up-to-date to have the same semantics across Unix and Windows which differ in the behavior of the underlying syscalls. This is unnecessarily adds overhead to Wasmtime's implementation of these APIs where they're otherwise not required. Effectively `system-interface` is not receiving much maintenance (old dependency on `rustix` has persisted for ~1 year), its an extra layer of abstraction to debug when issues arise, and its abstractions are not always the best fit for WASI's semantics meaning that it can add performance overhead. The replacement of inlining implementations within Wasmtime is not too too costly and, personally, I view as worth it. I'll note that this doesn't delete the `system-interface` crate entirely. That would require removing it from `wasi-common` as well, which is the subject of bytecodealliance#13108.
prtest:full
2397167 to
b2ee1bb
Compare
Merged
via the queue into
bytecodealliance:main
with commit Apr 16, 2026
362f857
352 of 354 checks passed
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 commit removes the
system-interfacedependency fromwasmtime-wasi, reimplementing necessary functionality within the crate itself as appropriate. The goal of this commit is to trim our dependency tree. Thesystem-interfacecrate has not received an update in over a year and continues to pull in an olderrustixdependency for example. Additionally I've personally found it confusing and surprising in the past to trace through all the layers of abstractions fromwasmtime-wasito the OS, and I'd like to start slimming this down to be more local within Wasmtime rather than depending on a tree of crates.The
system-interfacecrate is a relatively thin wrapper aroundcap-std-style crates providing a platform-agnostic API. This sometimes fits what WASI wants, and sometimes doesn't. For example all reads/writes to files within WASI currently require that Wasmtime maintains a file cursor itself meaning that the underlying OS file cursor doesn't actually matter. Reads and writes through thesystem-interfaceabstraction, however, keep the cursor up-to-date to have the same semantics across Unix and Windows which differ in the behavior of the underlying syscalls. This is unnecessarily adds overhead to Wasmtime's implementation of these APIs where they're otherwise not required.Effectively
system-interfaceis not receiving much maintenance (old dependency onrustixhas persisted for ~1 year), its an extra layer of abstraction to debug when issues arise, and its abstractions are not always the best fit for WASI's semantics meaning that it can add performance overhead. The replacement of inlining implementations within Wasmtime is not too too costly and, personally, I view as worth it.I'll note that this doesn't delete the
system-interfacecrate entirely. That would require removing it fromwasi-commonas well, which is the subject of #13108.