Skip to content

Add live filesystem asset mode - #3

Merged
tomcatzh merged 3 commits into
mainfrom
codex/live-assets
Aug 18, 2026
Merged

Add live filesystem asset mode#3
tomcatzh merged 3 commits into
mainfrom
codex/live-assets

Conversation

@tomcatzh

@tomcatzh tomcatzh commented Aug 17, 2026

Copy link
Copy Markdown
Owner

Summary

  • add an opt-in live-assets Cargo feature without changing the existing EmbeddedSpa API
  • resolve file membership and strong ETags from fresh rust-embed metadata on every request in that mode
  • document the required filesystem-backed debug configuration and preserve the cached, zero-runtime-hash production default
  • exercise default and feature-enabled modes in the standard local check target

Why

Filesystem-backed rust-embed debug builds already read bytes from disk, but EmbeddedSpa cached ETags and file membership during construction. Editing or adding frontend output after startup could therefore return a stale validator or an internal error. The new feature keeps one long-lived SPA service while making its development view of disk coherent.

Developer impact

Applications can forward a local feature to embedded-spa/live-assets and run a normal debug build without rust-embed/debug-embed. The Axum fallback and handler code stay identical. Release builds continue to embed assets and should omit the development feature.

Validation

  • make check
  • EMBEDDED_SPA_TEST_ORIGIN_PORT=28090 EMBEDDED_SPA_TEST_NGINX_PORT=28091 make test-nginx
  • cargo package --allow-dirty
  • cargo +1.88.0 test --all-targets
  • cargo +1.88.0 test --all-targets --all-features
  • cargo test --release --all-targets --all-features

The Nginx matrix covered identity, gzip, and Brotli across eight MIME types, plus MISS, HIT, REVALIDATED, and conditional 304 behavior.

@tomcatzh
tomcatzh marked this pull request as ready for review August 18, 2026 00:05
@tomcatzh
tomcatzh merged commit 7a1236b into main Aug 18, 2026
4 checks passed
@tomcatzh
tomcatzh deleted the codex/live-assets branch August 18, 2026 02:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant