mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-10-18 19:30:27 +08:00
So both the docs and agents know `desktop/` is its own project, with commands run from there.
837 B
837 B
radicle-httpd
Rust backend for the Radicle web explorer, released together with
radicle-search (see RELEASE.md at the repository root).
Code conventions
- Each route module exposes
pub fn router(ctx: Context) -> Router; handlers are privateasync fns - Handler signature:
async fn handler(State(ctx): State<Context>, Path(rid): Path<RepoId>) -> impl IntoResponse - Annotate the error type on Ok:
Ok::<_, Error>(Json(data)) - All response structs:
#[serde(rename_all = "camelCase")] - Optional fields:
#[serde(skip_serializing_if = "Option::is_none")] - Use
json!()macro for inline JSON;immutable_response()/cached_response()helpers for Cache-Control headers - Module structure:
api/v1/handlers,api/json/serialization helpers,api/query.rsquery param types,api/error.rserror types