This should make more complex functionality, such as functions, much more feasible to implement. Plus, being the official implementation, it's much more up to date.
HEIF2O2ELHA3M7K77CK7AHBZ4656AUS3QW5M4E2DUY7ECOLVWKIAC
ZFENVA4E4XM7FMUD726DMVHPQ5I7NIYQK5C3XI2LRGJJMAAOI6VAC
BSJYWOYSJRERQ45AD7RN3364RYQ5P3IM76S67262VLFZPFO3B5JQC
JCYJWUI32EEUQVQBLUNTSWZI6OXZJIRQMDU72DXWTJVU2LJJ6QWQC
2N3KOCP74PCK2ETO5PCWBDR5PA57DDNT2KR4JLBPZPQPA56SAR4QC
GYTRFADRDO4SYXV6V3PEPGGFIRDHQH5YBTKEJCWFAIZ5CX4P46NAC
BA5Y6VSEHJQBOYBS6R6FE6IZDRNAPNIN5ITJXWK7L46RJVHNI7JAC
YKL5NCLHVHFQMBIWC6HW4NFPPYK5DR6XTCKJ5VBHNLVP2RO3H24AC
MPTQGIIJUNQSRWF5G63WDZLYH6EYURPENFTJ7J46VKPAWC6QQUGAC
4MMVEN5YUVUQ5RO3X2XKZVBMBMHOEJIYUCLKL63EPRUVQQRQXUAAC
FLIMM2YMIEXODPNP47RSACQEUN4CKRE2SA2RWKZN6FGKUU57DGJAC
RAWT2FQSTIP6EWFQXMAESASEM6AIFCV4PDO6TRUN6EAFVP3526YQC
QPZ6QNIEGMSQWN65HB7T44HUM42XSXZ6F5JOWEOTFPNDP2PQEKKQC
C73UJ7ZYG4EE3YTK3N66GXPNWJHEBSRE4PDQBWMN6SKQ3U6ZYKXAC
BMG4FSHNV54VXDHNUVGZOMXQJWLFSUF3M5NCN7GJETNIF3QTHELQC
REI53XR4WDH5EKLTXTFVTOVWCCFRWTFH4GQS6DSNM5LSRFTX7HJQC
token, AngleBracketedGenericArguments, Expr, ExprCall, ExprLit, ExprPath, ExprTuple,
GenericArgument, GenericParam, Generics, Ident, Item, ItemFn, ItemMod, ItemUse, Lit, LitStr,
PathArguments, PathSegment, ReturnType, Signature, Stmt, TraitBound, TraitBoundModifier,
TypeImplTrait, TypeParam, TypeParamBound, TypePath, UseGroup, UseName, UsePath, UseTree,
Visibility,
token, AngleBracketedGenericArguments, ExprCall, ExprLit, ExprPath, ExprTuple, GenericArgument,
GenericParam, Generics, Ident, Item, ItemFn, ItemMod, ItemUse, Lit, LitStr, PathArguments,
PathSegment, ReturnType, Signature, Stmt, TraitBound, TraitBoundModifier, TypeImplTrait,
TypeParam, TypeParamBound, TypePath, UseGroup, UseName, UsePath, UseTree, Visibility,
// Create Rust AST
let pandoc = typst_to_pandoc(&file).iter().map(pandoc_to_xilem).collect();
let function = xilem_to_function(&fs_path_to_module_ident(&file), pandoc);
// Create Rust AST from file contents
let file_contents = std::fs::read_to_string(&file).expect("Unable to read file");
let untyped_tree = typst::syntax::parse(&file_contents);
let typst_ast = typst::syntax::ast::Markup::from_untyped(&untyped_tree)
.expect("Unable to parse Typst file");
let xilem_expressions = typst_to_xilem(typst_ast);
let function = xilem_to_function(&fs_path_to_module_ident(&file), xilem_expressions);
fn typst_to_pandoc(filename: &str) -> Vec<pandoc_ast::Block> {
let mut pandoc = pandoc::new();
pandoc.add_input(filename);
pandoc.set_output_format(pandoc::OutputFormat::Json, Vec::new());
pandoc.set_output(pandoc::OutputKind::Pipe);
let output = if let PandocOutput::ToBuffer(json) = pandoc.execute().unwrap() {
json
} else {
panic!("Pandoc produced unexpected output format");
};
pandoc_ast::Pandoc::from_json(&output).blocks
}
fn xilem_to_function(name: &str, blocks: Vec<Expr>) -> Item {
fn xilem_to_function(name: &str, blocks: Vec<syn::Expr>) -> Item {
fn pandoc_to_xilem(block: &pandoc_ast::Block) -> Expr {
match block {
pandoc_ast::Block::Header(level, _attr, inlines) => {
let transformed_inlines = pandoc_inlines_to_xilem(inlines);
let header_level = HeaderLevel::from(*level);
xilem_html_element(header_level.into(), transformed_inlines)
fn typst_expr_to_xilem(expression: &typst::syntax::ast::Expr) -> syn::Expr {
match expression {
typst::syntax::ast::Expr::Text(text) => syn::Expr::Lit(literal_string(text.get().as_str())),
typst::syntax::ast::Expr::Space(space) => syn::Expr::Lit(literal_string(" ")),
typst::syntax::ast::Expr::Heading(heading) => {
let level = HeaderLevel::from(heading.level());
let expressions = typst_to_xilem(heading.body());
xilem_html_element(level.into(), expressions)
fn typst_to_xilem(root: typst::syntax::ast::Markup) -> Vec<syn::Expr> {
let xilem_expressions = root
.exprs()
.collect::<Vec<_>>()
.iter()
.map(typst_expr_to_xilem)
// Merge any adjacent string literal
.fold(Vec::new(), |mut state, inline| {
if let syn::Expr::Lit(current_literal) = &inline {
if let Some(syn::Expr::Lit(ref mut prev_literal)) = state.last_mut() {
let prev_string = extract_literal_string(&prev_literal);
let current_string = extract_literal_string(¤t_literal);
let merged_string = prev_string + ¤t_string;
*prev_literal = literal_string(merged_string.as_str());
return state;
}
}
state.push(inline);
state
});
let tuples = split_tuple(xilem_expressions);
tuples
}
fn pandoc_inline_to_xilem(inline: &pandoc_ast::Inline) -> Expr {
dbg!(inline);
match inline {
pandoc_ast::Inline::Str(text) => Expr::Lit(literal_string(text.as_str())),
pandoc_ast::Inline::Space | pandoc_ast::Inline::SoftBreak => Expr::Lit(literal_string(" ")),
pandoc_ast::Inline::LineBreak => {
xilem_html_element("br", pandoc_inlines_to_xilem(&Vec::new()))
}
pandoc_ast::Inline::Subscript(inlines) => {
xilem_html_element("sub", pandoc_inlines_to_xilem(inlines))
}
pandoc_ast::Inline::Superscript(inlines) => {
xilem_html_element("sup", pandoc_inlines_to_xilem(inlines))
}
pandoc_ast::Inline::Emph(inlines) => {
xilem_html_element("b", pandoc_inlines_to_xilem(inlines))
}
pandoc_ast::Inline::Underline(inlines) => {
xilem_html_element("u", pandoc_inlines_to_xilem(inlines))
}
pandoc_ast::Inline::Strikeout(inlines) => {
xilem_html_element("s", pandoc_inlines_to_xilem(inlines))
}
_ => todo!(),
}
}
}
fn extract_literal_string(expression: &ExprLit) -> String {
if let Lit::Str(lit_str) = &expression.lit {
lit_str.value()
} else {
unreachable!()
}
}
fn pandoc_inlines_to_xilem(inlines: &Vec<pandoc_ast::Inline>) -> Expr {
let expressions =
inlines
.into_iter()
.map(pandoc_inline_to_xilem)
.fold(Vec::new(), |mut state, inline| {
if let Expr::Lit(current_literal) = &inline {
if let Some(Expr::Lit(ref mut prev_literal)) = state.last_mut() {
let prev_string = extract_literal_string(&prev_literal);
let current_string = extract_literal_string(¤t_literal);
let merged_string = prev_string + ¤t_string;
*prev_literal = literal_string(merged_string.as_str());
return state;
}
}
state.push(inline);
state
});
// Return a tuple containing every parent expression
let tuples = split_tuple(expressions);
match &tuples[..] {
[single] => single.to_owned(),
_ => Expr::Tuple(ExprTuple {
attrs: Vec::new(),
paren_token: token::Paren::default(),
elems: Punctuated::from_iter(tuples.into_iter()),
}),
}
typst = { git = "https://github.com/typst/typst" }
[[package]]
name = "adler"
version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe"
[[package]]
name = "ahash"
version = "0.8.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "91429305e9f0a25f6205c5b8e0d2db09e0708a7a6df0f42212bb56c32c8ac97a"
dependencies = [
"cfg-if",
"once_cell",
"version_check",
"zerocopy",
]
[[package]]
name = "autocfg"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
[[package]]
name = "base64"
version = "0.21.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9"
[[package]]
name = "bytemuck"
version = "1.14.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "374d28ec25809ee0e23827c2ab573d729e293f281dfe393500e7ad618baa61c6"
[[package]]
name = "byteorder"
version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
[[package]]
name = "comemo"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "28a097f142aeb5b03af73595536cd55f5d649fca4d656379aac86b3af133cf92"
dependencies = [
"comemo-macros",
"siphasher",
]
[[package]]
name = "comemo-macros"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "168cc09917f6a014a4cf6ed166d1b541a20a768c60f9cc348f25203ee8312940"
dependencies = [
"proc-macro2",
"quote",
"syn 1.0.109",
]
]
[[package]]
name = "crc32fast"
version = "1.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d"
dependencies = [
"cfg-if",
]
[[package]]
name = "dashmap"
version = "5.5.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856"
dependencies = [
"cfg-if",
"hashbrown 0.14.2",
"lock_api",
"once_cell",
"parking_lot_core",
name = "either"
version = "1.9.0"
name = "deranged"
version = "0.3.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0f32d04922c60427da6f9fef14d042d9edddef64cb9d4ce0d64d0685fbeb1fd3"
dependencies = [
"powerfmt",
]
[[package]]
name = "downcast-rs"
version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650"
[[package]]
name = "ecow"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e6ea5e3f9cda726431da9d1a8d5a29785d544b31e98e1ca7a210906244002e02"
dependencies = [
"serde",
]
[[package]]
name = "equivalent"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5"
[[package]]
name = "fast-srgb8"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dd2e7510819d6fbf51a5545c8f922716ecfb14df168a3242f7d33e0239efe6a1"
[[package]]
name = "fdeflate"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "64d6dafc854908ff5da46ff3f8f473c6984119a2876a383a860246dd7841a868"
dependencies = [
"simd-adler32",
]
[[package]]
name = "flate2"
version = "1.0.28"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e"
dependencies = [
"crc32fast",
"miniz_oxide",
]
[[package]]
name = "float-cmp"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "98de4bbd547a563b716d8dfa9aad1cb19bfab00f4fa09a6a4ed21dbcf44ce9c4"
[[package]]
name = "fontdb"
version = "0.15.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "020e203f177c0fb250fb19455a252e838d2bbbce1f80f25ecc42402aafa8cd38"
dependencies = [
"log",
"slotmap",
"tinyvec",
"ttf-parser",
]
[[package]]
name = "gif"
version = "0.12.0"
name = "itertools"
version = "0.8.2"
name = "image"
version = "0.24.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6f3dfdbdd72063086ff443e297b61695500514b1e41095b6fb9a5ab48a70a711"
dependencies = [
"bytemuck",
"byteorder",
"color_quant",
"gif",
"jpeg-decoder",
"num-rational",
"num-traits",
"png",
]
[[package]]
name = "imagesize"
version = "0.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "029d73f573d8e8d63e6d5020011d3255b28c3ba85d6cf870a07184ed23de9284"
[[package]]
name = "indexmap"
version = "2.1.0"
[[package]]
name = "libc"
version = "0.2.150"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c"
[[package]]
name = "libm"
version = "0.2.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058"
[[package]]
name = "lock_api"
version = "0.4.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45"
dependencies = [
"autocfg",
"scopeguard",
]
[[package]]
name = "memchr"
version = "2.6.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167"
[[package]]
name = "miniz_oxide"
version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7"
dependencies = [
"adler",
"simd-adler32",
]
name = "num-integer"
version = "0.1.45"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9"
dependencies = [
"autocfg",
"num-traits",
]
[[package]]
name = "num-rational"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0"
dependencies = [
"autocfg",
"num-integer",
"num-traits",
]
[[package]]
name = "num-traits"
version = "0.2.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c"
dependencies = [
"autocfg",
]
[[package]]
name = "pandoc"
version = "0.8.10"
name = "palette"
version = "0.7.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b2e2f34147767aa758aa649415b50a69eeb46a67f9dc7db8011eeb3d84b351dc"
dependencies = [
"approx",
"fast-srgb8",
"libm",
"palette_derive",
]
[[package]]
name = "palette_derive"
version = "0.7.3"
[[package]]
name = "pixglyph"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f67591f21f6668e63c1cd85adab066ac8a92bc7b962668dd8042197a6e4b8f8f"
dependencies = [
"ttf-parser",
]
[[package]]
name = "png"
version = "0.17.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dd75bf2d8dd3702b9707cdbc56a5b9ef42cec752eb8b3bafc01234558442aa64"
dependencies = [
"bitflags 1.3.2",
"crc32fast",
"fdeflate",
"flate2",
"miniz_oxide",
]
[[package]]
name = "powerfmt"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391"
]
[[package]]
name = "rctree"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3b42e27ef78c35d3998403c1d26f3efd9e135d3e5121b0a4845cc5cc27547f4f"
[[package]]
name = "redox_syscall"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa"
dependencies = [
"bitflags 1.3.2",
name = "regex"
version = "1.10.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343"
dependencies = [
"aho-corasick",
"memchr",
"regex-automata",
"regex-syntax",
]
[[package]]
name = "regex-automata"
version = "0.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f"
dependencies = [
"aho-corasick",
"memchr",
"regex-syntax",
]
[[package]]
name = "regex-syntax"
version = "0.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f"
[[package]]
name = "resvg"
version = "0.36.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cc7980f653f9a7db31acff916a262c3b78c562919263edea29bf41a056e20497"
dependencies = [
"gif",
"jpeg-decoder",
"log",
"pico-args",
"png",
"rgb",
"svgtypes",
"tiny-skia",
"usvg",
]
[[package]]
name = "rgb"
version = "0.8.37"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "05aaa8004b64fd573fc9d002f4e632d51ad4f026c2b5ba95fcb6c2f32c2c47d8"
dependencies = [
"bytemuck",
]
[[package]]
name = "roxmltree"
version = "0.18.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "862340e351ce1b271a378ec53f304a5558f7db87f3769dc655a8f6ecbb68b302"
dependencies = [
"xmlparser",
]
[[package]]
name = "rustybuzz"
version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "71cd15fef9112a1f94ac64b58d1e4628192631ad6af4dc69997f995459c874e7"
dependencies = [
"bitflags 1.3.2",
"bytemuck",
"smallvec",
"ttf-parser",
"unicode-bidi-mirroring",
"unicode-ccc",
"unicode-properties",
"unicode-script",
]
[[package]]
]
[[package]]
name = "simd-adler32"
version = "0.3.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe"
[[package]]
name = "simplecss"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a11be7c62927d9427e9f40f3444d5499d868648e2edbc4e2116de69e7ec0e89d"
dependencies = [
"log",
]
[[package]]
name = "siphasher"
version = "0.3.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d"
[[package]]
name = "slotmap"
version = "1.0.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e1e08e261d0e8f5c43123b7adf3e4ca1690d655377ac93a03b2c9d3e98de1342"
dependencies = [
"version_check",
name = "smallvec"
version = "1.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "942b4a808e05215192e39f4ab80813e599068285906cc91aa64f923db842bd5a"
[[package]]
name = "spin"
version = "0.9.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67"
[[package]]
name = "stacker"
version = "0.1.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c886bd4480155fd3ef527d45e9ac8dd7118a898a46530b7b94c3e21866259fce"
dependencies = [
"cc",
"cfg-if",
"libc",
"psm",
"winapi",
]
[[package]]
name = "strict-num"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6637bab7722d379c8b41ba849228d680cc12d0a45ba1fa2b48f2a30577a06731"
dependencies = [
"float-cmp",
]
[[package]]
name = "subsetter"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "09eab8a83bff89ba2200bd4c59be45c7c787f988431b936099a5a266c957f2f9"
[[package]]
name = "svg2pdf"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "363c5346967da04bf3ebb3d8bafa7f52c53c810167047904df1960eac3fc08b7"
dependencies = [
"image",
"miniz_oxide",
"pdf-writer",
"usvg",
]
[[package]]
name = "svgtypes"
version = "0.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d71499ff2d42f59d26edb21369a308ede691421f79ebc0f001e2b1fd3a7c9e52"
dependencies = [
"kurbo",
"siphasher",
]
[[package]]
]
[[package]]
name = "time"
version = "0.3.30"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c4a34ab300f2dee6e562c10a046fc05e358b29f9bf92277f30c3c8d82275f6f5"
dependencies = [
"deranged",
"itoa",
"powerfmt",
"serde",
"time-core",
"time-macros",
]
[[package]]
name = "time-core"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3"
[[package]]
name = "time-macros"
version = "0.2.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4ad70d68dba9e1f8aceda7aa6711965dfec1cac869f311a51bd08b3a2ccbce20"
dependencies = [
"time-core",
]
[[package]]
name = "tiny-skia"
version = "0.11.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3b72a92a05db376db09fe6d50b7948d106011761c05a6a45e23e17ee9b556222"
dependencies = [
"arrayref",
"arrayvec",
"bytemuck",
"cfg-if",
"log",
"png",
"tiny-skia-path",
]
[[package]]
name = "tiny-skia-path"
version = "0.11.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6ac3865b9708fc7e1961a65c3a4fa55e984272f33092d3c859929f887fceb647"
dependencies = [
"arrayref",
"bytemuck",
"strict-num",
]
[[package]]
name = "tinyvec"
version = "1.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50"
dependencies = [
"tinyvec_macros",
name = "tinyvec_macros"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
[[package]]
name = "toml"
version = "0.8.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a1a195ec8c9da26928f773888e0742ca3ca1040c6cd859c919c9f59c1954ab35"
dependencies = [
"serde",
"serde_spanned",
"toml_datetime",
"toml_edit",
]
[[package]]
name = "toml_datetime"
version = "0.6.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1"
dependencies = [
"serde",
]
[[package]]
name = "toml_edit"
version = "0.21.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d34d383cd00a163b4a5b85053df514d45bc330f6de7737edfe0a93311d1eaa03"
dependencies = [
"indexmap",
"serde",
"serde_spanned",
"toml_datetime",
"winnow",
]
[[package]]
"syn",
"syn 2.0.38",
"typst",
]
[[package]]
name = "typst"
version = "0.9.0"
source = "git+https://github.com/typst/typst#5f922abfd840425f347b7b86b1d0d81e489faf8d"
dependencies = [
"base64",
"bitflags 2.4.1",
"bytemuck",
"comemo",
"ecow",
"flate2",
"fontdb",
"image",
"indexmap",
"kurbo",
"lasso",
"log",
"miniz_oxide",
"once_cell",
"palette",
"pdf-writer",
"pixglyph",
"regex",
"resvg",
"roxmltree",
"rustybuzz",
"serde",
"siphasher",
"smallvec",
"stacker",
"subsetter",
"svg2pdf",
"time",
"tiny-skia",
"toml",
"tracing",
"ttf-parser",
"typst-macros",
"typst-syntax",
"unicode-ident",
"unicode-math-class",
"unicode-properties",
"unicode-segmentation",
"unscanny",
"usvg",
"wasmi",
"xmlparser",
"xmlwriter",
"xmp-writer",
]
[[package]]
name = "typst-macros"
version = "0.9.0"
source = "git+https://github.com/typst/typst#5f922abfd840425f347b7b86b1d0d81e489faf8d"
dependencies = [
"heck",
"proc-macro2",
"quote",
"syn 2.0.38",
]
[[package]]
name = "typst-syntax"
version = "0.9.0"
source = "git+https://github.com/typst/typst#5f922abfd840425f347b7b86b1d0d81e489faf8d"
dependencies = [
"comemo",
"ecow",
"once_cell",
"serde",
"tracing",
"unicode-ident",
"unicode-math-class",
"unicode-segmentation",
"unscanny",
name = "unicode-bidi"
version = "0.3.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460"
[[package]]
name = "unicode-bidi-mirroring"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "56d12260fb92d52f9008be7e4bca09f584780eb2266dc8fecc6a192bec561694"
[[package]]
name = "unicode-ccc"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cc2520efa644f8268dce4dcd3050eaa7fc044fca03961e9998ac7e2e92b77cf1"
[[package]]
[[package]]
name = "unicode-math-class"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7d246cf599d5fae3c8d56e04b20eb519adb89a8af8d0b0fbcded369aa3647d65"
[[package]]
name = "unicode-properties"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c7f91c8b21fbbaa18853c3d0801c78f4fc94cdb976699bb03e832e75f7fd22f0"
[[package]]
name = "unicode-script"
version = "0.5.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7d817255e1bed6dfd4ca47258685d14d2bdcfbc64fdc9e3819bd5848057b8ecc"
[[package]]
name = "unicode-segmentation"
version = "1.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36"
[[package]]
name = "unicode-vo"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b1d386ff53b415b7fe27b50bb44679e2cc4660272694b7b6f3326d8480823a94"
[[package]]
name = "unscanny"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e9df2af067a7953e9c3831320f35c1cc0600c30d44d9f7a12b01db1cd88d6b47"
[[package]]
name = "usvg"
version = "0.36.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c51daa774fe9ee5efcf7b4fec13019b8119cda764d9a8b5b06df02bb1445c656"
dependencies = [
"base64",
"log",
"pico-args",
"usvg-parser",
"usvg-text-layout",
"usvg-tree",
"xmlwriter",
]
[[package]]
name = "usvg-parser"
version = "0.36.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "45c88a5ffaa338f0e978ecf3d4e00d8f9f493e29bed0752e1a808a1db16afc40"
dependencies = [
"data-url",
"flate2",
"imagesize",
"kurbo",
"log",
"roxmltree",
"simplecss",
"siphasher",
"svgtypes",
"usvg-tree",
]
[[package]]
name = "usvg-text-layout"
version = "0.36.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4d2374378cb7a3fb8f33894e0fdb8625e1bbc4f25312db8d91f862130b541593"
dependencies = [
"fontdb",
"kurbo",
"log",
"rustybuzz",
"unicode-bidi",
"unicode-script",
"unicode-vo",
"usvg-tree",
]
name = "wasmi_arena"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "401c1f35e413fac1846d4843745589d9ec678977ab35a384db8ae7830525d468"
[[package]]
name = "wasmi_core"
version = "0.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dcf1a7db34bff95b85c261002720c00c3a6168256dcb93041d3fa2054d19856a"
dependencies = [
"downcast-rs",
"libm",
"num-traits",
"paste",
]
[[package]]
name = "wasmparser-nostd"
version = "0.100.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9157cab83003221bfd385833ab587a039f5d6fa7304854042ba358a3b09e0724"
dependencies = [
"indexmap-nostd",
]
[[package]]
[[package]]
name = "xmlparser"
version = "0.13.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "66fee0b777b0f5ac1c69bb06d361268faafa61cd4682ae064a171c16c433e9e4"
[[package]]
name = "xmlwriter"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ec7a2a501ed189703dba8b08142f057e887dfc4b2cc4db2d343ac6376ba3e0b9"
[[package]]
name = "xmp-writer"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4543ba138f64a94b19e1e9c66c165bca7e03d470e1c066cb76ea279d9d0e1989"
[[package]]
name = "zerocopy"
version = "0.7.25"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8cd369a67c0edfef15010f980c3cbe45d7f651deac2cd67ce097cd801de16557"
dependencies = [
"zerocopy-derive",
]
[[package]]
name = "zerocopy-derive"
version = "0.7.25"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c2f140bda219a26ccc0cdb03dba58af72590c53b22642577d88a927bc5c87d6b"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.38",
]