[package]
authors = [
"Johnathan Stevers <jmstevers@gmail.com>",
"Glen Henri J. De Cauwsemaecker <glen@plabayo.tech>",
]
categories = ["web-programming"]
description = "Datastar SDK for Rust"
documentation = "https://docs.rs/datastar"
edition = "2024"
homepage = "https://data-star.dev"
keywords = ["datastar", "backend", "axum", "rocket", "warp"]
license = "MIT"
name = "datastar"
readme = "README.md"
repository = "https://github.com/starfederation/datastar-rust"
version = "0.4.0"
rust-version = "1.89.0"
[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]
[features]
axum = ["dep:axum", "dep:serde", "dep:serde_json"]
rocket = ["dep:rocket", "rocket/json"]
tracing = ["dep:tracing"]
warp = [
"dep:warp",
"dep:serde",
"dep:serde_json",
"dep:serde_urlencoded",
"dep:bytes",
]
[dependencies]
axum = { version = "0.8.5", default-features = false, optional = true, features = [
"query",
"json",
] }
bytes = { version = "1", default-features = false, optional = true }
rocket = { version = "0.5", default-features = false, optional = true }
serde = { version = "1", default-features = false, optional = true, features = [
"derive",
] }
serde_json = { version = "1", default-features = false, optional = true, features = [
"std",
] }
serde_urlencoded = { version = "0.7", default-features = false, optional = true }
tracing = { version = "0.1", default-features = false, optional = true, features = [
"std",
] }
warp = { version = "0.4", default-features = false, optional = true }
[dev-dependencies]
asynk-strim = { version = "0.1" }
axum = { version = "0.8.5", default-features = false, features = [
"http1",
"tokio",
] }
chrono = { version = "0.4", default-features = false, features = ["clock"] }
indexmap = { version = "2.11", default-features = false, features = [
"serde",
"std",
] }
rocket = { version = "0.5", default-features = false }
serde = { version = "1", default-features = false, features = ["derive"] }
serde_json = { version = "1", default-features = false, features = ["std"] }
tokio = { version = "1", default-features = false, features = [
"macros",
"net",
"rt-multi-thread",
"sync",
"time",
] }
tokio-stream = { version = "0.1", default-features = false }
tracing = { version = "0.1", default-features = false, features = ["std"] }
tracing-subscriber = { version = "0.3", default-features = false, features = [
"env-filter",
"fmt",
] }
warp = { version = "0.4", default-features = false, features = ["test"] }
[lints.rust]
unreachable_pub = "deny"
elided_lifetimes_in_paths = "allow"
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(fuzzing)'] }
[lints.clippy]
all = { level = "warn", priority = -1 }
todo = "warn"
empty_enums = "warn"
enum_glob_use = "warn"
mem_forget = "warn"
unused_self = "warn"
filter_map_next = "warn"
needless_continue = "warn"
needless_borrow = "warn"
match_wildcard_for_single_variants = "warn"
if_let_mutex = "warn"
await_holding_lock = "warn"
imprecise_flops = "warn"
suboptimal_flops = "warn"
lossy_float_literal = "warn"
rest_pat_in_fully_bound_structs = "warn"
fn_params_excessive_bools = "warn"
exit = "warn"
inefficient_to_string = "warn"
linkedlist = "warn"
macro_use_imports = "warn"
option_option = "warn"
verbose_file_reads = "warn"
unnested_or_patterns = "warn"
str_to_string = "warn"
type_complexity = "allow"
[profile.dev]
opt-level = 1
[profile.dev.package."*"]
opt-level = 3
[profile.release]
codegen-units = 1
lto = "thin"
[[example]]
name = "axum-hello"
required-features = ["axum", "tracing"]
[[example]]
name = "axum-live-reload"
required-features = ["axum", "tracing"]
[[example]]
name = "axum-activity-feed"
required-features = ["axum", "tracing"]
[[example]]
name = "axum-watch"
required-features = ["axum"]
[[example]]
name = "axum-test-suite"
required-features = ["axum", "tracing"]
[[example]]
name = "rocket-hello"
required-features = ["rocket"]
[[example]]
name = "rocket-hello-channel"
required-features = ["rocket"]
[[example]]
name = "rocket-test-suite"
required-features = ["rocket"]
[[example]]
name = "warp-hello"
required-features = ["warp", "tracing"]
[[example]]
name = "warp-activity-feed"
required-features = ["warp", "tracing"]
[[example]]
name = "warp-test-suite"
required-features = ["warp", "tracing"]