summaryrefslogtreecommitdiff
path: root/crates/typst-cli
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2023-11-08 14:32:42 +0100
committerLaurenz <laurmaedje@gmail.com>2023-11-08 15:09:55 +0100
commit46846a337e8084acd46c70bccc2fca2659e9fb9a (patch)
tree9e9d6abf76867d823644e85e34571c70e07eea4f /crates/typst-cli
parent80b4ca4c04cb5d911947895d9d04c87efb97b0f4 (diff)
Extract `typst-pdf` crate
Diffstat (limited to 'crates/typst-cli')
-rw-r--r--crates/typst-cli/Cargo.toml1
-rw-r--r--crates/typst-cli/src/compile.rs2
2 files changed, 2 insertions, 1 deletions
diff --git a/crates/typst-cli/Cargo.toml b/crates/typst-cli/Cargo.toml
index 6e270bd8..d797555e 100644
--- a/crates/typst-cli/Cargo.toml
+++ b/crates/typst-cli/Cargo.toml
@@ -22,6 +22,7 @@ doc = false
[dependencies]
typst = { workspace = true }
typst-library = { workspace = true }
+typst-pdf = { workspace = true }
typst-render = { workspace = true }
typst-svg = { workspace = true }
chrono = { workspace = true }
diff --git a/crates/typst-cli/src/compile.rs b/crates/typst-cli/src/compile.rs
index 9eec36cb..48d6401c 100644
--- a/crates/typst-cli/src/compile.rs
+++ b/crates/typst-cli/src/compile.rs
@@ -153,7 +153,7 @@ fn export_pdf(
world: &SystemWorld,
) -> StrResult<()> {
let ident = world.input().to_string_lossy();
- let buffer = typst::export::pdf(document, Some(&ident), now());
+ let buffer = typst_pdf::pdf(document, Some(&ident), now());
let output = command.output();
fs::write(output, buffer)
.map_err(|err| eco_format!("failed to write PDF file ({err})"))?;