3 releases
0.5.0-rc9 | Nov 15, 2024 |
---|---|
0.5.0-rc8 | Oct 19, 2024 |
0.5.0-rc7 | Aug 25, 2024 |
#1216 in WebAssembly
414 downloads per month
580KB
13K
SLoC
reflexo-typst
Bridge Typst to Web Rendering, with power of typst.
See Typst.ts
lib.rs
:
reflexo-typst 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::PackageRegistry
: 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::CompilerWorld
world::CompilerWorld
: retrievingworld::CompilerFeat
, provides a common implementation of::typst::World
.
-
compile
: Convenient services overworld::CompilerWorld
, which also shows how to use theworld::CompilerWorld
.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
~75MB
~1M SLoC