#tower-sessions #session #tower #surrealdb #axum #cookies

tower-sessions-surrealdb-store

SurrealDB session store. Not for direct use; see the tower-sessions crate for details.

7 releases (4 breaking)

0.5.1 Dec 7, 2024
0.5.0 Sep 18, 2024
0.4.0 Mar 21, 2024
0.3.0 Feb 1, 2024
0.1.0 Dec 28, 2023

#852 in Network programming

Download history 58/week @ 2024-09-19 22/week @ 2024-09-26 21/week @ 2024-10-03 3/week @ 2024-10-10 25/week @ 2024-11-21 3/week @ 2024-11-28 245/week @ 2024-12-05 53/week @ 2024-12-12

61 downloads per month

MIT license

34KB
303 lines

tower-sessions-surrealdb-store

SurrealDB session stores for tower-sessions.

This package is in beta. It has automated tests for the basic functionality, but is untested in production.

🎨 Overview

  • 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.

Using surrealdb-nightly

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.

🤸 Usage Example

See examples/counter.rs.

Dependencies

~77MB
~1.5M SLoC