Skip to main content

Module rust

Module rust 

Source
Expand description

Rust source code generator

Converts an ArchitectureState into compilable Rust source that uses the actual AimDB 0.5.x API: #[derive(RecordKey)], BufferCfg, and AimDbBuilder::configure().

Uses [quote] for quasi-quoting token streams and prettyplease for formatting the output into idiomatic Rust.

Functions§

generate_binary_cargo_toml
Generate Cargo.toml content for a binary crate.
generate_cargo_toml
Generate Cargo.toml content for a common crate.
generate_hub_cargo_toml
Generate Cargo.toml for the hub binary crate ({project.name}-hub).
generate_hub_main_rs
Generate src/main.rs for the hub binary crate.
generate_hub_schema_rs
Generate src/schema.rs for the hub binary crate.
generate_hub_tasks_rs
Generate src/tasks.rs stub for the hub binary crate.
generate_lib_rs
Generate lib.rs content for a common crate.
generate_main_rs
Generate src/main.rs for the named binary crate.
generate_rust
Generate a complete Rust source file from architecture state.
generate_schema_rs
Generate schema.rs for a common crate (no @generated header).
generate_tasks_rs
Generate src/tasks.rs scaffold for the named binary crate.
to_pascal_case
Convert a kebab-case or snake_case string to PascalCase.
to_snake_case
Convert a PascalCase string to snake_case.