Expand description
§typst-pack
Bundle a Typst project and its fonts and packages into one file that can compile on another machine.
A pack (.typk) contains an entrypoint, the project’s source and data files,
and the exact package and font requirements found during a representative
compile. Packages and fonts can be embedded for offline, portable compilation
or recorded as external requirements for the receiving application to supply.
Use the CLI to create, inspect, compile, and extract packs. Use the Rust library to build the same workflows in editors, web services, object-storage systems, and other applications.
This is unrelated to Typst’s bundle output (typst-bundle). A pack is portable
input for later compilation, not a collection of rendered output files.
§Features
- Put a whole Typst project in one
.typkfile, including images and data. - Vendor imported Typst Universe packages so compilation works offline.
- Embed selected fonts so output does not depend on fonts installed elsewhere.
- Compile to PDF, PNG, SVG, or experimental HTML without reading ambient project files.
- Replace a contained project file for one compile without changing the pack.
- Inspect or extract a pack before using it.
- Build packs from the filesystem, entirely in memory, or with caller-supplied OpenDAL storage.
- Keep filesystem access and network download support as separate build choices.
§CLI
Install the command-line tool:
cargo install typst-pack-cli# Pack a named source file, vendoring all observed packages:
typst-pack create path/to/project/main.typ
# Pack a specific entrypoint, embedding the fonts the document uses:
typst-pack create letter.typ --embed-fonts
# See what a pack contains:
typst-pack inspect project.typk
# Compile a pack without network access:
typst-pack compile project.typk output.pdf
# Replace a contained placeholder for one compilation:
typst-pack compile invoice.typk customer.pdf --override assets/logo.png customer-logo.png
# PNG or SVG output, page selection, reproducible builds:
typst-pack compile project.typk "page-{0p}.png" --ppi 300 --pages 1-3
typst-pack compile project.typk reproducible.pdf --creation-timestamp 1700000000
# Guarantee no network access (fails instead of downloading packages):
typst-pack compile project.typk --offline
# Experimental HTML export:
typst-pack compile project.typk out.html
typst-pack create project/main.typ --target html --features html
# Unpack a pack back into an editable project directory:
typst-pack extract project.typk -o project/For PNG and SVG output, {p} is the one-based source page number, {0p} and
{n} are zero-padded aliases, and {t} is the source-document page count.
Multi-page output needs a page placeholder. All output paths are checked for
duplicates before anything is written.
See CLI examples for additional create, compile, extraction, and Pack Override commands.
§Project files
create includes every eligible regular file beneath the project root, not
only files reached by the representative compile. A root .typkignore uses
Gitignore-style ordered rules. It is included in the pack; nested
.typkignore files are ordinary files. Symlinks, unsupported entries, and any
path containing a .typk component are rejected.
The representative compile selects package and font requirements. Its target,
inputs, date, features, and control flow do not change which project files are
included. Pack a valid placeholder when a document needs per-recipient data,
then replace it with --override PACK_PATH FILE at compile time.
§Packages and fonts
Observed packages are embedded by default. --no-vendor-packages records each
exact package and complete tree identity instead; compilation then requires the
application’s configured package sources to provide a matching tree. --offline
prevents downloads during both creation and compilation.
Fonts are external by default. --embed-fonts stores selected font containers
except those shipped by Typst; --include-typst-embedded-fonts stores those as
well. Mind font licenses when redistributing embedded files.
§Output formats
PDF and HTML produce one artifact. PNG and SVG produce one artifact for each
selected source page. HTML is experimental in Typst. The complete intentional
differences from typst compile are listed in the
CLI parity inventory.
§Library
The core in-memory packing, creation, and compilation APIs need no crate features. Add filesystem support when the library should read local projects, package directories, and system fonts:
[dependencies]
typst-pack = { version = "0.6", features = ["embedded-fonts", "fs"] }The fs feature links no network client. Add egress only when filesystem
assembly should download missing Typst Universe packages.
The library contract describes identity, dependency fulfillment, environment independence, write policies, retry material, and partial effects. The OpenDAL guide documents asynchronous storage integration.
§Common workflows
Each entry links to a compile-checked example on docs.rs, so the code shown there is verified against the release you are reading about.
| Task | Start here |
|---|---|
| Pack a project directory from disk | FilesystemPackAssembler |
| Pack in-memory bytes with no filesystem | Pack::builder |
| Supply packages yourself and resume creation | create |
| Swap a contained file for one compile | PackOverrideSet |
| Read and write packs through object storage | OpenDAL guide |
The shortest complete example — build a pack in memory and encode it:
use typst_pack::Pack;
use typst_pack::pack_archive::encode;
let pack = Pack::builder("main.typ")
.file("main.typ", b"= Report\n".to_vec())
.expect("main.typ is a valid project path")
.build()
.expect("the entrypoint is contained");
let archive = encode(&pack).expect("the pack fits the reference encode limits");
assert!(!archive.as_slice().is_empty());Pack::builder does not discover dependencies: the pack contains exactly the
files added to it. Use create when the library should run dependency
discovery over values the caller already holds, and a Pack Assembler when it
should also read those values from a source.
Pack creation is stateless and resumable. If the representative compile reaches
a package that is not in the supplied catalog, creation reports that exact
specification instead of failing; add its tree and call create again. The
package-reading feature provides official registry URL construction and
bounded .tar.gz expansion without choosing an HTTP client, and OpenDAL
provides read_package and insert_read_package for the same lifecycle over
configured operators.
A Pack Override can replace only a project path already contained in the pack. It cannot add a path or change package or font requirements.
§Feature flags
fs: Read projects, local packages, caches, and system fonts from the filesystem; unavailable on wasm targets.egress: Download missing packages during filesystem assembly; impliesfsandpackage-readingand links HTTP/TLS dependencies.package-reading: Construct registry URLs, read bounded package archives, and expand them without choosing a transport.opendal: Use caller-polled OpenDAL reads and writes with caller-supplied operators and runtime support.embedded-fonts: Make Typst’s bundled fonts available to assembly and external fulfillment.diagnostics: Retain source context for first-party diagnostic presentation adapters.parallel: Export independent page artifacts in parallel.
All features are opt-in. Featureless creation and compilation remain available
on wasm32-unknown-unknown.
§Migrating
§Migrating to 0.6
Version 0.6 standardizes storage vocabulary on read and write. The
rename was generated from git diff fb610cb..HEAD; there are no compatibility
aliases.
| Before 0.6 | 0.6 |
|---|---|
Feature package-acquisition | package-reading |
Module typst_pack::opendal::publication | typst_pack::opendal::write |
gather_filesystem_project | read_filesystem_project |
gather_filesystem_font_catalog | read_filesystem_fonts |
gather_filesystem_package | read_filesystem_package |
FilesystemPackageAuthority::acquire | FilesystemPackageAuthority::read |
acquire_package_archive | read_package_archive |
opendal::pack_assembly::acquire_project | read_project |
opendal::pack_assembly::acquire_fonts | read_fonts |
opendal::pack_assembly::acquire_package | read_package |
opendal::pack_archive::acquire_pack_archive | read_pack_archive |
opendal::publication::publish_pack_archive | opendal::write::write_pack_archive |
publish_package_cache_archive | write_package_cache_archive |
publish_pack_extraction_plan | write_pack_extraction_plan |
publish_compilation_artifacts | write_compilation_artifacts |
publish_pack_extraction_plan_to_filesystem | write_pack_extraction_plan_to_filesystem |
publish_pack_extraction_plan_to_filesystem_with_fault_probe | write_pack_extraction_plan_to_filesystem_with_fault_probe |
publish_compilation_artifacts_to_filesystem_paths | write_compilation_artifacts_to_filesystem_paths |
resolve_filesystem_publication_paths | resolve_filesystem_write_paths |
CompilationArtifactPathPublicationError::publication_error | CompilationArtifactPathWriteError::write_error |
insert_acquired_package | insert_read_package |
pack_archive::acquire / acquire_file | pack_archive::read / read_file |
pack_archive::publish / publish_file | pack_archive::write / write_file |
Type families follow the same mechanical rules:
| Before 0.6 | 0.6 |
|---|---|
*Acquisition* | *Read* |
*Publication* | *Write* |
*GatherError | *ReadError |
Acquired* | Read* |
PublicationPolicy | WritePolicy |
PublicationKeyOutcome | WriteKeyOutcome |
PackArchiveAcquisitionError | PackArchiveReadError |
ProjectAcquisitionRequest | ProjectReadRequest |
PackageAcquisitionLimits | PackageReadLimits |
AcquiredPackageInsertionError | ReadPackageInsertionError |
FilesystemPackageAcquisitionError | FilesystemPackageAuthorityReadError |
PackExtractionPublicationProgress | PackExtractionWriteProgress |
CompilationArtifactPublicationReceipt | CompilationArtifactWriteReceipt |
FilePublicationPolicy | FileWritePolicy |
OpenDAL operation errors are no longer generic over an OperatorResolver error
type. Resolver failures are retained as boxed sources. Match the operation’s
typed cause, then downcast the source to the concrete error supplied by your
resolver:
use typst_pack::opendal::pack_assembly::ProjectReadErrorCause;
if let ProjectReadErrorCause::ResolveOperator(source) = error.cause() {
if let Some(resolver_error) = source.downcast_ref::<MyResolverError>() {
handle_resolver_error(resolver_error);
}
}Compilation and encoding now have convenient reference limits. Use
compile(request) and pack_archive::encode(pack) for the built-in profiles;
use compile_with_limits, encode_with_limits, write_pack_with_limits, or
save_pack_with_limits to narrow them. Limits remain required at trust
boundaries, including archive decoding, package expansion, stream/file reads,
and filesystem or OpenDAL read requests. Invalid custom limit configurations
are programmer errors and panic during construction.
Pack Extraction and Compilation Output Artifact writes now share the crate-root
*WriteEntry, *WriteProgress, and *WriteReceipt types across filesystem and
OpenDAL adapters. Write errors retain progress where relevant and expose
CommitCertainty; successful receipts do not make an atomicity claim.
The request-origin and inventory wrappers were removed:
CompilationRequestInventory, TypstInputsInventory, PackOverridesInventory,
PackOverrideInventoryEntry, EffectiveRequestValue, RequestValueOrigin, and
CompilationOutputOrigins. Configure values directly on
PackCompilationRequest. Fulfillment provenance remains available through
PackageTreeFulfillment, FontContainerFulfillment, and the fulfillment report;
CompilationAccessTrace also remains available on a result.
CanonicalIdentity and CanonicalIdentityRole now implement Display,
rendering as role:digest. Equality is unchanged and still covers role, schema,
and algorithm, so compare whole identity values rather than the rendered string.
Dependency-fulfillment failures report what is missing. Every
CompilationFulfillmentIssue message names the package or font container
involved instead of dumping a Debug projection, and
InvalidCompilationFulfillmentSet no longer summarizes a single issue as a
count. Present these failures through issues(): the aggregate Display is a
summary, not the detail.
typst-pack inspect gained a required fonts section listing the external Font
Requirements a recipient must supply, and its embedded fonts lines now use the
shorter role:digest identity form. typst-pack compile reports each
unfulfilled dependency as a hint with the recovery to try.
The egress feature no longer links rustls-pemfile. Custom --cert PEM
parsing moved to rustls-pki-types, which absorbed it; behavior is unchanged,
including that a file with no PEM section adds no trust anchor.
§Migrating to 0.5
Version 0.5 added the optional OpenDAL adapter. Existing builds that do not
enable opendal are unaffected. Applications that enable it must select their
own backend, transport, runtime, credentials, and retry behavior. See
Migrating to 0.5 for dependency,
composition, target, identity, and cache guidance.
§Migrating to 0.4
Version 0.4 made clean breaks without compatibility aliases:
- Remove Resource Slot and Resource Provider APIs; pack placeholders and replace them with Pack Overrides.
- Rename Dagger arguments:
source->project,entrypoint->input,inputs->sysInputs,noPackages->noVendorPackages,sourceDateEpoch->creationTimestamp, andCreationTarget->TypstTarget. - Change creation from a directory plus
--entrypoint/--outputtocreate <INPUT> [OUTPUT]. - Replace
compile_pack(request)withcompile(request); the arbitrary-Worldoverload and publicPackWorldbuilder are removed. - Read accepted compilation results from
CompilationReport::outcome()orresult();compile_report,PackCompileError,CompilationAttempt, andCompilationExecutionControlsare removed. - Replace
CreationTargetandCompilationTargetwithTypstTarget, and configure time with oneDocumentTime. - Replace
PackerwithFilesystemPackAssemblerConfig,FilesystemPackAssembler, andFilesystemPackAssemblyRequest. - Read representative-compile warnings from
PackAssemblyReport::warnings;PackReportis removed. - Inspect domain values through
Packaccessors rather than Pack Manifest records. - Handle shared Pack consistency failures through
PackInvariantError::issues(). - Replace
OutputFormatplusCompileOptionsrequest construction with aCompilationOutputSpecificationvariant. - Replace
extractwithplan_pack_extractionfollowed bywrite_pack_extraction_plan_to_filesystemand an explicitFilesystemMergePolicy.
The unstable Pack format remains version 1, but discovery and Resource Slot fields were removed in place. Old fields and aliases are not accepted.
§Pack format
A pack is a Zip archive, conventionally named *.typk, with this layout:
typst-pack.toml manifest
project/<path> project files, root-relative
packages/<ns>/<name>/<version>/<path> embedded package files
fonts/<file> embedded font filesExample manifest:
format-version = 1
[project]
entrypoint = "main.typ"
[[packages.vendored]]
spec = "@preview/cetz:0.3.4"
tree-digest = "0123456789abcdef0123456789abcdef"
tree-identity-kind = "complete-package-tree"
tree-identity-schema = "typst-pack-complete-package-tree-v1"
tree-identity-algorithm = "typst-hash128-0.15"
file-count = 12
byte-length = 34567
[[fonts]]
path = "fonts/ibm-plex-sans.ttf"
families = ["IBM Plex Sans"]
[metadata]
name = "Quarterly report"
authors = ["Jane Doe"]The encoder writes Deflate-compressed version-1 archives. Readers accept safe interoperable ZIP encodings and member orderings, ignore safe unknown entries, and reject unknown format versions, unsafe paths, unsupported entry kinds, and inconsistent manifests. Decoding and re-encoding preserves Pack semantics, not exact ZIP bytes, compression settings, timestamps, unknown entries, or member order. Format version 1 is explicitly unstable.
§Development
Minimum verification:
cargo fmt --all -- --checkcargo clippy --workspace --all-targets --all-features -- -D warningscargo test --workspace --all-featuresdagger check
Maintainers changing the embedded compiler must follow the embedded Typst upgrade procedure.
§License
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
§Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
Modules§
- opendal
- OpenDAL integration
- pack_
archive - Versioned Pack Archive encoding, decoding, read, and write.
Structs§
- Canonical
Identity - A role-separated canonical semantic identity.
- Compilation
Access Observation - One canonical dependency observation made by the embedded engine.
- Compilation
Access Trace - Canonical accesses retained by a semantic compilation result.
- Compilation
Artifact - One file produced by compiling a pack.
- Compilation
Artifact Path Write Error - A failure while writing Compilation Output Artifacts to caller-selected paths.
- Compilation
Artifact Write Entry - One completed Compilation Output Artifact write entry.
- Compilation
Artifact Write Error - Compilation
Artifact Write Progress - Completed Compilation Output Artifact entries in canonical artifact order.
- Compilation
Artifact Write Receipt - Evidence from successful write of one Compilation Result’s artifacts.
- Compilation
Diagnostic - A structured compiler or exporter diagnostic.
- Compilation
Document Summary - The stable document facts reached before complete export.
- Compilation
Fulfillment Report - Operational dependency evidence surrounding one official semantic result.
- Compilation
Fulfillment Set - Compilation
Fulfillment SetError - Compilation
Report - The immutable account of an accepted compilation through complete export.
- Compilation
Request Rejection - A rejected semantic request.
- Compilation
Result - The semantic result of an accepted Pack compilation request.
- Dependency
Discovery Rejection - Complete compiler evidence from a rejected Dependency Discovery run.
- Diagnostic
Hint - A structured hint attached to an official diagnostic.
- Diagnostic
Producer - The exact embedded implementation that emitted a diagnostic.
- Diagnostic
Tracepoint - One structured tracepoint attached to an official diagnostic.
- Discovery
Specification - The semantic controls for one Dependency Discovery run.
- Filesystem
Font Container Issue - One selected filesystem entry whose bytes are not a valid Font Container.
- Filesystem
Font Source - One explicitly configured source of Font Containers.
- Filesystem
Font Survey Error - All safely detectable issues found by one filesystem font survey.
- Filesystem
Font Validation Error - Every invalid Font Container found while validating selected entries.
- Filesystem
Pack Assembler - Reusable filesystem Pack Assembly over configured concrete authorities.
- Filesystem
Pack Assembler Config - Reusable host policy for the reference filesystem Pack Assembler.
- Filesystem
Pack Assembly Creation Error - A Pack Creation failure retained by the filesystem Pack Assembler.
- Filesystem
Pack Assembly Discovery Error - An invalid Discovery Specification retained by filesystem Pack Assembly.
- Filesystem
Pack Assembly Profile - Named finite resource policy for one filesystem Pack Assembly run.
- Filesystem
Pack Assembly Request - Per-run roots, Discovery Specification controls, embedding choices, and Pack metadata.
- Filesystem
Package Authority - The concrete Package Authority used by the reference filesystem workflows.
- Filesystem
Package Survey Error - All safely detectable issues found by one filesystem package survey.
- Filesystem
Project Survey Error - All safely detectable issues found by one filesystem structural survey.
- Font
Catalog - Exactly the Font Containers Pack Creation may select faces from, in the order the caller chose.
- Font
Catalog Entry - One position in a Font Catalog.
- Font
Catalog Face - One face a catalog offers to Pack Creation at one explicit position.
- Font
Container - The exact validated bytes of one standalone font file or multi-face collection.
- Font
Container Face - One readable face of a validated Font Container.
- Font
Container Fulfillment - Font
Face Identity - The exact identity of one face within a Font Container.
- Font
Fulfillment Report - Operational evidence retained for one exact font fulfillment.
- Font
Requirement - One exact Font Container and the faces required from it.
- Html
Output Specification - Semantic controls for HTML output.
- Implementation
Identity - The exact embedded implementation that participated in a result.
- Invalid
Compilation Fulfillment Set - Complete canonical evidence that a fulfillment set is not exact.
- Limits
- Validated finite ceilings for the resources used by one operation.
- Logical
Span - A source location expressed in the Pack’s logical namespace.
- Pack
- A portable pack of a Typst project.
- Pack
Archive Bytes - Exact uniquely owned bytes of one Pack Archive.
- Pack
Assembly Diagnostic Context - Opaque source context retained for first-party creation diagnostics.
- Pack
Assembly Report - The terminal report of a successful filesystem Pack Assembly run.
- Pack
Builder - Builds a
Packfrom in-memory data. - Pack
Compilation Request - An explicit semantic compilation request bound to one validated
Pack. - Pack
Compilation Warning - A Pack-owned semantic request warning.
- Pack
Creation Input - Every value borrowed by one stateless Pack Creation invocation.
- Pack
Extraction Entry - One canonical destination-relative entry in a Pack Extraction Plan.
- Pack
Extraction Plan - An owned, immutable, destination-independent Pack Extraction Plan.
- Pack
Extraction Plan Error - A failure while constructing a Pack Extraction Plan.
- Pack
Extraction Selection - The embedded dependency content selected for one Pack Extraction Plan.
- Pack
Extraction Write Entry - One completed entry in Pack Extraction write-plan order.
- Pack
Extraction Write Error - Pack
Extraction Write Progress - Completed Pack Extraction write entries in write-plan order.
- Pack
Extraction Write Receipt - Evidence from successful write of one Pack Extraction Plan.
- Pack
Font - A font embedded in a pack.
- Pack
Font Catalog Face - One ordered face in the exact Pack Font Catalog.
- Pack
Invariant Error - A violation of the invariants shared by every
Packconstruction path. - Pack
Metadata - The optional
[metadata]section. - Pack
Override Set - An immutable set of contained project-file replacements bound to one Pack.
- Package
Catalog - The validated Package Trees Pack Creation may select, keyed canonically by exact package specification.
- Package
Catalog Entry - One Package Catalog entry under its claimed exact specification.
- Package
Catalog Error - A failure while constructing a
PackageCatalog. - Package
Fulfillment Report - Operational evidence retained for one exact package fulfillment.
- Package
Read Failure - An external attempt to read one exact package specification failed.
- Package
Read Failures - Package Read Failures keyed by exact package specification.
- Package
Requirement - One exact package specification and Package Tree identity.
- Package
Tree - Every addressable regular file beneath one read package root.
- Package
Tree Error - A failure while constructing a
PackageTree. - Package
Tree Fulfillment - Page
Selection - A selection of one-indexed source page ranges.
- PdfOutput
Specification - Semantic controls for PDF output.
- PdfStandards
Validation Error - A lossless projection of an official PDF standards validation error.
- PngOutput
Specification - Semantic controls for PNG output.
- Project
Snapshot - One stabilized set of project files: canonical root-relative paths, exact bytes, and the entrypoint they were assembled around.
- Project
Snapshot Assembly - Assembles a
ProjectSnapshotfrom already selected path-and-bytes entries. - Project
Snapshot Error - A failure while assembling a
ProjectSnapshot. - Read
Package - One successful read from the concrete filesystem Package Authority.
- Resource
Kind - A resource identifier from one operation-specific profile.
- SvgOutput
Specification - Semantic controls for SVG output.
Enums§
- Canonical
Identity Role - The semantic role of a
CanonicalIdentity. - Commit
Certainty - Knowledge about whether one attempted destination effect completed.
- Compilation
Access Kind - The kind of dependency request made by the embedded engine.
- Compilation
Access Outcome - The stable outcome of one dependency request.
- Compilation
Artifact Write Issue - One independently detectable issue before Compilation Output Artifact write.
- Compilation
Fulfillment Issue - One exact-set deviation detected before private World materialization.
- Compilation
Fulfillment SetIssue - Compilation
Operation Outcome - A Pack-owned operational outcome after request acceptance and before a semantic result.
- Compilation
Output Specification - The required tagged semantic output request.
- Compilation
Report Outcome - Compilation
Request Issue - One independently detectable issue in a rejected semantic request.
- Compilation
Status - Whether the official compiler and exporter accepted the compilation.
- Creation
Timestamp - The source of the document creation datetime recorded in PDF metadata.
- Diagnostic
Phase - The official phase that emitted a diagnostic.
- Diagnostic
Severity - Official Typst diagnostic severity.
- Discovery
Specification Error - A failure while constructing a
DiscoverySpecification. - Document
Time - The exact or explicitly absent time used by Typst document-time requests.
- Filesystem
Destination Entry Kind - A destination entry kind relevant to merge preflight.
- Filesystem
Font Entry Kind - The kind of an eligible filesystem entry that cannot become a Font Container.
- Filesystem
Font Issue - One independently detectable filesystem font survey issue.
- Filesystem
Font Operation - The filesystem operation that failed while reading a Font Catalog.
- Filesystem
Font Read Error - A failure while reading a Font Catalog from configured filesystem sources.
- Filesystem
Merge Policy - An explicit policy for writing planned files to the filesystem.
- Filesystem
Pack Assembly Clock - Clock policy used when a run does not supply an exact Document Time.
- Filesystem
Pack Assembly Error - A failure while packing a project directory.
- Filesystem
Package Authority Read Error - A typed failure from the concrete filesystem Package Authority.
- Filesystem
Package Entry Kind - The kind of a filesystem entry that cannot become a package file.
- Filesystem
Package Issue - One independently detectable filesystem Package Tree survey issue.
- Filesystem
Package Operation - The filesystem operation that failed while reading a Package Tree.
- Filesystem
Package Read Error - A failure while reading a Package Tree from the filesystem.
- Filesystem
Project Entry Kind - The kind of an eligible filesystem entry that cannot become a project file.
- Filesystem
Project Issue - One independently detectable filesystem project survey issue.
- Filesystem
Project Operation - The filesystem operation that produced an I/O error while reading.
- Filesystem
Project Policy Error - A failure while parsing the root filesystem Project Ignore Policy.
- Filesystem
Project Read Error - A failure while reading a Project Snapshot from the filesystem.
- Filesystem
Write Error Cause - The concrete cause retained by a failed filesystem plan write.
- Filesystem
Write Path Error - A failure to derive one filesystem write root from output paths.
- Filesystem
Write Phase - The filesystem phase reached by a plan write attempt.
- Filesystem
Write Preflight Issue - One safely detectable issue found before filesystem writes begin.
- Font
Container Error - A failure to construct a validated Font Container.
- Font
Disposition - Whether a Font Container’s bytes travel inside the Pack or must be fulfilled externally when the Pack is compiled.
- Implementation
Role - The role of an embedded implementation in compilation.
- Limit
Error - A mandatory resource ceiling was exceeded or could not be accounted.
- Output
Format - The Document Formats and Page Formats a pack can be compiled to.
- Pack
Build Error - A failure while building a pack in memory.
- Pack
Creation Error - A failure that creates no Pack.
- Pack
Creation Outcome - What one Pack Creation invocation produced.
- Pack
Extraction Entry Role - The semantic role of one Pack Extraction entry.
- Pack
Extraction Plan Issue - One independently detectable issue in a Pack Extraction projection.
- Pack
Invariant Issue - One independently detectable violation of a whole-Pack invariant.
- Pack
Override SetError - A Pack-owned Pack Override preflight rejection.
- Pack
Path Role - The role a path plays in a Pack invariant.
- Package
Archive Read Error - A failure while reading exact Package Archive bytes from a stream.
- Package
Catalog Issue - One independently detectable issue in a supplied Package Catalog.
- Package
Disposition - Whether a Package Tree’s bytes travel inside the Pack or must be fulfilled externally when the Pack is compiled.
- Package
Read Error - A failure while reading one Package Tree.
- Package
Read Failure Reason - The stable operational reason for a Package Read Failure.
- Package
Tree Issue - One independently detectable issue in a supplied Package Tree.
- Project
Snapshot Issue - One independently detectable issue while assembling a
ProjectSnapshot. - Tracepoint
Kind - The kind of one official diagnostic tracepoint.
- Typst
Target - The Typst document model selected for creation or compilation.
- Write
KeyOutcome - The outcome observed for one successfully completed write entry.
Constants§
- FILE_
EXTENSION - The conventional file extension for packs.
- IGNORE_
FILE - The root-relative path of the filesystem Project Ignore Policy file.
- PACKAGE_
REGISTRY_ NAMESPACE - The one package namespace the registry serves. A specification in any other namespace is resolved from wherever its namespace lives, which the registry layout says nothing about.
- PACKAGE_
REGISTRY_ URL - The URL of the package registry these helpers describe the layout of, the official Typst Universe registry. There is no standardized registry protocol, so the layout is this registry’s own.
- VERSION
- The typst-pack release and embedded Typst engine versions.
Traits§
- Resource
- One kind of resource governed by a finite ceiling.
Functions§
- compile
- Compiles a validated Pack and retains operational fulfillment evidence.
- compile_
with_ limits - Compiles a validated Pack under explicit resource ceilings.
- create
- Runs one representative Typst request over the supplied inputs and issues the Pack it selected, or reports the packages it needed and was not given.
- expand_
package_ archive - Expands the archive bytes served for one exact package specification into the Package Tree creation accepts as a resolved tree for it.
- package_
archive_ url - The URL of the archive holding one exact package specification’s Package Tree.
- parse_
page_ selection - Parses a textual page selection like
1,3-5,9-. - plan_
pack_ extraction - Produces the complete semantic projection of one Pack before destination I/O.
- read_
filesystem_ fonts - Reads one ordered Font Catalog from explicitly configured sources.
- read_
filesystem_ package - Reads every addressable regular file beneath one filesystem package root.
- read_
filesystem_ project - Reads one Project Snapshot from the reference filesystem source.
- read_
package_ archive - Reads exact Package Archive bytes under the expansion profile’s compressed-byte ceiling.
- resolve_
external_ font_ requirements - Resolves the Pack’s external Font Requirements from exact source-container bytes.
- resolve_
filesystem_ write_ paths - Resolves output paths into one existing filesystem root and relative targets.
- typst_
embedded_ font_ containers - Typst’s embedded fonts as validated containers, in Typst’s own order.
- write_
compilation_ artifacts_ to_ filesystem_ paths - Writes a succeeded Compilation Result through caller-selected destination-relative filesystem paths.
- write_
pack_ extraction_ plan_ to_ filesystem - Writes a Pack Extraction Plan under one explicit filesystem policy.
Type Aliases§
- Compilation
Limit Error - A mandatory compilation export ceiling was exceeded or could not be accounted.
- Compilation
Limits - Mandatory finite resource ceilings for compilation artifact export.
- Compilation
Resource - A resource bounded during compilation artifact export.
- Filesystem
Font Limit Error - A filesystem font source exceeded a mandatory reading ceiling.
- Filesystem
Font Limits - Mandatory finite resource ceilings for filesystem Font Catalog reading.
- Filesystem
Font Resource - A resource bounded during filesystem Font Catalog reading.
- Filesystem
Package Limit Error - A filesystem package exceeded a mandatory reading ceiling.
- Filesystem
Package Limits - Mandatory finite resource ceilings for filesystem Package Tree reading.
- Filesystem
Package Resource - A resource bounded during filesystem Package Tree reading.
- Filesystem
Project Limit Error - A filesystem project exceeded a mandatory reading ceiling.
- Filesystem
Project Limits - Mandatory finite resource ceilings for filesystem project reading.
- Filesystem
Project Resource - A resource bounded during filesystem project reading.
- Package
Expansion Limit Error - A package archive exceeded a mandatory expansion ceiling.
- Package
Expansion Limits - Mandatory finite resource ceilings for Package Archive Expansion.
- Package
Expansion Resource - A resource bounded during Package Archive Expansion.
- Page
Range - A one-indexed, inclusive page range with optional open ends.