Skip to main content

Crate crepuscularity_web

Crate crepuscularity_web 

Source
Expand description

HTML and WASM rendering backend for .crepus templates.

Use render_from_files for virtual-file builds, render_template_to_html for one-off templates, and render_bundle for the crepus web build JSON bundle format.

Modules§

build

Macros§

crepus_refs
Generate typed DOM accessors for all #id shorthand IDs reachable from a .crepus entry file.

Structs§

SsrDocument
Options for render_ssr_document.

Functions§

google_fonts_head_markup
<link rel="preconnect"> and one Google Fonts css2 stylesheet for the given families.
par_render_component_file
Render all named components from a multi-component .crepus file in parallel.
par_render_from_files
Render multiple entry points from a virtual file map in parallel (requires parallel feature).
render_bundle
JSON bundle written by crepus web build as crepus-bundle.json.
render_bundle_with_ssr
Parse crepus-bundle.json and render with optional SSR markers.
render_component_file_to_html
Render one named component from a multi-component .crepus source string.
render_from_files
Render an entry point from an in-memory file map — no filesystem access.
render_from_files_with_ssr
Like crate::render_from_files with optional SSR markers on the entry template.
render_nodes_to_html
Render an already parsed AST node list to escaped HTML.
render_ssr_document
Full HTML5 document: runs the template through render_template_to_html_with_ssr, then wraps result.
render_template_to_html
Parse a single .crepus template string and render it to escaped HTML.
render_template_to_html_with_hydration
Render a template to HTML with hydration markers injected.
render_template_to_html_with_ssr
Render like crate::render_template_to_html. With markers: true, emit hydration markers + manifest.
resolve_include_path
Resolve an include path, rejecting escapes outside base_dir.
serialize_ctx_for_ssr
Serialize TemplateContext::vars for the hydration manifest (scalars, lists of flat objects, nested maps of scalars).