Skip to main content

Module core

Module core 

Source
Expand description

Core SSR infrastructure: escape-by-default HTML engine, per-request context, mount-aware typed routes, segment router, and ETag-backed embedded asset registry.

Re-exports§

pub use assets::AssetRegistry;
pub use assets::EmbeddedAsset;
pub use assets::core_asset_url;
pub use assets::core_assets;
pub use assets::core_manifest_hash;
pub use assets::serve_core_asset;
pub use ctx::HtmxInfo;
pub use ctx::MountPrefix;
pub use ctx::QueryMap;
pub use ctx::RequestCtx;
pub use ctx::RouteParams;
pub use ctx::SessionCtx;
pub use ctx::UserRole;
pub use headers::COOP;
pub use headers::CORP;
pub use headers::HSTS;
pub use headers::PERMISSIONS_POLICY;
pub use headers::REFERRER_POLICY;
pub use headers::WEB_UI_CSP;
pub use headers::WEB_UI_CSP_HTTPS;
pub use headers::X_CONTENT_TYPE_OPTIONS;
pub use headers::X_FRAME_OPTIONS;
pub use headers::html_cache_headers;
pub use headers::html_security_headers;
pub use headers::is_git_wire_path;
pub use html::Attr;
pub use html::HtmlBuf;
pub use html::Render;
pub use html::SanitizedHtml;
pub use html::TrustedHtml;
pub use html::url_encode_component;
pub use pwa::pwa_enabled;
pub use pwa::serve_pwa_route;
pub use route::AccessPolicy;
pub use route::AppRoute;
pub use router::Method;
pub use router::RouteDef;
pub use router::RouteMatch;
pub use router::Router;
pub use router::format_allow_header;

Modules§

assets
Standalone compile-time embedded asset registry with deterministic FNV-1a64 fingerprinting, weak ETag (304 Not Modified), and RFC 8246 immutable caching (governed by web-platform-baseline.sot.md WP-CACHE-2).
ctx
Per-request Web UI context: mount prefix, HTMX protocol metadata, session/CSRF state, parsed route params, and query parameters — eliminating post-render HTML rewriting.
headers
Single-source HTTP security and caching headers for arks serve Web UI responses (governed by web-platform-baseline.sot.md WP-HDR-1..4 and WP-CACHE-1).
html
Escape-by-default single-buffer HTML rendering engine with compile-time strict-CSP attribute guarantees (zero inline style="..." or on*="..." constructors).
pwa
Progressive Web App (/manifest.webmanifest, /sw.js, /offline) and well-known discovery endpoints (/.well-known/security.txt, /.well-known/api-catalog) governed by web-platform-baseline.sot.md WP-PWA-1..3 and rest-api-standards.sot.md RA-DSC-2..3.
route
Typed route URL builders and declarative per-route access policies.
router
Declarative segment-based HTTP router supporting static segments, named parameters (:id, :branch), tail wildcards (*path), and accurate 405 Method Not Allowed.