trillium-static-compiled 0.6.0

compile-time static assets for trillium.rs
Documentation

📦 trillium-static-compiled — embedded static file serving

ci crates.io version docs.rs

Serves static files embedded directly into the binary at compile time. No runtime feature flag required. For serving files from the filesystem at runtime, see trillium-static.

Example

use trillium_static_compiled::static_compiled;

let handler = static_compiled!("./public").with_index_file("index.html");
// run with your chosen runtime adapter, e.g.:
// trillium_tokio::run(handler);

The static_compiled! macro embeds the directory contents at compile time, so the binary is self-contained — no filesystem access at runtime.

Safety

This crate uses #![forbid(unsafe_code)].

License