Skip to main content

Module contract_attr

Module contract_attr 

Source
Expand description

Code generation for the #[contract] attribute macro.

Wraps fn main() to automatically call rorpc::generate_contract().output(path) in debug builds. Supports compile-time path expressions including env!(), concat!(), string literals, and constants.

Resolution order when no argument is provided:

  1. [package.metadata.rorpc] client_path in Cargo.toml (read at macro expansion time)
  2. env!("RORPC_CLIENT_PATH") fallback

Structs§

ContractArgs
Parsed arguments for #[contract(...)] attribute.

Functions§

expand_contract
Expand #[contract(...)] fn main() { ... } into: