Open sourcing my live-preview TeX engine (write-up, benchmarks, VS Code extension and npm library!)

A while ago I made a post here on my Rust TeX engine, made for showing changes as fast as possible (https://www.reddit.com/r/LaTeX/comments/1wrvhig/realtime_latex_preview_in_wasm/). The project is now called TeXyoN (after tachyon, a hypothetical faster-than-light particle).
Today, I'm happy to release the source code, as well as a detailed write up with all the decisions I made, performance benchmarks, upstream bugs I found that I’m reporting and answers to some questions I got last time. All of that can be found on my blog: https://yendric.be/introducing-texyon/ (it is quite long, you may pick out the sections that seem interesting). The source code can be found here: https://github.com/texyon-org/texyon (feel free to leave a star :))
Together with the source code release, I'm releasing a vscode extension that demos TeXyoN's capabilities by running the engine natively & locally. It can be found here.
I'm also releasing an npm package that allows the community to create their own interactive TeX experiences in the browser. It compiles TeXyoN to wasm and bundles it with an easy to use API for live preview.
This is the initial release, so bugs are to be expected. Feel free to create issues on the repository. If you're concerned about correctness: I compared full-compile output on more than 9,000 documents against upstream TexLive. More on that is in the blog post.
I hope you enjoy the write-up, as well as using TeXyoN. Curious to hear what you think!
23
u/Electrical_Juice_446 4d ago edited 4d ago
Lots of hammers available nowadays for the same nail huh. Thanks, Claude!
(I can just use the auto-compile flag on TexStudio, if you hate pressing F5 after every keypress đŸ¤£)
16
u/AntiProton- 4d ago
Another day, another "I coded this new LaTeX engine/editor/compiler"...
3
u/Zombie_Shostakovich 4d ago
This is impressive and an interesting read. I'll be sure to try it.
2
u/AnxiousDoor2233 4d ago
That's impressive! Is there any way to integrate it in rmd/qmd workflow.
2
u/ShabbyBandwidth 4d ago
comparing against 9000 documents is the kind of check i want to see. what did the failures look like when they happened?
1
u/mkeee2015 4d ago
Forgive me for the stupid question. When multi-pass compilation is needed (for BibTex references, section number cross-referencing, equations number cross referencing), how do I force TeXyoN to perform the multipass?
3
u/mkeee2015 4d ago
Super interesting.
2
u/apfelkuchen06 4d ago
stopped reading at "based on xetex".
0
u/PercyLives 4d ago
Well done!
1
u/always_Smell_It_1st 4d ago
Iiiiinterrresting…..
-5
u/maxzang 4d ago
this is really cool. I did something similar in https://turbotex.app, i think we ended up on almost the same architecture. i would love to chat about it!
I tried both with snapshots and without snapshots just basically patching in the change optimistically and handling every edge case (which maybe now possible with LLMs to just build the massive edge case engine), snapshots is the way.
-1
u/MrReevers 4d ago
latexmk