Typst is a markup-based typesetting system with a fast, embeddable compiler. This release adds it to the platform's document-processing microservice beside the existing report engine, so a script can produce a typeset PDF from a plain-text source and its data.
How it is built
- A native library, no external process A small Rust library exposes the Typst compiler through a C interface, and the service binds it with the Java Foreign Function and Memory API. One instance is shared safely across threads.
- Cross-compiled The library is built for Linux on amd64 and aarch64 and ships in the distribution and the container image.
- A closed world A document reads only the files sent with its request, images, imports and data, by path from the project root; nothing is read from disk, and a path outside the project is refused.
- The same fonts Typst uses the font directories the report engine uses, so both outputs set type alike.
How it is called
- HTTP
POST /typst/runcompiles an uploaded document to PDF, SVG or PNG, with inputs as key-value pairs; a document that does not compile is a400listing each diagnostic by line and column. - gRPC A
CompileTypstmethod for the application server. - Scripts
Ax.typst.Documenttakes a source, inputs and files, and renders withtoPDF,toSVG,toPNGor an asynchronous variant. - Guarded memory A PNG over 100 megapixels is refused, because its bitmap is native memory.
The service also gains an editor page with a live preview, for writing a template against real inputs before a script uses it.