badeend requested pchickey for a review on PR #7802.
badeend opened PR #7802 from badeend:no-sync2
to bytecodealliance:main
:
Fundamentally, preview2 is fully synchronous. So at least in theory there should be no need for all the Sync constraints. In practice it took me a while to figure out how to actually make it work. In summary:
- Removed many
+ Sync
constraints- Removed the immutable reference accessors on WasiView. I also dropped the _mut suffix for consistency with WasiHttpView.
- Had to do a bit of refactoring in
crates/wasi/src/preview2/host/filesystem.rs
here andcrates/wasi/src/preview2/preview1.rs
here to make them play along.
badeend requested wasmtime-core-reviewers for a review on PR #7802.
github-actions[bot] commented on PR #7802:
Subscribe to Label Action
cc @peterhuene
<details>
This issue or pull request has been labeled: "wasi", "wasmtime:api"Thus the following users have been cc'd because of the following labels:
- peterhuene: wasmtime:api
To subscribe or unsubscribe from this label, edit the <code>.github/subscribe-to-label.json</code> configuration file.
Learn more.
</details>
pchickey submitted PR review:
Thanks! These are all nice improvements.
pchickey submitted PR review:
Thanks! These are all nice improvements.
pchickey created PR review comment:
Needing a mutex here is a minor bummer, but I think the next refactor is to make there be two different ctx structs:
Host
for all preview 2 compatible things, andLegacyHost
for using wasi-common if, and only if, threads are required.I am working on a PR that separates out wasi-common from wasmtime-wasi, so that we can ship just the preview 2 implementation without any of the old one, so I'll fix this up after that lands.
badeend submitted PR review.
badeend created PR review comment:
Yeah, but at least
.lock()
never gets called, so effectively it's mostly a Box
badeend updated PR #7802.
badeend commented on PR #7802:
There were some build errors specific to Rust version 1.73 (and lower probably).
This should be good to go again.
pchickey merged PR #7802.
Last updated: Dec 23 2024 at 13:07 UTC