11 releases
| 0.5.0-rc6 | Jul 15, 2024 |
|---|---|
| 0.5.0-rc5 | Jun 27, 2024 |
| 0.5.0-rc4 | May 18, 2024 |
| 0.5.0-rc3 | Apr 5, 2024 |
| 0.2.2 | Jun 10, 2023 |
#1346 in Filesystem
64 downloads per month
Used in typst-preview
550KB
12K
SLoC
typst-ts-compiler
See Typst.ts
lib.rs:
Typst.ts compiler library.
This library is used to compile Typst code into a document and export it into various artifacts. See https://github.com/Myriad-Dreamin/typst.ts/tree/main/exporter for more information about the available exporters.
The library consists of three parts:
-
model: low-level abstraction specific to the compiler, which defines:font::FontSlot: the way to load a font.vfs::AccessModel: how the compiler accesses a storage.package::Registry: how the compiler obtains data about a package.
-
world: The world is the core part of the library, which maintains all the data for typst compilation.vfs::Vfs: retrievingvfs::AccessModel, provides a virtual file system for theworld::CompilerWorldworld::CompilerWorld: retrievingworld::CompilerFeat, provides a common implementation oftypst::World.
-
service: Convenient services overworld::CompilerWorld, which also shows how to use theworld::CompilerWorld.service::CompileDriver: A driver for the compiler. Examples:- Single thread (Sync): https://github.com/Myriad-Dreamin/typst.ts/blob/main/cli/src/main.rs
- Multiple thread (Async): https://github.com/Enter-tainer/typst-preview-vscode/blob/main/src/main.rs
Dependencies
~87MB
~1.5M SLoC