Skip to main content

Crate ctypst

Crate ctypst 

Source
Expand description

Safe, deterministic, embedded Typst for Rust applications.

Modules§

conformance
The frozen ctypst-measure-v1 request vectors, shipped with the crate so dependents (facades, ports) replay exactly the vectors of the release they link.
fonts
Embedded document font pack and its license metadata.
measure
Typed native adapter for the versioned measurement protocol.
wasm
WebAssembly boundary: the whole ctypst runtime for browsers and Node.

Structs§

CompileOutput
Successful Typst output and any explicitly accepted warnings.
CompileReport
One compilation result together with the project files it consulted.
CompileRequest
One compilation request.
Document
A finished document with metadata and page frames.
Engine
A reusable embedded Typst compiler with no ambient network or font access.
EngineBuilder
Builder for a capability-limited embedded Typst engine.
Limits
Finite resource limits applied to every engine.
RasterPage
One Typst page rendered as tightly packed RGBA8 pixels.

Enums§

DiagnosticsPolicy
How compilation warnings affect success.
Error
A ctypst policy, compilation, or export failure.
PageConstraint
Page-count requirement for one compilation.

Functions§

format_source
Format Typst source deterministically with Typstyle.
query_json
Query every metadata value carrying label and serialize it as JSON.

Type Aliases§

Result
Result type used by ctypst.