typstgen 0.3.0

Compile existing .typ files to PDF with an embedded Typst engine — no external typst binary, config-driven template resolution. Usable as CLI, Rust lib, and Wasm.
Documentation
# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2021"
rust-version = "1.92"
name = "typstgen"
version = "0.3.0"
authors = ["Casoon <info@casoon.de>"]
build = false
exclude = [
    "target/",
    ".github/",
    "docs/",
    "fixtures/",
    "site/",
    "examples/",
]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Compile existing .typ files to PDF with an embedded Typst engine — no external typst binary, config-driven template resolution. Usable as CLI, Rust lib, and Wasm."
homepage = "https://github.com/casoon/typstgen"
documentation = "https://docs.rs/typstgen"
readme = "README.md"
keywords = [
    "typst",
    "pdf",
    "cli",
    "wasm",
    "template",
]
categories = [
    "text-processing",
    "rendering",
    "command-line-utilities",
]
license = "MIT"
repository = "https://github.com/casoon/typstgen"

[features]
cli = ["dep:clap"]
default = ["cli"]
wasm = ["dep:wasm-bindgen"]

[lib]
name = "typstgen"
crate-type = [
    "rlib",
    "cdylib",
]
path = "src/lib.rs"

[[bin]]
name = "typstgen"
path = "src/bin/typstgen.rs"
required-features = ["cli"]

[[test]]
name = "compile"
path = "tests/compile.rs"

[dependencies.chrono]
version = "0.4"
features = ["std"]
default-features = false

[dependencies.clap]
version = "4.5"
features = [
    "derive",
    "env",
]
optional = true

[dependencies.serde]
version = "1.0"
features = ["derive"]

[dependencies.serde_json]
version = "1.0"

[dependencies.thiserror]
version = "2.0"

[dependencies.toml]
version = "1"

[dependencies.typst]
version = "0.15"

[dependencies.typst-assets]
version = "0.15"
features = ["fonts"]

[dependencies.typst-pdf]
version = "0.15"

[dependencies.wasm-bindgen]
version = "0.2"
optional = true

[dev-dependencies.chrono]
version = "0.4"

[dev-dependencies.serde_json]
version = "1.0"

[dev-dependencies.tempfile]
version = "3.8"

[target.'cfg(not(target_arch = "wasm32"))'.dependencies.chrono]
version = "0.4"
features = ["clock"]

[target.'cfg(not(target_arch = "wasm32"))'.dependencies.fontdb]
version = "0.24"

[profile.release]
opt-level = 3
lto = true
codegen-units = 1
strip = true