build: make rand optional and remove explicit getrandom dependency
This commit is contained in:
parent
726c6ec4e5
commit
d246adbb32
@ -165,6 +165,6 @@ Most tests use `#[cfg(all(test, feature = "server"))]` — they only run when th
|
||||
|
||||
## Notes
|
||||
|
||||
- `rand` + `getrandom` with `js` feature are required for Argon2 salt generation in WASM builds.
|
||||
- `rand` is optional and only enabled by the `server` feature; it is not compiled into the WASM frontend.
|
||||
- `#[allow(unused_mut, unused_variables)]` on `Write` component is intentional — `mut` signals are used in `#[cfg(target_arch = "wasm32")]` blocks stripped in server builds.
|
||||
- Server uses incremental rendering with 300s cache (`IncrementalRendererConfig` in `src/main.rs`).
|
||||
|
||||
@ -18,8 +18,7 @@ dotenvy = { version = "0.15", optional = true }
|
||||
tracing = { version = "0.1", optional = true, features = ["release_max_level_info"] }
|
||||
tracing-subscriber = { version = "0.3", optional = true }
|
||||
tower-http = { version = "0.6", optional = true }
|
||||
rand = { version = "0.8", features = ["getrandom"] }
|
||||
getrandom = { version = "0.2", features = ["js"] }
|
||||
rand = { version = "0.8", features = ["getrandom"], optional = true }
|
||||
http = "1"
|
||||
axum = { version = "0.8", optional = true, features = ["multipart"] }
|
||||
serde_json = "1.0"
|
||||
@ -64,6 +63,7 @@ server = [
|
||||
"dep:uuid",
|
||||
"dep:regex",
|
||||
"dep:pulldown-cmark",
|
||||
"dep:rand",
|
||||
"dep:dotenvy",
|
||||
"dep:tracing",
|
||||
"dep:tracing-subscriber",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user