Releases: phfneves/typst-kmp
Release list
v0.1.0-alpha01
The first published build. Nothing had ever been released from this project before, so this one
exists mainly to find out whether the artifacts resolve and run outside CI. The API may still
change.
What it does
- Compiles Typst documents to PDF (optionally targeting a PDF/A standard), SVG, PNG,
or JSON viatypst query. Asking for several formats at once reuses a single layout pass. - Returns diagnostics as structured data —
Diagnostic,Severity,TracePoint— rather than as
error strings to be parsed. - Resolves files and packages through a callback loop instead of filesystem access. A missing
@preview/cetz:0.3.0comes back as anUnresolvedvalue, you supply the bytes, and compilation
resumes. Path traversal is impossible because there are no paths, and it is the only design that
survives the browser, where fetching a package is inherently asynchronous. - Accepts fonts at runtime through
addFont, on top of the embedded bundle (DejaVu Sans Mono,
Libertinus Serif, New Computer Modern).
Published artifacts
| Target | Artifact |
|---|---|
| Android (arm64-v8a, armeabi-v7a, x86_64) | typst-kmp + typst-kmp-android-native, transitive |
| JVM (Linux x64/arm64, macOS x64/arm64, Windows x64) | typst-kmp-jvm + one classifier jar |
| iOS (device, simulator arm64 and x64) | typst-kmp-iosarm64, -iossimulatorarm64, -iosx64 |
| macOS (arm64, x64) | typst-kmp-macosarm64, -macosx64 |
| Linux (x64, arm64) | typst-kmp-linuxx64, -linuxarm64 |
| Windows (Kotlin/Native) | typst-kmp-mingwx64 |
Web (js and wasmJs, browser only) |
typst-kmp-js, typst-kmp-wasm-js + a webassets zip |
What this release has actually been through
Stated plainly because "builds" and "was run" are not the same thing. The same 13-test
commonTest suite runs on every platform below, on top of 15 Rust tests, and each run compiles a
real multi-page document.
Suite executed in CI: JVM on Linux x64 and Windows x64 — against the assembled jars, not just
the classes — Kotlin/Native on linuxX64, mingwX64, macosArm64 and iosSimulatorArm64, both
web targets in headless Chrome with the engine in a Web Worker, and Android on an x86_64 emulator.
Known limitations
- Binary size. Roughly 40 MB per architecture: 39.8 MB (arm64-v8a), 33.8 MB (armeabi-v7a),
43.3 MB (x86_64) and 41.4 MB for the Windows JVM library. About 10 MB of that is the embedded
font bundle. Android apps should rely on ABI splits or app bundles so a device only downloads
its own architecture. - Web is browser-only, and the module is fetched rather than bundled. Node has no DOM
Worker. Kotlin/JS does not replay a dependency's resources into your distribution, so the
WebAssembly module ships as awebassetszip that you unpack or host yourself, pointing
TypstConfig.webAssetBaseUrlat it. - Debug Android builds carry release-optimised native libraries, because an unoptimised Typst
is too slow to be useful. Pass-Ptypst.cargoProfile=devto change that. - watchOS and tvOS are not supported. Their Rust targets are tier 3 and would need a nightly
toolchain with-Z build-std. - Blobs are copied byte by byte on
wasmJs. Single-digit milliseconds for a PDF; large sets
of rendered pages pay more. Kotlin/JS gets this free, because there aByteArrayis an
Int8Array.
Under the hood
Typst 0.15.1 · Kotlin 2.4.10 · coroutines 1.10.2 · Android minSdk 24, compileSdk 37 · JVM
toolchain 21.
Three thin Rust facades over one shared core: JNI for the JVM and Android, a C ABI for
Kotlin/Native cinterop, and wasm-bindgen for the browser.