tower-serve-embedded-build
Build-time helper for tower-serve-embedded.
Call it from your crate's build.rs. It walks an asset directory, content-hashes every file with
BLAKE3, detects MIME types, and generates a Rust file (in OUT_DIR) containing the embedded
manifest (ASSETS) and a compile-time asset! macro. There are no proc macros — the generated
code is plain data plus a tiny macro_rules!, so IDE support stays sharp.
# Cargo.toml
[]
= "0.1"
// build.rs
Then pull the generated code into your crate with
tower_serve_embedded::embed!(), which brings the
ASSETS static and the crate-local asset! macro into scope.
See the tower-serve-embedded crate for the full
story, the runtime tower::Service, and runnable axum/actix/warp examples.
License
MIT OR Apache-2.0.