0xPlaygrounds / 0xPlaygrounds/rig
feat: WASI support
- Lingua principale
- Rust
- Stelle
- 8.6k
- Fork
- 959
- Merge medio
- 4h 32m
- PR unite (30g)
- 117
Descrizione
- [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
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
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`.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- rust, wasm
- Ambito
- backend, cli, tooling
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100