csv-codegen 0.2.3

A Rust procedural macro that transforms CSV data into safe, zero-cost code. Generate match arms, loops, and nested queries directly from CSV files, ensuring type safety and deterministic code generation.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use csv_codegen::csv_template;

fn main() {
    // This should fail with a syntax error inside the template
    // and the error should point to the template braces, not the entire macro
    csv_template!("../fruits.csv", #find(name == "Orange") {
        const CITRUS_ID: u32 = #({id}_u32);
        // This next line has a syntax error (missing semicolon)
        let bad_syntax: u32 = #({id}_u32) + 1
        println!("This is wrong too");
    });
}