tinymist/crates/tinymist-world
Myriad-Dreamin 84c211c7eb
feat: extract package implementation (#1647)
* feat: extract registry implementation

* feat: tinymist package

* fix: guard

* fix: guard 2

* feat: no specifier

* fix: temp_dir_in impl

* fix: impls

* feat: UniversePack::new

* feat: clone into memory

* feat: implement some pack for testing

* build: update cargo.lock

* feat: fit for web

* fix: guard
2025-04-16 18:19:03 +08:00
..
src feat: extract package implementation (#1647) 2025-04-16 18:19:03 +08:00
Cargo.toml feat: extract package implementation (#1647) 2025-04-16 18:19:03 +08:00
README.md feat: prepublish tinymist-world (#1248) 2025-02-02 14:51:49 +08:00

tinymist-world

Typst's World implementation for tinymist.

Example: Resolves a system universe from system arguments

let args = CompileOnceArgs::parse();
let universe = args
    .resolve_system()
    .expect("failed to resolve system universe");

Example: Runs a typst compilation

let world = verse.snapshot();
// in current thread
let doc = typst::compile(&world)?;
// the snapshot is Send + Sync
std::thread::spawn(move || {
    let doc = typst::compile(&world)?;
});