hugo icon indicating copy to clipboard operation
hugo copied to clipboard

convert.ToMath, WASI/Wasm modules feedback thread

Open bep opened this issue 6 months ago • 6 comments

Also see #12737.

convert.ToMath uses Katex to render. Katex is a JS library.

  • The WASM files are produced by Javy (a Shopify library). QuickJS is dynamically linked into the Katex WASM.
  • The WASI host is Wazero

Wazero's compiler is configured for:

  • AMD64, ARM64
  • Linux, Darwin (MacOS), Windows, FreeBSD.

If not in the list above, Wazero will fall back to an interpreter, which works on all platforms, but is much slower.

The goal of this "thread" is to collect feedback, as in: "it works on Solaris, but is very slow ..."

It is technically possible for Hugo to enable the compiler for other OSes, but we're currently limited by the test setup.

Also, the hours invested in setting this up just for KaTeX doesn't make much sense. This was a proof of concept. For further ideas of where this takes us, see #2737.

bep avatar Aug 09 '24 10:08 bep