Crates and features
All crates share one version (0.2.0) and edition 2021, and need Rust 1.78 or newer. They are
distributed under the RFX JSC Proprietary License (LicenseRef-RFX-Proprietary), not an
open-source license; see LICENSE and COPYRIGHT in
riverbase-io/riverbase. Add them as git dependencies:
cargo add <crate> --git https://github.com/riverbase-io/riverbase --features <a,b>
Core
| Crate | Feature | Default | Enables |
|---|---|---|---|
riverbase_core | kernel | ✓ | Command, query, datastore and declarative macros (implies postgres). |
postgres | Diesel/Postgres backends (in-tree marker). | ||
http | Minimal axum/aide impls for RiverbaseError. Not the portal stack. | ||
nats-io | NATS stream bus for [riverbase.bus] nats:// URLs. | ||
redis | Redis stream bus for redis:// URLs. | ||
yaml | YAML config payloads and YAML process documents. | ||
otel | OpenTelemetry hooks; exporters stay owned by your process. | ||
cfgfetch | Remote, in-memory, optionally SOPS-encrypted config fetching. | ||
cfgfetch-https | Fetch config over HTTPS. | ||
cfgfetch-git | Fetch config from a git remote. | ||
cfgfetch-s3 | Fetch config from S3. | ||
cfgfetch-oci | Fetch config from an OCI registry (ECR, GCR). | ||
cfgfetch-all | Every cfgfetch backend. | ||
riverbase_proc | — | No feature flags. |
HTTP
| Crate | Feature | Default | Enables |
|---|---|---|---|
riverbase_http | auth | ✓ | JWT/OIDC validation, OAuth2 login, sessions, profiles. |
websocket | WebSocket bridge (CBOR framing). | ||
rxdb | RxDB replication endpoints. | ||
sse | Server-sent events from the message bus. | ||
cfgfetch | Forwards riverbase_core remote config fetching. |
Extensions
| Crate | Feature | Default | Enables |
|---|---|---|---|
riverbase_task | postgres | ✓ | Postgres tracker store and migrations. |
nats-io | NATS message consumer. | ||
riverbase_file | postgres | ✓ | Postgres media metadata store. |
fs | ✓ | Local filesystem backend. | |
aws-s3 | S3-compatible backend. | ||
http | Read-only HTTP backend. | ||
riverbase_form | postgres | ✓ | Persist submitted form data. |
cli | Ship the riverbase_form binary. | ||
dgen | Render documents through the river_duckweed document engine (a separate crate). |
Workspace dependency graph
| Crate | Depends on | Optional, by feature |
|---|---|---|
riverbase_core | none | none |
riverbase_proc | none | none |
riverbase_http | riverbase_core | none |
riverbase_task | riverbase_core | none |
riverbase_file | riverbase_core | none |
riverbase_form | riverbase_core, riverbase_proc | river_duckweed (dgen, a separate crate) |
Notable third-party foundations
| Concern | Library |
|---|---|
| Async runtime | tokio |
| HTTP | axum 0.8, tower, tower-http |
| OpenAPI | aide 0.15, schemars 0.9 |
| Actors | ractor 0.15 |
| SQL | diesel 2.2, diesel-async 0.5, diesel_migrations |
| Validation | garde 0.22 |
| Authorization | casbin 2.10 |
| Auth | jsonwebtoken 9, oauth2, tower-sessions |
| Storage | opendal |
| Config formats | hcl-rs, serde_yaml, toml |