SurrealDB session stores for tower-sessions
.
This package is in beta. It has automated tests for the basic functionality, but is untested in production.
- Compact encoding: session data is stored in the database using MessagePack, a compact self-describing serialization format.
- Automatic table setup: only provide a database connection and a table name; the table will be created if it does not exist.
In Config.toml
:
tower-sessions-surrealdb-store = { version = "*", features = ["surrealdb-nightly"], default-features = false }
The default-features = false
is necessary, otherwise you'll install both surrealdb
and surrealdb-nightly
and get conflicts.
See examples/counter.rs
.