omnia-postgres
PostgreSQL backend for the Omnia WASI runtime, implementing the wasi-sql interface.
Uses deadpool-postgres connection pooling with optional TLS via rustls. Supports multiple named pools for connecting to several databases from a single runtime.
MSRV: Rust 1.93
Configuration
| Variable | Required | Default | Description |
|---|---|---|---|
POSTGRES_URL |
yes | Default pool connection URI | |
POSTGRES_POOL_SIZE |
no | 10 |
Default pool size |
POSTGRES_POOLS |
no | Comma-separated extra pool names | |
POSTGRES_URL__<NAME> |
per pool | URI for named pool | |
POSTGRES_POOL_SIZE__<NAME> |
no | inherited | Pool size for named pool |
Usage
use Backend;
use Client;
let options = from_env?;
let client = connect_with.await?;
License
MIT OR Apache-2.0