Skip to main content

rorpc_parse/codegen/
mod.rs

1//! Code generation layer — converts parsed AST into `proc_macro2::TokenStream`.
2//!
3//! Each sub-module corresponds to one proc macro in `rorpc-macros`.
4//! `rorpc-macros/src/lib.rs` calls these functions directly; the only logic
5//! that lives there is the thin `proc_macro::TokenStream` ↔ `proc_macro2::TokenStream`
6//! conversion.
7
8pub mod error_derive;
9pub mod orpc;
10pub mod router;
11pub mod zod_ts;
12
13// Re-export the types that orpc-macros needs at the call site
14pub use error_derive::expand_orpc_errors;
15pub use orpc::{MethodShorthandArgs, OrpcArgs, expand_orpc};
16pub use router::{RouterArgs, expand_router};
17pub use zod_ts::derive_zod_ts;
18
19// Re-export runtime conversion utilities for use by the orpc runtime crate
20pub use zod_ts::{base_type_name, rust_type_to_ts_schema, to_schema_name};