ling-web
↓ 986 downloadsSessions, flash, templates, CSRF, static files — Flask-style
Keywords web, flask, sessions, csrf, templates
lingfu install ling-webCode / Files (15)
Cargo.toml
[package]
name = "ling-web"
version = "0.1.8"
edition = "2021"
authors = ["Ling Lin <taellinglin@gmail.com>", "Sanny Lin <SannyLing53@gmail.com>"]
description = "灵网站 — the Flask-flavored layer on ling-http: sessions, flash messages, templates, static files, blueprints, CSRF."
license = "Apache-2.0 OR MIT"
readme = "README.md"
repository = "https://github.com/taellinglin/ling"
homepage = "https://ling-lang.org"
keywords = ["web", "flask", "sessions", "templates", "mvc"]
categories = ["web-programming::http-server"]
[dependencies]
ling-http = { workspace = true }
axum = { version = "0.8", features = ["json", "macros"] }
axum-extra = { version = "0.10", features = ["cookie"] }
tower = "0.5"
tower-http = { version = "0.6", features = ["fs", "trace"] }
# Not tower-sessions-sqlx-store: it pins its own sqlx/sqlite driver, which
# conflicts with the rusqlite already unified across the workspace (see
# src/session_store.rs — a small hand-written SessionStore over ling-http's
# Db instead). `default-features = false` opts out of the default
# `memory-store` (unused — same reason) but that also silently opts out of
# `axum-core`, which is what makes `Session` implement axum's
# `FromRequestParts` at all — without it, every handler taking a `Session`
# fails `Handler` trait bound checks. Needs >=0.14 specifically: 0.13's
# `axum-core` feature pulls axum-core ^0.4 (axum 0.7's version), which is
# incompatible with the axum 0.8 used here — confirmed via the crates.io
# index that 0.14 is the version that moved to axum-core ^0.5.0.
tower-sessions = { version = "0.14", default-features = false, features = ["axum-core"] }
async-trait = "0.1"
minijinja = { version = "2", features = ["loader"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
rand = "0.8"
subtle = "2.6"
thiserror = "1.0"
anyhow = "1.0"
tracing = "0.1"
[dev-dependencies]
tokio = { version = "1.37", features = ["rt-multi-thread", "macros"] }
reqwest = { version = "0.12", default-features = false, features = ["json", "cookies", "rustls-tls"] }
clap = { version = "4.4", features = ["derive"] }