Skip to main content

Crate rorpc_parse

Crate rorpc_parse 

Source
Expand description

AST parsing utilities and code generation for rorpc proc macros.

This crate is a regular (non-proc-macro) library so all parsing logic is independently testable with normal #[test] functions.

§Layers

  • errors — structured Error type with span information and compile-time suggestions
  • types — AST-based wrapper extraction (Json<T>, Result<T,E>, etc.)
  • attributes#[serde(...)] and #[zod(...)] attribute parsing
  • functions — handler function signature analysis → functions::HandlerSignature
  • codegen — code generation; each sub-module corresponds to one proc macro

§Dependency direction

rorpc-macros  (proc-macro bridge, lib.rs only)
     └── rorpc-parse  (this crate — all implementation logic)
              └── syn, quote, proc-macro2, inventory

Re-exports§

pub use errors::Error;
pub use errors::Result;

Modules§

attributes
Attribute parsing for #[serde(...)] and #[zod(...)] annotations.
codegen
Code generation layer — converts parsed AST into proc_macro2::TokenStream.
errors
Structured error type for all orpc-parse parsing and validation failures.
functions
Handler function signature analysis.
types
AST-based type analysis utilities.