From 7d713cabc2c2656ff99f34fe33ca15626b0bbf9d Mon Sep 17 00:00:00 2001 From: xfy Date: Tue, 16 Jun 2026 17:32:04 +0800 Subject: [PATCH] docs: document server-only optional dependencies in AGENTS.md --- AGENTS.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/AGENTS.md b/AGENTS.md index 66c7709..6a2ac39 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -73,6 +73,8 @@ Dioxus 0.7 fullstack project with **two independent gates** — the most common **Server-only helpers**: `src/auth/password.rs`, `src/auth/session.rs`, `src/api/auth.rs`, `src/api/comments/helpers.rs`, and several model helper methods are gated with `#[cfg(feature = "server")]` because they are only called from server function bodies, which are stripped in WASM builds. +**Server-only dependencies**: Crates that are only used behind `#[cfg(feature = "server")]` (e.g., `argon2`, `uuid`, `regex`, `pulldown-cmark`, `rand`, `http`, `sha2`, `hex`, plus the pre-existing optional server stack) are declared as `optional = true` in `Cargo.toml` and enabled only through the `server` feature. They are not compiled into the WASM frontend. + ## Dual API Architecture The server exposes two distinct API patterns: