bytecodealliance / bytecodealliance/wstd
Tracking issue for WASIp3
- 主要语言
- Rust
- 星标
- 133
- 派生
- 19
- 平均合并
- 6 天 19 小时
- 30 天内合并 PR
- 5
描述
## Plan
The ultimate goal is to have `wstd` use WASIp2 when compiled to `wasm32-wasip2` and WASIp3 when compiling to `wasm32-wasip3`, with essentially the same APIs.
Until https://github.com/rust-lang/rust/pull/161940 has landed we'll create mutually exclusive `p2` and `p3` features on `wstd`, where `p2` will be enabled by default and `p3` will only be run in CI during development, not meant for actual use. Then we can switch the `feature` directives to `target_env` directives when the work is complete and `wasm32-wasip3` is tier 2.
## Breaking Changes
- The stream APIs in `io` and TCP APIs in `net` work with `&` references and will switch to requiring `&mut`. This is because `p2` is a single threaded environment, whereas `p3` is not. This change will be made to both targets to keep them in sync.
- Some APIs expose the underlying WASIp2 types (e.g. [`AsyncInputStream::new`](https://docs.rs/wstd/latest/wstd/io/struct.AsyncInputStream.html#method.new) takes a `wasip2::InputStream`) these will naturally change to use the equivalent WASIp3 types. This will only be breaking when upgrading to the WASIp3 target.
- (Up for discussion) The `wasip3` crate has its own `Task` type which `wstd` could use directly instead of `async_task::Task`. If done this would be another breaking change between the two targets.
## Checklist
- [x] #144
- [ ] #145
- [ ] #148
- [ ] Implement `runtime` on WASIp3
- [ ] Implement `rand` on WASIp3
- [ ] Implement `time` on WASIp3
- [ ] Implement `io` on WASIp3
- [ ] Implement `net` on WASIp3
- [ ] Implement `http` on WASIp3
- [ ] Implement `wstd-axum` on WASIp3
- [x] #147
- [ ] (Optional) Switch from `async_task::Task` to `wasip3::Task`
- [ ] #151
贡献指南
调研方向
阅读 Plan 和 Breaking Changes,然后打开一个未勾选的检查清单项,例如 #145、#148 或 #151,并检查指定子系统中对应的 WASIp2 实现。将其当前对 target 和 feature 的处理与 WASIp3 的要求进行比较。完成意味着所选子系统已针对 WASIp3 实现,并且其开发 CI 路径能够正常工作。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- rust, wasm
- 领域
- operating-systems
- Issue 类型
- 功能
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 活跃
- 描述清晰度
- 基本清楚
- 新手友好度
- 32/100