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 contract_attr;
9pub mod error_derive;
10pub mod orpc;
11pub mod router;
12pub mod zod_ts;
13
14// Re-export the types that orpc-macros needs at the call site
15pub use contract_attr::{ContractArgs, expand_contract};
16pub use error_derive::expand_orpc_errors;
17pub use orpc::{MethodShorthandArgs, OrpcArgs, expand_orpc};
18pub use router::{RouterArgs, expand_router};
19pub use zod_ts::derive_zod_ts;
20
21// Re-export runtime conversion utilities for use by the orpc runtime crate
22pub use zod_ts::{base_type_name, rust_type_to_ts_schema, to_schema_name};