7170be016d
Adds `memory-serve` 2.1 as an optional workspace dependency, a `build.rs` that runs `load_directory` only when `CARGO_FEATURE_EMBED_WEB` is set, a `web_assets` module serving `web/dist` at `/` with SPA fallback (200 OK) for unknown client-side routes, and a feature-gated integration test. The default build (no feature) compiles and tests cleanly without `web/dist`. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
6 lines
134 B
Rust
6 lines
134 B
Rust
fn main() {
|
|
if std::env::var("CARGO_FEATURE_EMBED_WEB").is_ok() {
|
|
memory_serve::load_directory("../../web/dist");
|
|
}
|
|
}
|