Stream: git-wasmtime

Topic: wasmtime / PR #15359 Consolidate platform-specific filesy...


view this post on Zulip Wasmtime GitHub notifications bot (Nov 18 2026 at 22:42):

alexcrichton opened PR #15359 from alexcrichton:remove-second-platform-module to bytecodealliance:main:

Prior to the vendoring of cap-primitives the wasmtime-wasi crate already had windows/unix-specific modules. With the vendoring of cap-primitives there was then two different locations for platform-specific modules, and this commit is a stab at resolving this semi-duplication and consolidating into just one platform-specific module.

The changes here are somewhat involved as this is additionally attempting to further remove layers of abstraction between the filesystem.rs interface and what primitives provides. Previously everything in filesystem.rs was centered around the API and capabilities of the cap-std crate (and cap-primitives), but such constraints are generally no longer necessary and it's possible to massage APIs to exactly what WASI needs for example.

This shuffles around the definition of Metadata and FileType, for example, as the std equivalents are no longer ever used. This is due to the myriad of entrypoints that this information can be learned and there being no public constructor in std itself. This means that some std-like paths are now mirrored in wasmtime-wasi, but mostly for the Windows side of things as the Unix side already had to have this duplication. The Unix side is simpler now that the standard library is no longer used and the source of truth of metadata information is either stat or statx structures from rustix.

Part of the simplification here is additionally related to symlinks. WASI only has a single symlink function, so the symlink_{file,dir} functions are consolidated into just the Windows implementation where that's relevant. This additionally has a minor change in behavior where dangling symlinks are now allowed on Windows and are assumed to be symlink_file equivalents. Previously dangling symlinks always generated an error because the code use ? when learning about the symlink target to determine what kind of symlink to create. Arguably this is a wasi:filesystem issue as the semantics of how to implement a cross-platform bare symlink function is not entirely clear. It's hoped that the precise semantics here aren't going to cause issues.

Regardless though the end result is that all platform-specific code is now in a single location for filesystem handling, and there's a reduction of the back-and-forth of which abstraction layer you're at.

<!--
Please make sure you include the following information:

Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.html

Please review the Bytecode Alliance's AI tool usage policy at
https://github.com/bytecodealliance/governance/blob/main/AI_TOOL_POLICY.md

Please ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->

view this post on Zulip Wasmtime GitHub notifications bot (Nov 18 2026 at 22:42):

alexcrichton removed the review request for wasmtime-wasi-reviewers from PR #15359.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 18 2026 at 22:42):

alexcrichton requested rvolosatovs for a review on PR #15359.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 18 2026 at 22:42):

alexcrichton requested wasmtime-wasi-reviewers for a review on PR #15359.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 18 2026 at 23:58):

pchickey requested pchickey for a review on PR #15359.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 19 2026 at 02:44):

github-actions[bot] added the label wasi on PR #15359.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 19 2026 at 19:49):

alexcrichton requested wasmtime-core-reviewers for a review on PR #15359.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 19 2026 at 19:49):

alexcrichton updated PR #15359.


Last updated: Nov 19 2026 at 20:05 UTC