A port of the Typst typesetting engine to MoonBit.
Dependencies
| Path | Contents |
|---|---|
| syntax/ | Port of typst-syntax: lexer, parser, syntax nodes, spans, Lines, paths and file ids (path.rs), packages and manifests (package.rs) |
| syntax/ast/ | Typed AST over the syntax tree (ast.rs) |
| unicode/ | Unicode property tables generated from the Rust crates upstream uses |
| codecs/ | Image codecs upstream gets from crates: PNG decode/encode (png, fdeflate), JPEG/GIF/WebP headers (zune-jpeg, gif, image-webp), EXIF (kamadak-exif), inflate |
| svg/ | Port of typst-svg (so far: WebImage data URLs) |
| oracle/ | Rust crate dumping upstream reference outputs (goldens) |
| tests/runner/ | Differential runner comparing the port against the goldens |
| kit/, kit/platform/ | Port of typst-kit (files, packages, fonts, diagnostics) and OS access for native and wasm |
| cli/ | Port of typst-cli: the typst command line |
| typst_assets/fonts/ | The fonts embedded into the CLI (generated) |
| scripts/ | upstream.sh (pinned checkout), goldens.sh (regenerate goldens) |
moon run cli --target native --release -- compile input.typ output.pdf
moon run cli --target wasm-gc -- compile input.typ 'page-{p}.svg'
moon run cli --target native -- compile --format html --features html in.typ
moon run cli --target native -- eval 'query(heading).len()' --in input.typ
moon run cli --target native -- fonts --variantsscripts/upstream.sh # checkout upstream at UPSTREAM_REV
scripts/goldens.sh # needs Rust; or `scripts/goldens.sh syntax ast`
moon run tests/runner --target native -- syntax [filter] [-v]
moon run tests/runner --target native -- ast [filter] [-v]Install
Download zipA port of the Typst typesetting engine to MoonBit.
Dependencies