I’m interested in building a typst math renderer similar to KaTeX/MathJax, so that people could write typst math instead of LaTeX in Markdown on sites like GitHub, with the equations rendered on the client side.
I’m aware that the typst engine has already been compiled to WASM, but it is quite heavy.
So I’m wondering whether it would be possible to build a lightweight typst math rendering engine in WASM, comparable in size to KaTeX or MathJax. Would it be possible to separate only the math rendering logic from the typst Rust crates, without loading the entire typst engine that handles full document layout?
My goal is to make the renderer as lightweight as possible.
BTW, do you think people would actually want to write Markdown + typst math instead of pure typst for blog posts, GitHub discussions, or similar contexts?