Earlier quoted context omitted.
It works really well, I've written three blog posts using typst. Post: https://ezb.io/thoughts/interaction_nets/lambda_calculus/202... Typst source: https://github.com/enricozb/enricozb.github.io/blob/master/t...
Looks like typst has a "programming language" to do diagrams inline... that's a lot of effort to learn!
There is also CeTZ, which this article uses. It is highly inspired by TikZ and is just as powerful.