Stream: git-wasmtime

Topic: wasmtime / PR #14224 [36.0.x] Vendor cap-std/cap-primitiv...


view this post on Zulip Wasmtime GitHub notifications bot (Aug 28 2026 at 18:20):

alexcrichton opened PR #14224 from alexcrichton:primitives36 to bytecodealliance:release-36.0.0:

This is the equivalent of #14219 for the 36.0.x release branch which we'll be supporting for another year. The goal here is to ensure that fixing security issues in the filesystem sandbox is in theory a purely local change within Wasmtime like it would be on main to avoid having to both change main and additionally change published cap-std crates.

The backport here is much more involved than just cherry-picking #14219 to this branch. As described in the second commit this historical version of Wasmtime is missing major refactorings such as moving away from cap-std and the refactoring of filesystem internals across wasip2 and wasip3. This means that while the primitives directory is directly cherry-picked from #14219 the rest of this is basically hand-written. This hand-vendors more platform-specific modules from main and wires everything up.

To add another wrinkle to all of this the cap-std crate is visible in the public API of wasmtime-wasi to a greater degree than it is on main. For example the Descriptor type has file and dir methods which expose the underlying File and Dir structures of wasmtime-wasi which have pub fields which are cap_std::fs::{File,Dir} types. It would be a semver-breaking change, technically, to change these to std::fs::File as is present on main. To handle this those parts are left as-is but all operations are done internally as std::fs::File. The intention is that all sandboxing logic lives within the local primitives module.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 28 2026 at 18:20):

alexcrichton requested pchickey for a review on PR #14224.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 28 2026 at 18:20):

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

view this post on Zulip Wasmtime GitHub notifications bot (Aug 28 2026 at 18:20):

alexcrichton requested fitzgen for a review on PR #14224.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 28 2026 at 18:20):

alexcrichton requested wasmtime-default-reviewers for a review on PR #14224.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 28 2026 at 18:21):

alexcrichton unassigned fitzgen from PR #14224 [36.0.x] Vendor cap-std/cap-primitives into wasmtime-wasi.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 28 2026 at 20:43):

:thumbs_up: pchickey submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 28 2026 at 22:14):

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

view this post on Zulip Wasmtime GitHub notifications bot (Aug 28 2026 at 22:14):

github-actions[bot] added the label wasmtime:docs on PR #14224.


Last updated: Aug 30 2026 at 09:07 UTC