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 inventory;
Macros§
- embed_
assets - Include the asset table generated by
webx::builder()inbuild.rs.
Structs§
- Embedded
Asset - One file compiled into the executable.
- Embedded
Assets - A build-time directory tree of static files.
- SpaMiddleware
- SPA static file middleware.
Enums§
- Content
Encoding - How an
EmbeddedAsset’s payload is stored. - SpaSource
- Where a
SpaMiddlewaretakes its files from.
Constants§
- EMBED_
ENV - Environment variable that turns embedded assets off at runtime.