1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/*
SPDX-License-Identifier: MIT OR Apache-2.0
SPDX-FileCopyrightText: © 2023-2026 Bruce D'Arcus and Citum contributors
*/
//! Citum JSON-RPC Server
//!
//! This crate provides a JSON-RPC server for citation and bibliography processing.
//! It wraps the `citum-engine` functionality in a request-response protocol suitable
//! for use with word processors, web applications, and other clients.
//!
//! ## Modes
//!
//! The server supports two transport modes:
//!
//! - **stdio (default)**: Newline-delimited JSON-RPC on stdin/stdout. No runtime overhead.
//! - **HTTP (optional, requires `http` feature)**: Exposes `/rpc` endpoint via axum.
//!
//! ## Example (stdio mode)
//!
//! ```bash
//! echo '{"id": 1, "method": "validate_style", "params": {"style_path": "path/to/style.yaml"}}' \
//! | citum-server
//! ```
//!
//! ## Features
//!
//! - `async`: Enable tokio runtime (required for HTTP)
//! - `http`: Enable HTTP server (implies async)
/// Server error types and conversions.
/// JSON-RPC request handling and stdio transport.
/// Optional HTTP transport built on axum.
pub use ServerError;
pub use dispatch;