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
|
## 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.
|
- `#[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`).
|
- 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 = { version = "0.1", optional = true, features = ["release_max_level_info"] }
|
||||||
tracing-subscriber = { version = "0.3", optional = true }
|
tracing-subscriber = { version = "0.3", optional = true }
|
||||||
tower-http = { version = "0.6", optional = true }
|
tower-http = { version = "0.6", optional = true }
|
||||||
rand = { version = "0.8", features = ["getrandom"] }
|
rand = { version = "0.8", features = ["getrandom"], optional = true }
|
||||||
getrandom = { version = "0.2", features = ["js"] }
|
|
||||||
http = "1"
|
http = "1"
|
||||||
axum = { version = "0.8", optional = true, features = ["multipart"] }
|
axum = { version = "0.8", optional = true, features = ["multipart"] }
|
||||||
serde_json = "1.0"
|
serde_json = "1.0"
|
||||||
@ -64,6 +63,7 @@ server = [
|
|||||||
"dep:uuid",
|
"dep:uuid",
|
||||||
"dep:regex",
|
"dep:regex",
|
||||||
"dep:pulldown-cmark",
|
"dep:pulldown-cmark",
|
||||||
|
"dep:rand",
|
||||||
"dep:dotenvy",
|
"dep:dotenvy",
|
||||||
"dep:tracing",
|
"dep:tracing",
|
||||||
"dep:tracing-subscriber",
|
"dep:tracing-subscriber",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user