0xPlaygrounds / 0xPlaygrounds/rig
feat: WASI support
- Lenguaje dominante
- Rust
- Estrellas
- 8.6k
- Forks
- 959
- Merge medio
- 4 h 32 min
- PR fusionados (30 d)
- 117
Descripción
- [X] I have looked for existing issues (including closed) about this
## Feature Request
A description of what WASI is:
> The WebAssembly System Interface (WASI) is a group of standards-track API specifications for software compiled to the [W3C WebAssembly (Wasm) standard](). WASI is designed to provide a secure standard interface for applications that can be compiled to Wasm from any language, and that may run anywhere—from browsers to clouds to embedded devices.
This ticket is a natural evolution of us having implemented (and currently maintaining) WASM support.
### Motivation
The motivation is that we'll be able to run Rig from literally anything/anywhere that has a WASI runtime, like `wasmtime` or `wasmer`.
### Proposal
The current blockers are as follows:
* The `worker` crate requires some features from `tokio` that are fundamentally incompatible with WASI.
Therefore we will need to completely divorce the `worker::send` macro from the completion model implementations and add a WASI friendly client feature (potentially through `wasi-http` or something else).
Steps required to solve this:
* Fully divorce `worker` crate from `rig::completion::CompletionModel` implementations
* Add a HTTP implementation for a WASM/WASI-friendly HTTP client
* Test that it works
* Add it
Blocked by [RIG-996](https://linear.app/playgrounds-ai/issue/RIG-996/feat-allow-generic-clients-for-streaming-completions)
### Alternatives
Guía de contribución
Línea de trabajo
The issue is blocked by RIG-996 and requires deep changes to the `worker` crate and `rig::completion::CompletionModel`. Start by examining the `worker` crate's dependencies on `tokio` features. Look for the `worker::send` macro and the completion model implementations. Research `wasi-http` for a WASI-friendly HTTP client. Testing will involve building for a WASI target and running with `wasmtime` or `wasmer`.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- rust, wasm
- Área
- backend, cli, tooling
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100