1 unstable release

0.1.0 Oct 28, 2020

#1344 in WebAssembly


Used in yew-mermaid

MPL-2.0 license

1MB
1K SLoC

JavaScript 1K SLoC // 0.0% comments Rust 85 SLoC TypeScript 6 SLoC

KaTeX Wasmbind

Basic

Notice that this does not include css, so cdn still must be included.

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.12.0/dist/mermaid.min.css">
use katex_wasmbind::KaTeXOptions;

fn main() {
    let d = KaTeXOptions::display_mode();
    let i = KaTeXOptions::inline_mode();
    assert_ne!(d.render("\\frac12"), i.render("\\frac12"));
}

Todo list

  • Remove serde dependencies

Dependencies

~8–11MB
~200K SLoC