tower-sessions-rusqlite-store

Crates.iotower-sessions-rusqlite-store
lib.rstower-sessions-rusqlite-store
version0.14.1
created_at2024-02-15 19:52:58.575121+00
updated_at2025-11-17 15:43:47.22596+00
description(tokio-)rusqlite session store for `tower-sessions`.
homepagehttps://github.com/patte/tower-sessions-rusqlite-store
repositoryhttps://github.com/patte/tower-sessions-rusqlite-store
max_upload_size
id1141494
size52,646
Patrick Recher (patte)

documentation

https://docs.rs/tower-sessions-rusqlite-store

README

tower-sessions-rusqlite-store

(tokio-)rusqlite session store for tower-sessions.

tests crates.io codecov

Overview

This is a SessionStore for the tower-sessions middleware which uses tokio-rusqlite for handling SQLite databases.

It is directly based on the sqlx-store and uses the same folder structure as tower-session-stores for easy maintenance.

All contributions are welcome!

๐Ÿคธ Usage

Check out the counter example. Run it with cargo run --example counter.

sqlite

tokio-rusqlite switched to not having bundled enabled anymore by default with version 0.7 and this library followed that change. If you want to enable bundled do this in your Cargo.toml:

tower-sessions-rusqlite-store = "0.14.1"
tokio-rusqlite = { version = "0.7.0", features = ["bundled"] }

๐Ÿงช Tests

This crate is covered by integration- and unit-tests. The integration tests are copied from tower-session-stores and kept in the tests create. They can be run with cargo nextest run rusqlite_store_tests --test test_integration.

The unit tests are copied from maxcountryman/tower-sessions/memory-store and located directly in src/lib.rs. They can be run with cargo nextest run rusqlite_store_tests -p tower-sessions-rusqlite-store.

Run all tests with: cargo nextest run rusqlite_store_tests.

๐Ÿฆบ Disclaimer

This is an unofficial fork of the original tower-sessions-stores.

๐Ÿ™ Credits

Most credits go to the original authors of tower-sessions-stores and tower-sessions.

Commit count: 32

cargo fmt