Skip to main content

render_wasm_locale_shell_html

Function render_wasm_locale_shell_html 

Source
pub fn render_wasm_locale_shell_html(
    lang: &str,
    title: &str,
    description: &str,
    inline_glue: &str,
    wasm_file: &str,
) -> String
Expand description

Renders the self-contained zero-JS-file, zero-CSS-file index.html / 404.html shell for a single locale WASM bundle.

§Arguments

  • &str - BCP 47 HTML language code (for example "zh-CN", "en-US").
  • &str - Localized site title.
  • &str - Localized site description meta content.
  • &str - Transformed inline wasm-bindgen loader script.
  • &str - Exact <name>_bg.wasm filename inside ./pkg/.

§Returns

  • String - Complete HTML document referencing ./pkg/<wasm_file> with zero external .js or .css assets.