Expand description
Code generation for foundry build.
foundry build does not compile HTML to machine code itself: it generates a
small Cargo project whose main.rs embeds the (escaped) HTML as a string
literal and calls crate::run_embedded, then shells out to cargo build --release. The helpers here produce that generated source, and are kept
separate from the CLI so they can be unit-tested.
Constants§
- CRATE_
NAME - Package name published on crates.io.
- CRATE_
VERSION - Version of
alia-foundryused for the crates.io fallback dependency.
Functions§
- escape_
html_ literal - Escape an HTML document so it can be embedded as a Rust string literal.
- foundry_
dep_ line - Build the
[dependencies]line pointing at the Foundry runtime. - generate_
cargo_ toml - Render the
Cargo.tomlof the generated project. - generate_
main_ rs - Render the
src/main.rsof the generated project.