nori/codegen/templates
Template-based code generation using the handles library.
Stores default templates and provides IR-to-context converters for TypeScript code generators.
Types
Values
pub const default_template_dir: String
Default template directory (relative to project root)
pub fn ir_to_ts_client_context(ir: ir.CodegenIR) -> ctx.Value
pub fn ir_to_ts_react_query_context(
ir: ir.CodegenIR,
) -> ctx.Value
pub fn ir_to_ts_swr_context(ir: ir.CodegenIR) -> ctx.Value
pub fn ir_to_ts_types_context(
ir: ir.CodegenIR,
config: TsConfig,
) -> ctx.Value
pub fn load_template(
template_dir: String,
name: String,
) -> String
Load a template from file, or fall back to the embedded default.