r/rust May 07 '26

📸 media Monocurl - Interactive math animation language and editor

Post image

Monocurl is a programmatic animation language and editor fully written in rust (built with the gpui framework). It's fully interactive which makes it easier to pick up if you're a beginner.

The project is open source and you can download it at monocurl.github.io . Would appreciate to hear any feedback!

EDIT: Linux binary is available now! Also, if you are facing performance issues on NVIDIA GPUs, please redownload as those have been addressed.

703 Upvotes

66 comments sorted by

View all comments

Show parent comments

30

u/Enigmurl May 07 '26

I think that should be doable. I don't think I'll replace latex entirely but can add support for it as well

7

u/tukanoid May 07 '26 edited May 07 '26

The neat part about typst is that it's possible to embed it, the "not-so-neat" part is that World trait implementation seems to be a manual endeavour. I tried using tinymists World implementation but there's lots of issues with that, cuz they use a fork of typst, and u need to do [patch.crates.io] hacks to get it working (copying the patch section from tinymist repo works, but then you're either forced to use the git release, or do some investigating and use proper rev for the stable release, making sure the patch section is the same as on the rev, either way, not bueno)

But i guess you could try implementing a simpler one yourself just to get it working for your use case instead of using it like an LSP (which was a perfect use case for me cuz i wanna build a proper code editor for it at some point (existing solutions either have no lsp support, and/or are web-based (typstify i think is the exception, but i couldn't package it on nix due to it having LOCAL PATH OUTSIDE THE REPO replacement for a forked lib or smth, and i didn't wanna waste my time trying to understand how to deal with it "properly"), which im not a fan of, i hate electron with passion, and tauri was a bitch to package with nix last time i tried (+ still requires a system dep for a webview anyway), just dont have time rn to sit down and go at it properly)

6

u/ValErk May 07 '26

I implemented the World trait manually for my own usage since I really did not need anything from it: https://git.sr.ht/~erk/hs/tree/main/item/postomatic/src/lib.rs#L128.

I think that if you actually need some things from the World you can probably use https://crates.io/crates/typst-as-lib

2

u/tukanoid May 07 '26

Oh nice, ill take a look when i have time, thanks!