Based on WasmEdge's non-blocking network socket API and a Tokio-like async runtime, we are able to port popular database drivers and clients for the WasmEdge Runtime. This repo is a collection of examples accessing databases from inside WasmEdge applications.
- MySQL / MariaDB / TiDB relational DB example
- GreptimeDB time series DB example
- Postgres example
- Redis key value store example
- Qdrant vector DB example
Alternatively, you can use the Dapr SDK for Wasm to access database or KV store services attached to your Dapr sidecars. See examples here.
You can also check out
- A complete microservice demo with a HTTP server and a MySQL backend.
- An event-driven microservice demo with a Kafka queue and a MySQL backend.