Skip to main content

Module spa

Module spa 

Source
Expand description

Static file hosting, including files compiled into the executable.

ⓘ
// build.rs: webx::builder().web_root("wwwroot").build()
#[webx::main(embed)]
async fn main() {
    Host::builder().use_spa("wwwroot").build()
}

Re-exports§

pub use webx_spa::inventory;

Macros§

embed_assets
Include the asset table generated by webx::builder() in build.rs.

Structs§

EmbeddedAsset
One file compiled into the executable.
EmbeddedAssets
A build-time directory tree of static files.
SpaMiddleware
SPA static file middleware.

Enums§

ContentEncoding
How an EmbeddedAsset’s payload is stored.
SpaSource
Where a SpaMiddleware takes its files from.

Constants§

EMBED_ENV
Environment variable that turns embedded assets off at runtime.