#sqlx #session #axum #tower

axum_session_sqlx

📝 Sqlx Persistent Database layer for axum_session

1 unstable release

0.1.0 Apr 12, 2024

#39 in #tower

Download history 76/week @ 2024-04-08 23/week @ 2024-04-15 8/week @ 2024-04-22 18/week @ 2024-04-29 9/week @ 2024-05-06 17/week @ 2024-05-13 30/week @ 2024-05-20 40/week @ 2024-05-27 35/week @ 2024-06-03 21/week @ 2024-06-10

128 downloads per month

MIT/Apache

170KB
3K SLoC

Axum Session Sqlx

https://crates.io/crates/axum_session_sqlx Docs

📑 Overview

`axum_session_sqlx` provide's a Persistent SQL Database Storage for Axum Session.

🚨 Help

If you need help with this library or have suggestions please go to our Discord Group

📦 Install

Axum Session uses tokio. By Default Axum Session Sqlx uses postgres and tls-rustls so if you need tokio native TLS please add default-features = false to your cargo include for Axum Session Sqlx.

# Cargo.toml
[dependencies]
axum_session = { version = "0.14.0" }
# Postgres + rustls
axum_session_sqlx = { version = "0.1.0", features = [ "postgres", "tls-rustls"] }

📱 Cargo Feature Flags

You must choose a Database and a tls mode if you disable defaults.

Features Description
default postgres-rustls and tls-rustls
sqlite Enables sqlite usage.
postgres Enables postgres usage.
mysql Enables mysql usage.
tls-rustls Uses rustls for TLS encryption. Must choose one of these.
tls-native-tls Uses native-tls for TLS encryption. Must choose one of these.

🔎 Examples

You can locate the example files within the Repository

Dependencies

~40–55MB
~1M SLoC