bytecodealliance / bytecodealliance/wstd
Tracking issue for WASIp3
- Lenguaje dominante
- Rust
- Estrellas
- 133
- Forks
- 19
- Merge medio
- 6 d 19 h
- PR fusionados (30 d)
- 5
Descripción
## 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
Guía de contribución
Línea de trabajo
Lee el Plan y los Breaking Changes, después abre un elemento de la checklist que no esté marcado, como #145, #148 o #151, e inspecciona la implementación de WASIp2 correspondiente en el subsistema indicado. Compara su gestión actual del target y las features con los requisitos de WASIp3. Se considera terminado cuando el subsistema seleccionado está implementado para WASIp3 y su ruta de CI de desarrollo funciona.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- rust, wasm
- Área
- operating-systems
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Estado de actividad
- Activo
- Claridad
- Bastante claro
- Aptitud para principiantes
- 32/100