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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
//! # taut-rpc
//!
//! End-to-end type-safe RPC between a Rust/axum server and a TypeScript client.
//!
//! `taut-rpc` makes Rust types the single source of truth for an HTTP/SSE/WebSocket
//! API: a procedural macro records each procedure's signature into an intermediate
//! representation (IR), and a separate codegen step turns that IR into a static
//! `.ts` client. Changing a Rust signature surfaces as a TypeScript compile error
//! at the call site, with no runtime schema fetch on boot.
//!
//! This crate provides the public runtime API: the [`Router`] used to mount
//! procedures onto an `axum::Router`, the [`TautError`] trait that constrains
//! procedure error types, and the [`Validate`] bridge for input/output validation.
//!
//! ## v0.1 features
//!
//! - **Validation** (Phase 4): the [`Validate`] derive macro and [`validate`]
//! module provide declarative input/output validation. Constraints are
//! declared with `#[validate(...)]` attributes and emitted into the IR so
//! the generated TypeScript client can mirror server-side checks. See
//! [`validate::run`], [`validate::collect`], [`validate::nested`], and
//! [`validate::check`] for the runtime helpers used by generated code.
//!
//! See [`SPEC.md`](https://github.com/anthropics/taut-rpc/blob/main/SPEC.md) for
//! the full design — wire format, type mapping, IR schema, and versioning rules.
//! The [`IR_VERSION`] constant tracks SPEC §9.
//!
//! For ergonomic imports use `use taut_rpc::prelude::*;` — see [`prelude`].
pub use ;
pub use ;
pub use ;
pub use ;
pub use TautType;
pub use ;
pub use ;
/// Current IR schema version. Tracks SPEC §9 — codegen rejects mismatches.
pub const IR_VERSION: u32 = 1;