5 releases
0.5.1 | Dec 4, 2024 |
---|---|
0.5.0 | Nov 28, 2024 |
0.5.0-rc9 | Nov 15, 2024 |
0.5.0-rc8 | Oct 19, 2024 |
0.5.0-rc7 | Aug 25, 2024 |
#816 in WebAssembly
1,627 downloads per month
Used in typstyle
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