Hacker News new | ask | show | jobs
by subset 46 days ago
Typst also has native scripting! For fun, I've been working on a small statistical distributions library in Typst, distro[^1] that uses plain Typst.

It's really nice having a decently powerful scripting component, it makes for some fun literate-style programming. You can package things up pretty easily for others to use, too[^2]. It even supports WASM plugins, if you want to go wild.

This package, conch[^3], renders a mini OS and terminal, based on Typst:

> A shell simulator that renders interactive terminal sessions in Typst, powered by a Rust WASM plugin.

> Type shell commands in your Typst document. Conch executes them against a virtual filesystem and renders a realistic terminal window — complete with colored output, syntax highlighting, and animation support.

[^1]: https://github.com/stochastical/distro

[^2]: https://typst.app/universe/package/distro

[^3]: https://typst.app/universe/package/conch/