1#![doc = include_str!(concat!(env!("OUT_DIR"), "/README.md"))]
2
3pub const VERSION: &str = concat!(
5 env!("CARGO_PKG_VERSION"),
6 " (Typst ",
7 env!("TYPST_PACK_ENGINE_VERSION"),
8 ")"
9);
10
11mod compile;
12mod creation;
13mod domain;
14mod embedded;
15#[cfg(feature = "fs")]
16mod error_display;
17#[cfg(feature = "fs")]
18mod filesystem_write;
19mod font_catalog;
20#[cfg(feature = "fs")]
21mod fs_assembly;
22#[cfg(feature = "fs")]
23mod fs_fonts;
24#[cfg(feature = "fs")]
25mod fs_packages;
26#[cfg(feature = "fs")]
27mod fs_project;
28#[cfg(feature = "fs")]
29mod fs_traversal;
30mod identity;
31mod limits;
32mod manifest;
33#[cfg(feature = "opendal")]
34pub mod opendal;
35mod pack;
36pub mod pack_archive;
37mod pack_extraction;
38mod package_catalog;
39mod package_failure;
40#[cfg(feature = "package-reading")]
41mod package_reading;
42mod paths;
43mod payload;
44mod project_snapshot;
45mod read_layout;
46#[cfg(feature = "opendal")]
47mod redacted_error;
48mod world;
49mod world_trace;
50mod write;
51
52#[cfg(all(feature = "diagnostics", feature = "fs"))]
53#[doc(hidden)]
54pub mod cli_support;
55
56pub use compile::{
57 CompilationAccessKind, CompilationAccessObservation, CompilationAccessOutcome,
58 CompilationAccessTrace, CompilationArtifact, CompilationDiagnostic, CompilationDocumentSummary,
59 CompilationFulfillmentIssue, CompilationFulfillmentReport, CompilationFulfillmentSet,
60 CompilationFulfillmentSetError, CompilationFulfillmentSetIssue, CompilationLimitError,
61 CompilationLimits, CompilationOperationOutcome, CompilationOutputSpecification,
62 CompilationReport, CompilationReportOutcome, CompilationRequestIssue,
63 CompilationRequestRejection, CompilationResource, CompilationResult, CompilationStatus,
64 CreationTimestamp, DiagnosticHint, DiagnosticPhase, DiagnosticProducer, DiagnosticSeverity,
65 DiagnosticTracepoint, FontContainerFulfillment, FontFulfillmentReport, HtmlOutputSpecification,
66 ImplementationIdentity, ImplementationRole, InvalidCompilationFulfillmentSet, LogicalSpan,
67 OutputFormat, PackCompilationRequest, PackCompilationWarning, PackOverrideSet,
68 PackOverrideSetError, PackageFulfillmentReport, PackageTreeFulfillment, PageRange,
69 PageSelection, PdfOutputSpecification, PdfStandardsValidationError, PngOutputSpecification,
70 SvgOutputSpecification, TracepointKind, compile, compile_with_limits, parse_page_selection,
71 resolve_external_font_requirements,
72};
73pub use creation::{
74 DependencyDiscoveryRejection, DiscoverySpecification, DiscoverySpecificationError,
75 PackCreationError, PackCreationInput, PackCreationOutcome, create,
76};
77pub use domain::{DocumentTime, TypstTarget};
78#[cfg(feature = "fs")]
79pub use filesystem_write::{
80 CompilationArtifactPathWriteError, CompilationArtifactWriteError,
81 CompilationArtifactWriteIssue, FilesystemDestinationEntryKind, FilesystemMergePolicy,
82 FilesystemWriteErrorCause, FilesystemWritePathError, FilesystemWritePhase,
83 FilesystemWritePreflightIssue, PackExtractionWriteError, resolve_filesystem_write_paths,
84 write_compilation_artifacts_to_filesystem_paths, write_pack_extraction_plan_to_filesystem,
85};
86#[cfg(all(feature = "fs", fuzzing))]
87#[doc(hidden)]
88pub use filesystem_write::{
89 FilesystemWriteFaultProbe, write_pack_extraction_plan_to_filesystem_with_fault_probe,
90};
91#[cfg(feature = "embedded-fonts")]
92pub use font_catalog::typst_embedded_font_containers;
93pub use font_catalog::{
94 FontCatalog, FontCatalogEntry, FontCatalogFace, FontContainer, FontContainerError,
95 FontContainerFace, FontDisposition,
96};
97#[cfg(feature = "fs")]
98pub use fs_assembly::{
99 FilesystemPackAssembler, FilesystemPackAssemblerConfig, FilesystemPackAssemblyClock,
100 FilesystemPackAssemblyCreationError, FilesystemPackAssemblyDiscoveryError,
101 FilesystemPackAssemblyError, FilesystemPackAssemblyProfile, FilesystemPackAssemblyRequest,
102 PackAssemblyDiagnosticContext, PackAssemblyReport,
103};
104#[cfg(feature = "fs")]
105pub use fs_fonts::{
106 FilesystemFontContainerIssue, FilesystemFontEntryKind, FilesystemFontIssue,
107 FilesystemFontLimitError, FilesystemFontLimits, FilesystemFontOperation,
108 FilesystemFontReadError, FilesystemFontResource, FilesystemFontSource,
109 FilesystemFontSurveyError, FilesystemFontValidationError, read_filesystem_fonts,
110};
111#[cfg(feature = "fs")]
112pub use fs_packages::{
113 FilesystemPackageAuthority, FilesystemPackageAuthorityReadError, FilesystemPackageEntryKind,
114 FilesystemPackageIssue, FilesystemPackageLimitError, FilesystemPackageLimits,
115 FilesystemPackageOperation, FilesystemPackageReadError, FilesystemPackageResource,
116 FilesystemPackageSurveyError, ReadPackage, read_filesystem_package,
117};
118#[cfg(feature = "fs")]
119pub use fs_project::{
120 FilesystemProjectEntryKind, FilesystemProjectIssue, FilesystemProjectLimitError,
121 FilesystemProjectLimits, FilesystemProjectOperation, FilesystemProjectPolicyError,
122 FilesystemProjectReadError, FilesystemProjectResource, FilesystemProjectSurveyError,
123 IGNORE_FILE, read_filesystem_project,
124};
125pub use identity::{CanonicalIdentity, CanonicalIdentityRole};
126pub use limits::{LimitError, Limits, Resource, ResourceKind};
127pub use manifest::PackMetadata;
128pub use pack::{
129 FILE_EXTENSION, FontFaceIdentity, FontRequirement, Pack, PackBuildError, PackBuilder, PackFont,
130 PackFontCatalogFace, PackInvariantError, PackInvariantIssue, PackPathRole, PackageRequirement,
131};
132pub use pack_extraction::{
133 PackExtractionEntry, PackExtractionEntryRole, PackExtractionPlan, PackExtractionPlanError,
134 PackExtractionPlanIssue, PackExtractionSelection, plan_pack_extraction,
135};
136pub use package_catalog::{
137 PackageCatalog, PackageCatalogEntry, PackageCatalogError, PackageCatalogIssue,
138 PackageDisposition, PackageTree, PackageTreeError, PackageTreeIssue,
139};
140pub use package_failure::{PackageReadFailure, PackageReadFailureReason, PackageReadFailures};
141#[cfg(feature = "package-reading")]
142pub use package_reading::{
143 PACKAGE_REGISTRY_NAMESPACE, PACKAGE_REGISTRY_URL, PackageArchiveReadError,
144 PackageExpansionLimitError, PackageExpansionLimits, PackageExpansionResource, PackageReadError,
145 expand_package_archive, package_archive_url, read_package_archive,
146};
147pub use payload::PackArchiveBytes;
148pub use project_snapshot::{
149 ProjectSnapshot, ProjectSnapshotAssembly, ProjectSnapshotError, ProjectSnapshotIssue,
150};
151pub use write::{
152 CommitCertainty, CompilationArtifactWriteEntry, CompilationArtifactWriteProgress,
153 CompilationArtifactWriteReceipt, PackExtractionWriteEntry, PackExtractionWriteProgress,
154 PackExtractionWriteReceipt, WriteKeyOutcome,
155};
156
157#[cfg(test)]
158mod tests;