RaTeX: KaTeX-compatible LaTeX rendering engine in pure Rust

· web devtools · Source ↗

TLDR

  • Pure Rust LaTeX math layout engine targeting native apps, WASM, and servers without a WebView, shipping SDKs for iOS, Android, Flutter, and React Native.

Key Takeaways

  • Single Rust layout core emits a flat display list consumed by CoreGraphics, Skia, or Canvas 2D; identical output via native FFI and WASM.
  • CI runs golden-suite pixel diffs against KaTeX reference images; support table lists full coverage side-by-side.
  • Zero JS bundle cost for the core (WASM only); KaTeX ships ~280 kB and MathJax ~500 kB of JavaScript.
  • Built-in mhchem-style \ce and \pu for chemistry and units – a gap in swiftMath, flutter_math, and iosMath.
  • Memory model is predictable (no GC in hot path), relevant for mobile UI frame budgets and CI raster tests.

Hacker News Comment Review

  • No substantive HN discussion yet; the one comment positions RaTeX alongside Typst and MicroTeX as Rust-based TeX alternatives, without technical critique.

Original | Discuss on HN