Chuyển tới nội dung chính

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

CrateFeatureDefaultEnables
riverbase_corekernel✓Command, query, datastore and declarative macros (implies postgres).
postgresDiesel/Postgres backends (in-tree marker).
httpMinimal axum/aide impls for RiverbaseError. Not the portal stack.
nats-ioNATS stream bus for [riverbase.bus] nats:// URLs.
redisRedis stream bus for redis:// URLs.
yamlYAML config payloads and YAML process documents.
otelOpenTelemetry hooks; exporters stay owned by your process.
cfgfetchRemote, in-memory, optionally SOPS-encrypted config fetching.
cfgfetch-httpsFetch config over HTTPS.
cfgfetch-gitFetch config from a git remote.
cfgfetch-s3Fetch config from S3.
cfgfetch-ociFetch config from an OCI registry (ECR, GCR).
cfgfetch-allEvery cfgfetch backend.
riverbase_proc—No feature flags.

HTTP

CrateFeatureDefaultEnables
riverbase_httpauth✓JWT/OIDC validation, OAuth2 login, sessions, profiles.
websocketWebSocket bridge (CBOR framing).
rxdbRxDB replication endpoints.
sseServer-sent events from the message bus.
cfgfetchForwards riverbase_core remote config fetching.

Extensions

CrateFeatureDefaultEnables
riverbase_taskpostgres✓Postgres tracker store and migrations.
nats-ioNATS message consumer.
riverbase_filepostgres✓Postgres media metadata store.
fs✓Local filesystem backend.
aws-s3S3-compatible backend.
httpRead-only HTTP backend.
riverbase_formpostgres✓Persist submitted form data.
cliShip the riverbase_form binary.
dgenRender documents through the river_duckweed document engine (a separate crate).

Workspace dependency graph​

CrateDepends onOptional, by feature
riverbase_corenonenone
riverbase_procnonenone
riverbase_httpriverbase_corenone
riverbase_taskriverbase_corenone
riverbase_fileriverbase_corenone
riverbase_formriverbase_core, riverbase_procriver_duckweed (dgen, a separate crate)

Notable third-party foundations​

ConcernLibrary
Async runtimetokio
HTTPaxum 0.8, tower, tower-http
OpenAPIaide 0.15, schemars 0.9
Actorsractor 0.15
SQLdiesel 2.2, diesel-async 0.5, diesel_migrations
Validationgarde 0.22
Authorizationcasbin 2.10
Authjsonwebtoken 9, oauth2, tower-sessions
Storageopendal
Config formatshcl-rs, serde_yaml, toml