this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat: add tala-typst rendering crate and CLAUDE.md

- tala-typst: implements typst::World over a deck directory, loads
Libertinus/NewCM fonts from typst-assets (fonts feature required),
resolves #img() calls from deck_dir/images/ with extension fallback
- Three preambles: Authoring (both card sides), ReviewFront (front only),
ReviewCloze (blanks replaced by underline boxes)
- render() → premultiplied RGBA at 144 dpi via typst-render
- dump_render example: cargo run -p tala-typst --example dump_render
produces /tmp/tala_render.png for visual QA
- image dep uses default-features=false,features=["png"] to avoid
pulling in rav1e (avif encoder) which OOMs the LLVM backend
- CLAUDE.md: build/test commands, architecture overview, gotchas

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

+2112 -40
+83
CLAUDE.md
··· 1 + # CLAUDE.md 2 + 3 + This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. 4 + 5 + ## Commands 6 + 7 + ```bash 8 + # Build everything 9 + cargo build 10 + 11 + # Run all tests 12 + cargo test 13 + 14 + # Run tests for a single crate 15 + cargo test -p tala-format 16 + cargo test -p tala-srs 17 + 18 + # Run a single test by name 19 + cargo test -p tala-format card_count 20 + 21 + # Check without building artifacts 22 + cargo check 23 + 24 + # Run the CLI 25 + cargo run -p tala-cli -- check <deck-dir> 26 + cargo run -p tala-cli -- review <deck-dir> 27 + ``` 28 + 29 + ## Architecture 30 + 31 + Cargo workspace with edition 2024. Crates live under `crates/`. 32 + 33 + ### Crate dependency order 34 + 35 + ``` 36 + tala-format → tala-srs → tala-typst (planned) → tala-ui (planned) 37 + 38 + tala-cli (consumes both) 39 + ``` 40 + 41 + ### `tala-format` 42 + 43 + Parses `.typ` card files using `typst-syntax`. Entry point: `parse_cards(source: &str) -> Vec<CardEntry>`. 44 + 45 + Uses `LinkedNode` (not `SyntaxNode`) for byte-range extraction — `LinkedNode::range()` returns `Range<usize>`; `SyntaxNode` only exposes an opaque `Span`. Walker matches `SyntaxKind::FuncCall`, dispatches on function name. 46 + 47 + Card types and their typst syntax: 48 + - `#card(id: "...", dir?: "bi")[front][back]` → `CardKind::FrontBack` 49 + - `#cloze(id: "...")[... #blank[text] ...]` → `CardKind::Cloze` 50 + - `#img_cloze(id: "...", src: "name")` → `CardKind::ImgCloze` 51 + 52 + **Span gotcha:** the `#` sigil is outside the `FuncCall` AST node. `card.span` points to `card(...)` not `#card(...)`. Use `span.start - 1` when byte-splicing to include the sigil. 53 + 54 + ### `tala-srs` 55 + 56 + Loads/saves `cards.srs.json` sidecar alongside `cards.typ`. All FSRS schedule data lives here, not in the typst source. ImgCloze rect overlays (normalized `[x, y, w, h]` in `[0,1]`) also live here as `Vec<RectEntry>`. 57 + 58 + Key methods on `Sidecar`: `load_or_empty(deck_dir)`, `save_to_deck(deck_dir)`, `orphaned(known_ids)`, `missing(known_ids)`. 59 + 60 + `CardSchedule` is tagged-union JSON (`#[serde(tag = "type", rename_all = "snake_case")]`). 61 + 62 + ### `tala-cli` 63 + 64 + Binary crate producing the `tala` binary. Two subcommands: `check` (parse + sidecar cross-check) and `review` (stubbed). 65 + 66 + ### Planned: `tala-typst` 67 + 68 + Render typst source strings to RGBA via the `typst` crate. Requires implementing `typst::World`. Two preambles: authoring (renders full card) and review (blanks replaced by boxes). Font loading must provide at least one valid font family or typst panics. 69 + 70 + ### Planned: `tala-ui` 71 + 72 + Native Floem UI. **Use `floem = { git = "https://github.com/lapce/floem" }` — do not use the crates.io 0.2 release, it is over a year out of date.** Use floem's re-exported wgpu; do not add wgpu as an independent dependency or you risk duplicate version splits. 73 + 74 + ## Deck directory layout 75 + 76 + ``` 77 + <deck>/ 78 + cards.typ # human-authored, git-tracked 79 + cards.srs.json # machine-managed schedule data 80 + images/ # referenced via #img("name") 81 + ``` 82 + 83 + Every save is a `git2` commit. Dirty state = working tree differs from HEAD. Card file edits are byte-span splices — never reformat the whole file.
+1681 -39
Cargo.lock
··· 101 101 checksum = "7f202df86484c868dbad7eaa557ef785d5c66295e41b460ef922eca0723b842c" 102 102 103 103 [[package]] 104 + name = "approx" 105 + version = "0.5.1" 106 + source = "registry+https://github.com/rust-lang/crates.io-index" 107 + checksum = "cab112f0a86d568ea0e627cc1d6be74a1e9cd55214684db5561995f6dad897c6" 108 + dependencies = [ 109 + "num-traits", 110 + ] 111 + 112 + [[package]] 113 + name = "ar_archive_writer" 114 + version = "0.5.1" 115 + source = "registry+https://github.com/rust-lang/crates.io-index" 116 + checksum = "7eb93bbb63b9c227414f6eb3a0adfddca591a8ce1e9b60661bb08969b87e340b" 117 + dependencies = [ 118 + "object", 119 + ] 120 + 121 + [[package]] 104 122 name = "arbitrary" 105 123 version = "1.4.2" 106 124 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 108 126 dependencies = [ 109 127 "derive_arbitrary", 110 128 ] 129 + 130 + [[package]] 131 + name = "arrayref" 132 + version = "0.3.9" 133 + source = "registry+https://github.com/rust-lang/crates.io-index" 134 + checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" 111 135 112 136 [[package]] 113 137 name = "arrayvec" ··· 149 173 checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" 150 174 151 175 [[package]] 176 + name = "az" 177 + version = "1.3.0" 178 + source = "registry+https://github.com/rust-lang/crates.io-index" 179 + checksum = "be5eb007b7cacc6c660343e96f650fedf4b5a77512399eb952ca6642cf8d13f7" 180 + 181 + [[package]] 182 + name = "base64" 183 + version = "0.22.1" 184 + source = "registry+https://github.com/rust-lang/crates.io-index" 185 + checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" 186 + 187 + [[package]] 188 + name = "biblatex" 189 + version = "0.11.0" 190 + source = "registry+https://github.com/rust-lang/crates.io-index" 191 + checksum = "53d0c374feba1b9a59042a7c1cf00ce7c34b977b9134fe7c42b08e5183729f66" 192 + dependencies = [ 193 + "paste", 194 + "roman-numerals-rs", 195 + "strum 0.27.2", 196 + "unic-langid", 197 + "unicode-normalization", 198 + "unscanny", 199 + ] 200 + 201 + [[package]] 202 + name = "bincode" 203 + version = "1.3.3" 204 + source = "registry+https://github.com/rust-lang/crates.io-index" 205 + checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" 206 + dependencies = [ 207 + "serde", 208 + ] 209 + 210 + [[package]] 152 211 name = "bincode" 153 212 version = "2.0.1" 154 213 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 263 322 checksum = "2afa81c868c1a9b3fad25c31176945d0cc5181ba7b77c0456bc05cf57fca975c" 264 323 dependencies = [ 265 324 "ahash", 266 - "bincode", 325 + "bincode 2.0.1", 267 326 "burn-common", 268 327 "burn-dataset", 269 328 "burn-derive", ··· 276 335 "log", 277 336 "num-traits", 278 337 "portable-atomic-util", 279 - "rand", 338 + "rand 0.9.2", 280 339 "rmp-serde", 281 340 "serde", 282 341 "serde_json", ··· 302 361 "hashbrown 0.15.5", 303 362 "log", 304 363 "num-traits", 305 - "rand", 364 + "rand 0.9.2", 306 365 "serde", 307 366 "spin 0.10.0", 308 367 "text_placeholder", ··· 332 391 "csv", 333 392 "derive-new 0.7.0", 334 393 "dirs 6.0.0", 335 - "rand", 394 + "rand 0.9.2", 336 395 "rmp-serde", 337 396 "sanitize-filename 0.6.0", 338 397 "serde", ··· 387 446 "num-traits", 388 447 "paste", 389 448 "portable-atomic-util", 390 - "rand", 449 + "rand 0.9.2", 391 450 "seq-macro", 392 451 "spin 0.10.0", 393 452 ] ··· 435 494 "half", 436 495 "hashbrown 0.15.5", 437 496 "num-traits", 438 - "rand", 497 + "rand 0.9.2", 439 498 "rand_distr", 440 499 "serde", 441 500 "serde_bytes", ··· 474 533 ] 475 534 476 535 [[package]] 536 + name = "by_address" 537 + version = "1.2.1" 538 + source = "registry+https://github.com/rust-lang/crates.io-index" 539 + checksum = "64fa3c856b712db6612c019f14756e64e4bcea13337a6b33b696333a9eaa2d06" 540 + 541 + [[package]] 477 542 name = "bytemuck" 478 543 version = "1.25.0" 479 544 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 500 565 checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" 501 566 502 567 [[package]] 568 + name = "byteorder-lite" 569 + version = "0.1.0" 570 + source = "registry+https://github.com/rust-lang/crates.io-index" 571 + checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495" 572 + 573 + [[package]] 503 574 name = "bytesize" 504 575 version = "1.3.3" 505 576 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 517 588 "memmap2", 518 589 "num-traits", 519 590 "num_cpus", 520 - "rand", 591 + "rand 0.9.2", 521 592 "rand_distr", 522 593 "rayon", 523 594 "safetensors", ··· 552 623 checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" 553 624 554 625 [[package]] 626 + name = "chinese-number" 627 + version = "0.7.8" 628 + source = "registry+https://github.com/rust-lang/crates.io-index" 629 + checksum = "3e964125508474a83c95eb935697abbeb446ff4e9d62c71ce880e3986d1c606b" 630 + dependencies = [ 631 + "chinese-variant", 632 + "enum-ordinalize", 633 + "num-bigint", 634 + "num-traits", 635 + ] 636 + 637 + [[package]] 638 + name = "chinese-variant" 639 + version = "1.1.5" 640 + source = "registry+https://github.com/rust-lang/crates.io-index" 641 + checksum = "58b52a9840ffff5d4d0058ae529fa066a75e794e3125546acfc61c23ad755e49" 642 + 643 + [[package]] 644 + name = "ciborium" 645 + version = "0.2.2" 646 + source = "registry+https://github.com/rust-lang/crates.io-index" 647 + checksum = "42e69ffd6f0917f5c029256a24d0161db17cea3997d185db0d35926308770f0e" 648 + dependencies = [ 649 + "ciborium-io", 650 + "ciborium-ll", 651 + "serde", 652 + ] 653 + 654 + [[package]] 655 + name = "ciborium-io" 656 + version = "0.2.2" 657 + source = "registry+https://github.com/rust-lang/crates.io-index" 658 + checksum = "05afea1e0a06c9be33d539b876f1ce3692f4afea2cb41f740e7743225ed1c757" 659 + 660 + [[package]] 661 + name = "ciborium-ll" 662 + version = "0.2.2" 663 + source = "registry+https://github.com/rust-lang/crates.io-index" 664 + checksum = "57663b653d948a338bfb3eeba9bb2fd5fcfaecb9e199e87e1eda4d9e8b240fd9" 665 + dependencies = [ 666 + "ciborium-io", 667 + "half", 668 + ] 669 + 670 + [[package]] 671 + name = "citationberg" 672 + version = "0.6.1" 673 + source = "registry+https://github.com/rust-lang/crates.io-index" 674 + checksum = "1f6597e8bdbca37f1f56e5a80d15857b0932aead21a78d20de49e99e74933046" 675 + dependencies = [ 676 + "quick-xml", 677 + "serde", 678 + ] 679 + 680 + [[package]] 555 681 name = "clap" 556 682 version = "4.6.0" 557 683 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 590 716 version = "1.1.0" 591 717 source = "registry+https://github.com/rust-lang/crates.io-index" 592 718 checksum = "c8d4a3bb8b1e0c1050499d1815f5ab16d04f0959b233085fb31653fbfc9d98f9" 719 + 720 + [[package]] 721 + name = "cobs" 722 + version = "0.3.0" 723 + source = "registry+https://github.com/rust-lang/crates.io-index" 724 + checksum = "0fa961b519f0b462e3a3b4a34b64d119eeaca1d59af726fe450bbba07a9fc0a1" 725 + dependencies = [ 726 + "thiserror 2.0.18", 727 + ] 593 728 594 729 [[package]] 595 730 name = "codespan-reporting" ··· 603 738 ] 604 739 605 740 [[package]] 741 + name = "codex" 742 + version = "0.2.0" 743 + source = "registry+https://github.com/rust-lang/crates.io-index" 744 + checksum = "9589e1effc5cacbea347899645c654158b03b2053d24bb426fd3128ced6e423c" 745 + 746 + [[package]] 747 + name = "color_quant" 748 + version = "1.1.0" 749 + source = "registry+https://github.com/rust-lang/crates.io-index" 750 + checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" 751 + 752 + [[package]] 606 753 name = "colorchoice" 607 754 version = "1.0.5" 608 755 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 618 765 ] 619 766 620 767 [[package]] 768 + name = "comemo" 769 + version = "0.5.1" 770 + source = "registry+https://github.com/rust-lang/crates.io-index" 771 + checksum = "3c963350b2b08aa4b725d7802593245380ab53dacfedcaa971385fc33306c0d4" 772 + dependencies = [ 773 + "comemo-macros", 774 + "parking_lot", 775 + "rustc-hash 2.1.1", 776 + "siphasher", 777 + "slab", 778 + ] 779 + 780 + [[package]] 781 + name = "comemo-macros" 782 + version = "0.5.1" 783 + source = "registry+https://github.com/rust-lang/crates.io-index" 784 + checksum = "a3c400139ba1389ef9e20ad2d87cda68b437a66483aa0da616bdf2cea7413853" 785 + dependencies = [ 786 + "proc-macro2", 787 + "quote", 788 + "syn", 789 + ] 790 + 791 + [[package]] 621 792 name = "concurrent-queue" 622 793 version = "2.5.0" 623 794 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 654 825 ] 655 826 656 827 [[package]] 828 + name = "core_maths" 829 + version = "0.1.1" 830 + source = "registry+https://github.com/rust-lang/crates.io-index" 831 + checksum = "77745e017f5edba1a9c1d854f6f3a52dac8a12dd5af5d2f54aecf61e43d80d30" 832 + dependencies = [ 833 + "libm", 834 + ] 835 + 836 + [[package]] 657 837 name = "crc32fast" 658 838 version = "1.5.0" 659 839 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 757 937 "log", 758 938 "num-traits", 759 939 "portable-atomic", 760 - "rand", 940 + "rand 0.9.2", 761 941 "sanitize-filename 0.5.0", 762 942 "serde", 763 943 "serde_json", ··· 1030 1210 version = "2.10.0" 1031 1211 source = "registry+https://github.com/rust-lang/crates.io-index" 1032 1212 checksum = "d7a1e2f27636f116493b8b860f5546edb47c8d8f8ea73e1d2a20be88e28d1fea" 1213 + 1214 + [[package]] 1215 + name = "data-url" 1216 + version = "0.3.2" 1217 + source = "registry+https://github.com/rust-lang/crates.io-index" 1218 + checksum = "be1e0bca6c3637f992fc1cc7cbc52a78c1ef6db076dbf1059c4323d6a2048376" 1033 1219 1034 1220 [[package]] 1035 1221 name = "deranged" ··· 1204 1390 checksum = "dc2d050bdc5c21e0862a89256ed8029ae6c290a93aecefc73084b3002cdebb01" 1205 1391 1206 1392 [[package]] 1393 + name = "embedded-io" 1394 + version = "0.4.0" 1395 + source = "registry+https://github.com/rust-lang/crates.io-index" 1396 + checksum = "ef1a6892d9eef45c8fa6b9e0086428a2cca8491aca8f787c534a3d6d0bcb3ced" 1397 + 1398 + [[package]] 1399 + name = "embedded-io" 1400 + version = "0.6.1" 1401 + source = "registry+https://github.com/rust-lang/crates.io-index" 1402 + checksum = "edd0f118536f44f5ccd48bcb8b111bdc3de888b58c74639dfb034a357d0f206d" 1403 + 1404 + [[package]] 1207 1405 name = "enum-as-inner" 1208 1406 version = "0.6.1" 1209 1407 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 1216 1414 ] 1217 1415 1218 1416 [[package]] 1417 + name = "enum-ordinalize" 1418 + version = "4.3.2" 1419 + source = "registry+https://github.com/rust-lang/crates.io-index" 1420 + checksum = "4a1091a7bb1f8f2c4b28f1fe2cef4980ca2d410a3d727d67ecc3178c9b0800f0" 1421 + dependencies = [ 1422 + "enum-ordinalize-derive", 1423 + ] 1424 + 1425 + [[package]] 1426 + name = "enum-ordinalize-derive" 1427 + version = "4.3.2" 1428 + source = "registry+https://github.com/rust-lang/crates.io-index" 1429 + checksum = "8ca9601fb2d62598ee17836250842873a413586e5d7ed88b356e38ddbb0ec631" 1430 + dependencies = [ 1431 + "proc-macro2", 1432 + "quote", 1433 + "syn", 1434 + ] 1435 + 1436 + [[package]] 1219 1437 name = "equivalent" 1220 1438 version = "1.0.2" 1221 1439 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 1232 1450 ] 1233 1451 1234 1452 [[package]] 1453 + name = "euclid" 1454 + version = "0.22.14" 1455 + source = "registry+https://github.com/rust-lang/crates.io-index" 1456 + checksum = "f1a05365e3b1c6d1650318537c7460c6923f1abdd272ad6842baa2b509957a06" 1457 + dependencies = [ 1458 + "num-traits", 1459 + ] 1460 + 1461 + [[package]] 1235 1462 name = "event-listener" 1236 1463 version = "5.4.1" 1237 1464 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 1253 1480 ] 1254 1481 1255 1482 [[package]] 1483 + name = "fancy-regex" 1484 + version = "0.16.2" 1485 + source = "registry+https://github.com/rust-lang/crates.io-index" 1486 + checksum = "998b056554fbe42e03ae0e152895cd1a7e1002aec800fdc6635d20270260c46f" 1487 + dependencies = [ 1488 + "bit-set", 1489 + "regex-automata", 1490 + "regex-syntax", 1491 + ] 1492 + 1493 + [[package]] 1494 + name = "fast-srgb8" 1495 + version = "1.0.0" 1496 + source = "registry+https://github.com/rust-lang/crates.io-index" 1497 + checksum = "dd2e7510819d6fbf51a5545c8f922716ecfb14df168a3242f7d33e0239efe6a1" 1498 + 1499 + [[package]] 1256 1500 name = "fastrand" 1257 1501 version = "2.3.0" 1258 1502 source = "registry+https://github.com/rust-lang/crates.io-index" 1259 1503 checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" 1260 1504 1261 1505 [[package]] 1506 + name = "fdeflate" 1507 + version = "0.3.7" 1508 + source = "registry+https://github.com/rust-lang/crates.io-index" 1509 + checksum = "1e6853b52649d4ac5c0bd02320cddc5ba956bdb407c4b75a2c6b75bf51500f8c" 1510 + dependencies = [ 1511 + "simd-adler32", 1512 + ] 1513 + 1514 + [[package]] 1262 1515 name = "find-msvc-tools" 1263 1516 version = "0.1.9" 1264 1517 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 1275 1528 ] 1276 1529 1277 1530 [[package]] 1531 + name = "float-cmp" 1532 + version = "0.9.0" 1533 + source = "registry+https://github.com/rust-lang/crates.io-index" 1534 + checksum = "98de4bbd547a563b716d8dfa9aad1cb19bfab00f4fa09a6a4ed21dbcf44ce9c4" 1535 + 1536 + [[package]] 1278 1537 name = "float-ord" 1279 1538 version = "0.3.2" 1280 1539 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 1293 1552 checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" 1294 1553 1295 1554 [[package]] 1555 + name = "font-types" 1556 + version = "0.10.1" 1557 + source = "registry+https://github.com/rust-lang/crates.io-index" 1558 + checksum = "39a654f404bbcbd48ea58c617c2993ee91d1cb63727a37bf2323a4edeed1b8c5" 1559 + dependencies = [ 1560 + "bytemuck", 1561 + ] 1562 + 1563 + [[package]] 1564 + name = "fontdb" 1565 + version = "0.23.0" 1566 + source = "registry+https://github.com/rust-lang/crates.io-index" 1567 + checksum = "457e789b3d1202543297a350643cf459f836cade38934e7a4cf6a39e7cde2905" 1568 + dependencies = [ 1569 + "log", 1570 + "slotmap", 1571 + "tinyvec", 1572 + "ttf-parser", 1573 + ] 1574 + 1575 + [[package]] 1296 1576 name = "foreign-types" 1297 1577 version = "0.5.0" 1298 1578 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 1339 1619 "log", 1340 1620 "ndarray", 1341 1621 "priority-queue", 1342 - "rand", 1622 + "rand 0.9.2", 1343 1623 "rayon", 1344 1624 "serde", 1345 1625 "snafu", ··· 1681 1961 ] 1682 1962 1683 1963 [[package]] 1964 + name = "gif" 1965 + version = "0.13.3" 1966 + source = "registry+https://github.com/rust-lang/crates.io-index" 1967 + checksum = "4ae047235e33e2829703574b54fdec96bfbad892062d97fed2f76022287de61b" 1968 + dependencies = [ 1969 + "color_quant", 1970 + "weezl", 1971 + ] 1972 + 1973 + [[package]] 1974 + name = "gif" 1975 + version = "0.14.1" 1976 + source = "registry+https://github.com/rust-lang/crates.io-index" 1977 + checksum = "f5df2ba84018d80c213569363bdcd0c64e6933c67fe4c1d60ecf822971a3c35e" 1978 + dependencies = [ 1979 + "color_quant", 1980 + "weezl", 1981 + ] 1982 + 1983 + [[package]] 1684 1984 name = "git2" 1685 1985 version = "0.20.4" 1686 1986 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 1707 2007 ] 1708 2008 1709 2009 [[package]] 2010 + name = "glidesort" 2011 + version = "0.1.2" 2012 + source = "registry+https://github.com/rust-lang/crates.io-index" 2013 + checksum = "f2e102e6eb644d3e0b186fc161e4460417880a0a0b87d235f2e5b8fb30f2e9e0" 2014 + 2015 + [[package]] 1710 2016 name = "glob" 1711 2017 version = "0.3.3" 1712 2018 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 1794 2100 "cfg-if", 1795 2101 "crunchy", 1796 2102 "num-traits", 1797 - "rand", 2103 + "rand 0.9.2", 1798 2104 "rand_distr", 1799 2105 "serde", 1800 2106 "zerocopy", ··· 1839 2145 checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" 1840 2146 1841 2147 [[package]] 2148 + name = "hayagriva" 2149 + version = "0.9.1" 2150 + source = "registry+https://github.com/rust-lang/crates.io-index" 2151 + checksum = "1cb69425736f184173b3ca6e27fcba440a61492a790c786b1c6af7e06a03e575" 2152 + dependencies = [ 2153 + "biblatex", 2154 + "ciborium", 2155 + "citationberg", 2156 + "indexmap", 2157 + "paste", 2158 + "roman-numerals-rs", 2159 + "serde", 2160 + "serde_yaml", 2161 + "thiserror 2.0.18", 2162 + "unic-langid", 2163 + "unicode-segmentation", 2164 + "unscanny", 2165 + "url", 2166 + ] 2167 + 2168 + [[package]] 2169 + name = "hayro" 2170 + version = "0.4.0" 2171 + source = "registry+https://github.com/rust-lang/crates.io-index" 2172 + checksum = "048488ba88552bb0fb2a7e4001c64d5bed65d1a92167186a1bb9151571f32e60" 2173 + dependencies = [ 2174 + "bytemuck", 2175 + "hayro-interpret", 2176 + "image", 2177 + "kurbo 0.12.0", 2178 + ] 2179 + 2180 + [[package]] 2181 + name = "hayro-font" 2182 + version = "0.3.0" 2183 + source = "registry+https://github.com/rust-lang/crates.io-index" 2184 + checksum = "10e7e97ce840a6a70e7901e240ec65ba61106b66b37a4a1b899a2ce484248463" 2185 + dependencies = [ 2186 + "log", 2187 + "phf", 2188 + ] 2189 + 2190 + [[package]] 2191 + name = "hayro-interpret" 2192 + version = "0.4.0" 2193 + source = "registry+https://github.com/rust-lang/crates.io-index" 2194 + checksum = "56204c972d08e844f3db13b1e14be769f846e576699b46d4f4637cc4f8f70102" 2195 + dependencies = [ 2196 + "bitflags 2.11.0", 2197 + "hayro-font", 2198 + "hayro-syntax", 2199 + "kurbo 0.12.0", 2200 + "log", 2201 + "moxcms 0.7.11", 2202 + "phf", 2203 + "rustc-hash 2.1.1", 2204 + "siphasher", 2205 + "skrifa", 2206 + "smallvec", 2207 + "yoke 0.8.1", 2208 + ] 2209 + 2210 + [[package]] 2211 + name = "hayro-svg" 2212 + version = "0.2.0" 2213 + source = "registry+https://github.com/rust-lang/crates.io-index" 2214 + checksum = "e8c673304cec6e0dfd3b4f71fccecd45646899aa70279b62d3f933842abc4ac5" 2215 + dependencies = [ 2216 + "base64", 2217 + "hayro-interpret", 2218 + "image", 2219 + "kurbo 0.12.0", 2220 + "siphasher", 2221 + "xmlwriter", 2222 + ] 2223 + 2224 + [[package]] 2225 + name = "hayro-syntax" 2226 + version = "0.4.0" 2227 + source = "registry+https://github.com/rust-lang/crates.io-index" 2228 + checksum = "3f9e5c7dbc0f11dc42775d1a6cc00f5f5137b90b6288dd7fe5f71d17b14d10be" 2229 + dependencies = [ 2230 + "flate2", 2231 + "kurbo 0.12.0", 2232 + "log", 2233 + "rustc-hash 2.1.1", 2234 + "smallvec", 2235 + "zune-jpeg 0.4.21", 2236 + ] 2237 + 2238 + [[package]] 1842 2239 name = "heck" 1843 2240 version = "0.5.0" 1844 2241 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 1857 2254 checksum = "dfa686283ad6dd069f105e5ab091b04c62850d3e4cf5d67debad1933f55023df" 1858 2255 1859 2256 [[package]] 2257 + name = "hypher" 2258 + version = "0.1.6" 2259 + source = "registry+https://github.com/rust-lang/crates.io-index" 2260 + checksum = "74e25026c579b170c59f8d3ddfc523d7dab0abe079f09eb8edaebd2417044f60" 2261 + 2262 + [[package]] 2263 + name = "icu_collections" 2264 + version = "1.5.0" 2265 + source = "registry+https://github.com/rust-lang/crates.io-index" 2266 + checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" 2267 + dependencies = [ 2268 + "displaydoc", 2269 + "serde", 2270 + "yoke 0.7.5", 2271 + "zerofrom", 2272 + "zerovec 0.10.4", 2273 + ] 2274 + 2275 + [[package]] 1860 2276 name = "icu_collections" 1861 2277 version = "2.1.1" 1862 2278 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 1866 2282 "potential_utf", 1867 2283 "yoke 0.8.1", 1868 2284 "zerofrom", 1869 - "zerovec", 2285 + "zerovec 0.11.5", 1870 2286 ] 1871 2287 1872 2288 [[package]] ··· 1876 2292 checksum = "edba7861004dd3714265b4db54a3c390e880ab658fec5f7db895fae2046b5bb6" 1877 2293 dependencies = [ 1878 2294 "displaydoc", 1879 - "litemap", 1880 - "tinystr", 1881 - "writeable", 1882 - "zerovec", 2295 + "litemap 0.8.1", 2296 + "tinystr 0.8.2", 2297 + "writeable 0.6.2", 2298 + "zerovec 0.11.5", 1883 2299 ] 1884 2300 1885 2301 [[package]] 2302 + name = "icu_locid" 2303 + version = "1.5.0" 2304 + source = "registry+https://github.com/rust-lang/crates.io-index" 2305 + checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" 2306 + dependencies = [ 2307 + "displaydoc", 2308 + "litemap 0.7.5", 2309 + "tinystr 0.7.6", 2310 + "writeable 0.5.5", 2311 + "zerovec 0.10.4", 2312 + ] 2313 + 2314 + [[package]] 2315 + name = "icu_locid_transform" 2316 + version = "1.5.0" 2317 + source = "registry+https://github.com/rust-lang/crates.io-index" 2318 + checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" 2319 + dependencies = [ 2320 + "displaydoc", 2321 + "icu_locid", 2322 + "icu_locid_transform_data", 2323 + "icu_provider 1.5.0", 2324 + "tinystr 0.7.6", 2325 + "zerovec 0.10.4", 2326 + ] 2327 + 2328 + [[package]] 2329 + name = "icu_locid_transform_data" 2330 + version = "1.5.1" 2331 + source = "registry+https://github.com/rust-lang/crates.io-index" 2332 + checksum = "7515e6d781098bf9f7205ab3fc7e9709d34554ae0b21ddbcb5febfa4bc7df11d" 2333 + 2334 + [[package]] 1886 2335 name = "icu_normalizer" 1887 2336 version = "2.1.1" 1888 2337 source = "registry+https://github.com/rust-lang/crates.io-index" 1889 2338 checksum = "5f6c8828b67bf8908d82127b2054ea1b4427ff0230ee9141c54251934ab1b599" 1890 2339 dependencies = [ 1891 - "icu_collections", 2340 + "icu_collections 2.1.1", 1892 2341 "icu_normalizer_data", 1893 - "icu_properties", 1894 - "icu_provider", 2342 + "icu_properties 2.1.2", 2343 + "icu_provider 2.1.1", 1895 2344 "smallvec", 1896 - "zerovec", 2345 + "zerovec 0.11.5", 1897 2346 ] 1898 2347 1899 2348 [[package]] ··· 1904 2353 1905 2354 [[package]] 1906 2355 name = "icu_properties" 2356 + version = "1.5.1" 2357 + source = "registry+https://github.com/rust-lang/crates.io-index" 2358 + checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" 2359 + dependencies = [ 2360 + "displaydoc", 2361 + "icu_collections 1.5.0", 2362 + "icu_locid_transform", 2363 + "icu_properties_data 1.5.1", 2364 + "icu_provider 1.5.0", 2365 + "serde", 2366 + "tinystr 0.7.6", 2367 + "zerovec 0.10.4", 2368 + ] 2369 + 2370 + [[package]] 2371 + name = "icu_properties" 1907 2372 version = "2.1.2" 1908 2373 source = "registry+https://github.com/rust-lang/crates.io-index" 1909 2374 checksum = "020bfc02fe870ec3a66d93e677ccca0562506e5872c650f893269e08615d74ec" 1910 2375 dependencies = [ 1911 - "icu_collections", 2376 + "icu_collections 2.1.1", 1912 2377 "icu_locale_core", 1913 - "icu_properties_data", 1914 - "icu_provider", 1915 - "zerotrie", 1916 - "zerovec", 2378 + "icu_properties_data 2.1.2", 2379 + "icu_provider 2.1.1", 2380 + "zerotrie 0.2.3", 2381 + "zerovec 0.11.5", 1917 2382 ] 1918 2383 1919 2384 [[package]] 1920 2385 name = "icu_properties_data" 2386 + version = "1.5.1" 2387 + source = "registry+https://github.com/rust-lang/crates.io-index" 2388 + checksum = "85fb8799753b75aee8d2a21d7c14d9f38921b54b3dbda10f5a3c7a7b82dba5e2" 2389 + 2390 + [[package]] 2391 + name = "icu_properties_data" 1921 2392 version = "2.1.2" 1922 2393 source = "registry+https://github.com/rust-lang/crates.io-index" 1923 2394 checksum = "616c294cf8d725c6afcd8f55abc17c56464ef6211f9ed59cccffe534129c77af" 2395 + 2396 + [[package]] 2397 + name = "icu_provider" 2398 + version = "1.5.0" 2399 + source = "registry+https://github.com/rust-lang/crates.io-index" 2400 + checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" 2401 + dependencies = [ 2402 + "displaydoc", 2403 + "icu_locid", 2404 + "icu_provider_macros", 2405 + "postcard", 2406 + "serde", 2407 + "stable_deref_trait", 2408 + "tinystr 0.7.6", 2409 + "writeable 0.5.5", 2410 + "yoke 0.7.5", 2411 + "zerofrom", 2412 + "zerovec 0.10.4", 2413 + ] 1924 2414 1925 2415 [[package]] 1926 2416 name = "icu_provider" ··· 1930 2420 dependencies = [ 1931 2421 "displaydoc", 1932 2422 "icu_locale_core", 1933 - "writeable", 2423 + "writeable 0.6.2", 1934 2424 "yoke 0.8.1", 1935 2425 "zerofrom", 1936 - "zerotrie", 1937 - "zerovec", 2426 + "zerotrie 0.2.3", 2427 + "zerovec 0.11.5", 2428 + ] 2429 + 2430 + [[package]] 2431 + name = "icu_provider_adapters" 2432 + version = "1.5.0" 2433 + source = "registry+https://github.com/rust-lang/crates.io-index" 2434 + checksum = "d6324dfd08348a8e0374a447ebd334044d766b1839bb8d5ccf2482a99a77c0bc" 2435 + dependencies = [ 2436 + "icu_locid", 2437 + "icu_locid_transform", 2438 + "icu_provider 1.5.0", 2439 + "tinystr 0.7.6", 2440 + "zerovec 0.10.4", 2441 + ] 2442 + 2443 + [[package]] 2444 + name = "icu_provider_blob" 2445 + version = "1.5.0" 2446 + source = "registry+https://github.com/rust-lang/crates.io-index" 2447 + checksum = "c24b98d1365f55d78186c205817631a4acf08d7a45bdf5dc9dcf9c5d54dccf51" 2448 + dependencies = [ 2449 + "icu_provider 1.5.0", 2450 + "postcard", 2451 + "serde", 2452 + "writeable 0.5.5", 2453 + "zerotrie 0.1.3", 2454 + "zerovec 0.10.4", 2455 + ] 2456 + 2457 + [[package]] 2458 + name = "icu_provider_macros" 2459 + version = "1.5.0" 2460 + source = "registry+https://github.com/rust-lang/crates.io-index" 2461 + checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" 2462 + dependencies = [ 2463 + "proc-macro2", 2464 + "quote", 2465 + "syn", 2466 + ] 2467 + 2468 + [[package]] 2469 + name = "icu_segmenter" 2470 + version = "1.5.0" 2471 + source = "registry+https://github.com/rust-lang/crates.io-index" 2472 + checksum = "a717725612346ffc2d7b42c94b820db6908048f39434504cb130e8b46256b0de" 2473 + dependencies = [ 2474 + "core_maths", 2475 + "displaydoc", 2476 + "icu_collections 1.5.0", 2477 + "icu_locid", 2478 + "icu_provider 1.5.0", 2479 + "icu_segmenter_data", 2480 + "serde", 2481 + "utf8_iter", 2482 + "zerovec 0.10.4", 1938 2483 ] 2484 + 2485 + [[package]] 2486 + name = "icu_segmenter_data" 2487 + version = "1.5.1" 2488 + source = "registry+https://github.com/rust-lang/crates.io-index" 2489 + checksum = "a1e52775179941363cc594e49ce99284d13d6948928d8e72c755f55e98caa1eb" 1939 2490 1940 2491 [[package]] 1941 2492 name = "id-arena" ··· 1967 2518 checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344" 1968 2519 dependencies = [ 1969 2520 "icu_normalizer", 1970 - "icu_properties", 2521 + "icu_properties 2.1.2", 2522 + ] 2523 + 2524 + [[package]] 2525 + name = "image" 2526 + version = "0.25.10" 2527 + source = "registry+https://github.com/rust-lang/crates.io-index" 2528 + checksum = "85ab80394333c02fe689eaf900ab500fbd0c2213da414687ebf995a65d5a6104" 2529 + dependencies = [ 2530 + "bytemuck", 2531 + "byteorder-lite", 2532 + "color_quant", 2533 + "gif 0.14.1", 2534 + "image-webp", 2535 + "moxcms 0.8.1", 2536 + "num-traits", 2537 + "png 0.18.1", 2538 + "zune-core 0.5.1", 2539 + "zune-jpeg 0.5.13", 1971 2540 ] 2541 + 2542 + [[package]] 2543 + name = "image-webp" 2544 + version = "0.2.4" 2545 + source = "registry+https://github.com/rust-lang/crates.io-index" 2546 + checksum = "525e9ff3e1a4be2fbea1fdf0e98686a6d98b4d8f937e1bf7402245af1909e8c3" 2547 + dependencies = [ 2548 + "byteorder-lite", 2549 + "quick-error", 2550 + ] 2551 + 2552 + [[package]] 2553 + name = "imagesize" 2554 + version = "0.13.0" 2555 + source = "registry+https://github.com/rust-lang/crates.io-index" 2556 + checksum = "edcd27d72f2f071c64249075f42e205ff93c9a4c5f6c6da53e79ed9f9832c285" 1972 2557 1973 2558 [[package]] 1974 2559 name = "indexmap" ··· 2030 2615 ] 2031 2616 2032 2617 [[package]] 2618 + name = "kamadak-exif" 2619 + version = "0.6.1" 2620 + source = "registry+https://github.com/rust-lang/crates.io-index" 2621 + checksum = "1130d80c7374efad55a117d715a3af9368f0fa7a2c54573afc15a188cd984837" 2622 + dependencies = [ 2623 + "mutate_once", 2624 + ] 2625 + 2626 + [[package]] 2033 2627 name = "khronos-egl" 2034 2628 version = "6.0.0" 2035 2629 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 2045 2639 version = "3.1.0" 2046 2640 source = "registry+https://github.com/rust-lang/crates.io-index" 2047 2641 checksum = "e2db585e1d738fc771bf08a151420d3ed193d9d895a36df7f6f8a9456b911ddc" 2642 + 2643 + [[package]] 2644 + name = "kurbo" 2645 + version = "0.11.3" 2646 + source = "registry+https://github.com/rust-lang/crates.io-index" 2647 + checksum = "c62026ae44756f8a599ba21140f350303d4f08dcdcc71b5ad9c9bb8128c13c62" 2648 + dependencies = [ 2649 + "arrayvec", 2650 + "euclid", 2651 + "smallvec", 2652 + ] 2653 + 2654 + [[package]] 2655 + name = "kurbo" 2656 + version = "0.12.0" 2657 + source = "registry+https://github.com/rust-lang/crates.io-index" 2658 + checksum = "ce9729cc38c18d86123ab736fd2e7151763ba226ac2490ec092d1dd148825e32" 2659 + dependencies = [ 2660 + "arrayvec", 2661 + "euclid", 2662 + "smallvec", 2663 + ] 2048 2664 2049 2665 [[package]] 2050 2666 name = "lazy_static" ··· 2130 2746 ] 2131 2747 2132 2748 [[package]] 2749 + name = "linked-hash-map" 2750 + version = "0.5.6" 2751 + source = "registry+https://github.com/rust-lang/crates.io-index" 2752 + checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" 2753 + 2754 + [[package]] 2133 2755 name = "linux-raw-sys" 2134 2756 version = "0.12.1" 2135 2757 source = "registry+https://github.com/rust-lang/crates.io-index" 2136 2758 checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53" 2759 + 2760 + [[package]] 2761 + name = "lipsum" 2762 + version = "0.9.1" 2763 + source = "registry+https://github.com/rust-lang/crates.io-index" 2764 + checksum = "636860251af8963cc40f6b4baadee105f02e21b28131d76eba8e40ce84ab8064" 2765 + dependencies = [ 2766 + "rand 0.8.5", 2767 + "rand_chacha 0.3.1", 2768 + ] 2769 + 2770 + [[package]] 2771 + name = "litemap" 2772 + version = "0.7.5" 2773 + source = "registry+https://github.com/rust-lang/crates.io-index" 2774 + checksum = "23fb14cb19457329c82206317a5663005a4d404783dc74f4252769b0d5f42856" 2775 + dependencies = [ 2776 + "serde", 2777 + ] 2137 2778 2138 2779 [[package]] 2139 2780 name = "litemap" ··· 2272 2913 checksum = "4a0b3262dc837d2513fe2ef31ff8461352ef932dcca31ba0c0abe33547cf6b9b" 2273 2914 2274 2915 [[package]] 2916 + name = "moxcms" 2917 + version = "0.7.11" 2918 + source = "registry+https://github.com/rust-lang/crates.io-index" 2919 + checksum = "ac9557c559cd6fc9867e122e20d2cbefc9ca29d80d027a8e39310920ed2f0a97" 2920 + dependencies = [ 2921 + "num-traits", 2922 + "pxfm", 2923 + ] 2924 + 2925 + [[package]] 2926 + name = "moxcms" 2927 + version = "0.8.1" 2928 + source = "registry+https://github.com/rust-lang/crates.io-index" 2929 + checksum = "bb85c154ba489f01b25c0d36ae69a87e4a1c73a72631fc6c0eb6dde34a73e44b" 2930 + dependencies = [ 2931 + "num-traits", 2932 + "pxfm", 2933 + ] 2934 + 2935 + [[package]] 2936 + name = "mutate_once" 2937 + version = "0.1.2" 2938 + source = "registry+https://github.com/rust-lang/crates.io-index" 2939 + checksum = "13d2233c9842d08cfe13f9eac96e207ca6a2ea10b80259ebe8ad0268be27d2af" 2940 + 2941 + [[package]] 2275 2942 name = "naga" 2276 2943 version = "25.0.1" 2277 2944 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 2495 3162 ] 2496 3163 2497 3164 [[package]] 3165 + name = "object" 3166 + version = "0.37.3" 3167 + source = "registry+https://github.com/rust-lang/crates.io-index" 3168 + checksum = "ff76201f031d8863c38aa7f905eca4f53abbfa15f609db4277d44cd8938f33fe" 3169 + dependencies = [ 3170 + "memchr", 3171 + ] 3172 + 3173 + [[package]] 2498 3174 name = "once_cell" 2499 3175 version = "1.21.4" 2500 3176 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 2540 3216 ] 2541 3217 2542 3218 [[package]] 3219 + name = "palette" 3220 + version = "0.7.6" 3221 + source = "registry+https://github.com/rust-lang/crates.io-index" 3222 + checksum = "4cbf71184cc5ecc2e4e1baccdb21026c20e5fc3dcf63028a086131b3ab00b6e6" 3223 + dependencies = [ 3224 + "approx", 3225 + "fast-srgb8", 3226 + "libm", 3227 + "palette_derive", 3228 + ] 3229 + 3230 + [[package]] 3231 + name = "palette_derive" 3232 + version = "0.7.6" 3233 + source = "registry+https://github.com/rust-lang/crates.io-index" 3234 + checksum = "f5030daf005bface118c096f510ffb781fc28f9ab6a32ab224d8631be6851d30" 3235 + dependencies = [ 3236 + "by_address", 3237 + "proc-macro2", 3238 + "quote", 3239 + "syn", 3240 + ] 3241 + 3242 + [[package]] 2543 3243 name = "parking" 2544 3244 version = "2.2.1" 2545 3245 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 2581 3281 checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" 2582 3282 2583 3283 [[package]] 3284 + name = "phf" 3285 + version = "0.13.1" 3286 + source = "registry+https://github.com/rust-lang/crates.io-index" 3287 + checksum = "c1562dc717473dbaa4c1f85a36410e03c047b2e7df7f45ee938fbef64ae7fadf" 3288 + dependencies = [ 3289 + "phf_macros", 3290 + "phf_shared", 3291 + "serde", 3292 + ] 3293 + 3294 + [[package]] 3295 + name = "phf_generator" 3296 + version = "0.13.1" 3297 + source = "registry+https://github.com/rust-lang/crates.io-index" 3298 + checksum = "135ace3a761e564ec88c03a77317a7c6b80bb7f7135ef2544dbe054243b89737" 3299 + dependencies = [ 3300 + "fastrand", 3301 + "phf_shared", 3302 + ] 3303 + 3304 + [[package]] 3305 + name = "phf_macros" 3306 + version = "0.13.1" 3307 + source = "registry+https://github.com/rust-lang/crates.io-index" 3308 + checksum = "812f032b54b1e759ccd5f8b6677695d5268c588701effba24601f6932f8269ef" 3309 + dependencies = [ 3310 + "phf_generator", 3311 + "phf_shared", 3312 + "proc-macro2", 3313 + "quote", 3314 + "syn", 3315 + ] 3316 + 3317 + [[package]] 3318 + name = "phf_shared" 3319 + version = "0.13.1" 3320 + source = "registry+https://github.com/rust-lang/crates.io-index" 3321 + checksum = "e57fef6bc5981e38c2ce2d63bfa546861309f875b8a75f092d1d54ae2d64f266" 3322 + dependencies = [ 3323 + "siphasher", 3324 + ] 3325 + 3326 + [[package]] 3327 + name = "pico-args" 3328 + version = "0.5.0" 3329 + source = "registry+https://github.com/rust-lang/crates.io-index" 3330 + checksum = "5be167a7af36ee22fe3115051bc51f6e6c7054c9348e28deb4f49bd6f705a315" 3331 + 3332 + [[package]] 2584 3333 name = "pin-project-lite" 2585 3334 version = "0.2.17" 2586 3335 source = "registry+https://github.com/rust-lang/crates.io-index" 2587 3336 checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" 2588 3337 2589 3338 [[package]] 3339 + name = "pixglyph" 3340 + version = "0.6.0" 3341 + source = "registry+https://github.com/rust-lang/crates.io-index" 3342 + checksum = "3c1106193bc18a4b840eb075ff6664c8a0b0270f0531bb12a7e9c803e53b55c5" 3343 + dependencies = [ 3344 + "ttf-parser", 3345 + ] 3346 + 3347 + [[package]] 2590 3348 name = "pkg-config" 2591 3349 version = "0.3.32" 2592 3350 source = "registry+https://github.com/rust-lang/crates.io-index" 2593 3351 checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" 2594 3352 2595 3353 [[package]] 3354 + name = "plist" 3355 + version = "1.8.0" 3356 + source = "registry+https://github.com/rust-lang/crates.io-index" 3357 + checksum = "740ebea15c5d1428f910cd1a5f52cebf8d25006245ed8ade92702f4943d91e07" 3358 + dependencies = [ 3359 + "base64", 3360 + "indexmap", 3361 + "quick-xml", 3362 + "serde", 3363 + "time", 3364 + ] 3365 + 3366 + [[package]] 3367 + name = "png" 3368 + version = "0.17.16" 3369 + source = "registry+https://github.com/rust-lang/crates.io-index" 3370 + checksum = "82151a2fc869e011c153adc57cf2789ccb8d9906ce52c0b39a6b5697749d7526" 3371 + dependencies = [ 3372 + "bitflags 1.3.2", 3373 + "crc32fast", 3374 + "fdeflate", 3375 + "flate2", 3376 + "miniz_oxide", 3377 + ] 3378 + 3379 + [[package]] 3380 + name = "png" 3381 + version = "0.18.1" 3382 + source = "registry+https://github.com/rust-lang/crates.io-index" 3383 + checksum = "60769b8b31b2a9f263dae2776c37b1b28ae246943cf719eb6946a1db05128a61" 3384 + dependencies = [ 3385 + "bitflags 2.11.0", 3386 + "crc32fast", 3387 + "fdeflate", 3388 + "flate2", 3389 + "miniz_oxide", 3390 + ] 3391 + 3392 + [[package]] 2596 3393 name = "portable-atomic" 2597 3394 version = "1.13.1" 2598 3395 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 2611 3408 ] 2612 3409 2613 3410 [[package]] 3411 + name = "postcard" 3412 + version = "1.1.3" 3413 + source = "registry+https://github.com/rust-lang/crates.io-index" 3414 + checksum = "6764c3b5dd454e283a30e6dfe78e9b31096d9e32036b5d1eaac7a6119ccb9a24" 3415 + dependencies = [ 3416 + "cobs", 3417 + "embedded-io 0.4.0", 3418 + "embedded-io 0.6.1", 3419 + "serde", 3420 + ] 3421 + 3422 + [[package]] 2614 3423 name = "potential_utf" 2615 3424 version = "0.1.4" 2616 3425 source = "registry+https://github.com/rust-lang/crates.io-index" 2617 3426 checksum = "b73949432f5e2a09657003c25bca5e19a0e9c84f8058ca374f49e0ebe605af77" 2618 3427 dependencies = [ 2619 - "zerovec", 3428 + "zerovec 0.11.5", 2620 3429 ] 2621 3430 2622 3431 [[package]] ··· 2671 3480 ] 2672 3481 2673 3482 [[package]] 3483 + name = "proc-macro-hack" 3484 + version = "0.5.20+deprecated" 3485 + source = "registry+https://github.com/rust-lang/crates.io-index" 3486 + checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" 3487 + 3488 + [[package]] 2674 3489 name = "proc-macro2" 2675 3490 version = "1.0.106" 2676 3491 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 2686 3501 checksum = "3eb8486b569e12e2c32ad3e204dbaba5e4b5b216e9367044f25f1dba42341773" 2687 3502 2688 3503 [[package]] 3504 + name = "psm" 3505 + version = "0.1.30" 3506 + source = "registry+https://github.com/rust-lang/crates.io-index" 3507 + checksum = "3852766467df634d74f0b2d7819bf8dc483a0eb2e3b0f50f756f9cfe8b0d18d8" 3508 + dependencies = [ 3509 + "ar_archive_writer", 3510 + "cc", 3511 + ] 3512 + 3513 + [[package]] 2689 3514 name = "pulp" 2690 3515 version = "0.18.22" 2691 3516 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 2712 3537 ] 2713 3538 2714 3539 [[package]] 3540 + name = "pxfm" 3541 + version = "0.1.28" 3542 + source = "registry+https://github.com/rust-lang/crates.io-index" 3543 + checksum = "b5a041e753da8b807c9255f28de81879c78c876392ff2469cde94799b2896b9d" 3544 + 3545 + [[package]] 3546 + name = "qcms" 3547 + version = "0.3.0" 3548 + source = "registry+https://github.com/rust-lang/crates.io-index" 3549 + checksum = "edecfcd5d755a5e5d98e24cf43113e7cdaec5a070edd0f6b250c03a573da30fa" 3550 + 3551 + [[package]] 3552 + name = "quick-error" 3553 + version = "2.0.1" 3554 + source = "registry+https://github.com/rust-lang/crates.io-index" 3555 + checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3" 3556 + 3557 + [[package]] 3558 + name = "quick-xml" 3559 + version = "0.38.4" 3560 + source = "registry+https://github.com/rust-lang/crates.io-index" 3561 + checksum = "b66c2058c55a409d601666cffe35f04333cf1013010882cec174a7467cd4e21c" 3562 + dependencies = [ 3563 + "memchr", 3564 + "serde", 3565 + ] 3566 + 3567 + [[package]] 2715 3568 name = "quote" 2716 3569 version = "1.0.45" 2717 3570 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 2734 3587 2735 3588 [[package]] 2736 3589 name = "rand" 3590 + version = "0.8.5" 3591 + source = "registry+https://github.com/rust-lang/crates.io-index" 3592 + checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" 3593 + dependencies = [ 3594 + "rand_core 0.6.4", 3595 + ] 3596 + 3597 + [[package]] 3598 + name = "rand" 2737 3599 version = "0.9.2" 2738 3600 source = "registry+https://github.com/rust-lang/crates.io-index" 2739 3601 checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" 2740 3602 dependencies = [ 2741 - "rand_chacha", 2742 - "rand_core", 3603 + "rand_chacha 0.9.0", 3604 + "rand_core 0.9.5", 3605 + ] 3606 + 3607 + [[package]] 3608 + name = "rand_chacha" 3609 + version = "0.3.1" 3610 + source = "registry+https://github.com/rust-lang/crates.io-index" 3611 + checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" 3612 + dependencies = [ 3613 + "ppv-lite86", 3614 + "rand_core 0.6.4", 2743 3615 ] 2744 3616 2745 3617 [[package]] ··· 2749 3621 checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" 2750 3622 dependencies = [ 2751 3623 "ppv-lite86", 2752 - "rand_core", 3624 + "rand_core 0.9.5", 2753 3625 ] 2754 3626 2755 3627 [[package]] 2756 3628 name = "rand_core" 3629 + version = "0.6.4" 3630 + source = "registry+https://github.com/rust-lang/crates.io-index" 3631 + checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" 3632 + 3633 + [[package]] 3634 + name = "rand_core" 2757 3635 version = "0.9.5" 2758 3636 source = "registry+https://github.com/rust-lang/crates.io-index" 2759 3637 checksum = "76afc826de14238e6e8c374ddcc1fa19e374fd8dd986b0d2af0d02377261d83c" ··· 2768 3646 checksum = "6a8615d50dcf34fa31f7ab52692afec947c4dd0ab803cc87cb3b0b4570ff7463" 2769 3647 dependencies = [ 2770 3648 "num-traits", 2771 - "rand", 3649 + "rand 0.9.2", 2772 3650 ] 2773 3651 2774 3652 [[package]] ··· 2828 3706 ] 2829 3707 2830 3708 [[package]] 3709 + name = "read-fonts" 3710 + version = "0.35.0" 3711 + source = "registry+https://github.com/rust-lang/crates.io-index" 3712 + checksum = "6717cf23b488adf64b9d711329542ba34de147df262370221940dfabc2c91358" 3713 + dependencies = [ 3714 + "bytemuck", 3715 + "font-types", 3716 + ] 3717 + 3718 + [[package]] 2831 3719 name = "reborrow" 2832 3720 version = "0.5.5" 2833 3721 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 2906 3794 checksum = "19b30a45b0cd0bcca8037f3d0dc3421eaf95327a17cad11964fb8179b4fc4832" 2907 3795 2908 3796 [[package]] 3797 + name = "resvg" 3798 + version = "0.45.1" 3799 + source = "registry+https://github.com/rust-lang/crates.io-index" 3800 + checksum = "a8928798c0a55e03c9ca6c4c6846f76377427d2c1e1f7e6de3c06ae57942df43" 3801 + dependencies = [ 3802 + "gif 0.13.3", 3803 + "image-webp", 3804 + "log", 3805 + "pico-args", 3806 + "rgb", 3807 + "svgtypes", 3808 + "tiny-skia", 3809 + "usvg", 3810 + "zune-jpeg 0.4.21", 3811 + ] 3812 + 3813 + [[package]] 3814 + name = "rgb" 3815 + version = "0.8.53" 3816 + source = "registry+https://github.com/rust-lang/crates.io-index" 3817 + checksum = "47b34b781b31e5d73e9fbc8689c70551fd1ade9a19e3e28cfec8580a79290cc4" 3818 + dependencies = [ 3819 + "bytemuck", 3820 + ] 3821 + 3822 + [[package]] 2909 3823 name = "rmp" 2910 3824 version = "0.8.15" 2911 3825 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 2925 3839 ] 2926 3840 2927 3841 [[package]] 3842 + name = "roman-numerals-rs" 3843 + version = "3.1.0" 3844 + source = "registry+https://github.com/rust-lang/crates.io-index" 3845 + checksum = "c85cd47a33a4510b1424fe796498e174c6a9cf94e606460ef022a19f3e4ff85e" 3846 + 3847 + [[package]] 3848 + name = "roxmltree" 3849 + version = "0.20.0" 3850 + source = "registry+https://github.com/rust-lang/crates.io-index" 3851 + checksum = "6c20b6793b5c2fa6553b250154b78d6d0db37e72700ae35fad9387a46f487c97" 3852 + 3853 + [[package]] 2928 3854 name = "rstest" 2929 3855 version = "0.25.0" 2930 3856 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 2955 3881 ] 2956 3882 2957 3883 [[package]] 3884 + name = "rust_decimal" 3885 + version = "1.40.0" 3886 + source = "registry+https://github.com/rust-lang/crates.io-index" 3887 + checksum = "61f703d19852dbf87cbc513643fa81428361eb6940f1ac14fd58155d295a3eb0" 3888 + dependencies = [ 3889 + "arrayvec", 3890 + "num-traits", 3891 + ] 3892 + 3893 + [[package]] 2958 3894 name = "rustc-hash" 2959 3895 version = "1.1.0" 2960 3896 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 2993 3929 version = "1.0.22" 2994 3930 source = "registry+https://github.com/rust-lang/crates.io-index" 2995 3931 checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" 3932 + 3933 + [[package]] 3934 + name = "rustybuzz" 3935 + version = "0.20.1" 3936 + source = "registry+https://github.com/rust-lang/crates.io-index" 3937 + checksum = "fd3c7c96f8a08ee34eff8857b11b49b07d71d1c3f4e88f8a88d4c9e9f90b1702" 3938 + dependencies = [ 3939 + "bitflags 2.11.0", 3940 + "bytemuck", 3941 + "core_maths", 3942 + "log", 3943 + "smallvec", 3944 + "ttf-parser", 3945 + "unicode-bidi-mirroring", 3946 + "unicode-ccc", 3947 + "unicode-properties", 3948 + "unicode-script", 3949 + ] 2996 3950 2997 3951 [[package]] 2998 3952 name = "ryu" ··· 3119 4073 ] 3120 4074 3121 4075 [[package]] 4076 + name = "serde_yaml" 4077 + version = "0.9.34+deprecated" 4078 + source = "registry+https://github.com/rust-lang/crates.io-index" 4079 + checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" 4080 + dependencies = [ 4081 + "indexmap", 4082 + "itoa", 4083 + "ryu", 4084 + "serde", 4085 + "unsafe-libyaml", 4086 + ] 4087 + 4088 + [[package]] 3122 4089 name = "sharded-slab" 3123 4090 version = "0.1.7" 3124 4091 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 3140 4107 checksum = "e320a6c5ad31d271ad523dcf3ad13e2767ad8b1cb8f047f75a8aeaf8da139da2" 3141 4108 3142 4109 [[package]] 4110 + name = "simplecss" 4111 + version = "0.2.2" 4112 + source = "registry+https://github.com/rust-lang/crates.io-index" 4113 + checksum = "7a9c6883ca9c3c7c90e888de77b7a5c849c779d25d74a1269b0218b14e8b136c" 4114 + dependencies = [ 4115 + "log", 4116 + ] 4117 + 4118 + [[package]] 3143 4119 name = "siphasher" 3144 4120 version = "1.0.2" 3145 4121 source = "registry+https://github.com/rust-lang/crates.io-index" 3146 4122 checksum = "b2aa850e253778c88a04c3d7323b043aeda9d3e30d5971937c1855769763678e" 3147 4123 3148 4124 [[package]] 4125 + name = "skrifa" 4126 + version = "0.37.0" 4127 + source = "registry+https://github.com/rust-lang/crates.io-index" 4128 + checksum = "8c31071dedf532758ecf3fed987cdb4bd9509f900e026ab684b4ecb81ea49841" 4129 + dependencies = [ 4130 + "bytemuck", 4131 + "read-fonts", 4132 + ] 4133 + 4134 + [[package]] 3149 4135 name = "slab" 3150 4136 version = "0.4.12" 3151 4137 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 3223 4209 checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" 3224 4210 3225 4211 [[package]] 4212 + name = "stacker" 4213 + version = "0.1.23" 4214 + source = "registry+https://github.com/rust-lang/crates.io-index" 4215 + checksum = "08d74a23609d509411d10e2176dc2a4346e3b4aea2e7b1869f19fdedbc71c013" 4216 + dependencies = [ 4217 + "cc", 4218 + "cfg-if", 4219 + "libc", 4220 + "psm", 4221 + "windows-sys 0.59.0", 4222 + ] 4223 + 4224 + [[package]] 3226 4225 name = "static_assertions" 3227 4226 version = "1.1.0" 3228 4227 source = "registry+https://github.com/rust-lang/crates.io-index" 3229 4228 checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" 4229 + 4230 + [[package]] 4231 + name = "strict-num" 4232 + version = "0.1.1" 4233 + source = "registry+https://github.com/rust-lang/crates.io-index" 4234 + checksum = "6637bab7722d379c8b41ba849228d680cc12d0a45ba1fa2b48f2a30577a06731" 4235 + dependencies = [ 4236 + "float-cmp", 4237 + ] 3230 4238 3231 4239 [[package]] 3232 4240 name = "strsim" ··· 3278 4286 ] 3279 4287 3280 4288 [[package]] 4289 + name = "svgtypes" 4290 + version = "0.15.3" 4291 + source = "registry+https://github.com/rust-lang/crates.io-index" 4292 + checksum = "68c7541fff44b35860c1a7a47a7cadf3e4a304c457b58f9870d9706ece028afc" 4293 + dependencies = [ 4294 + "kurbo 0.11.3", 4295 + "siphasher", 4296 + ] 4297 + 4298 + [[package]] 3281 4299 name = "syn" 3282 4300 version = "2.0.117" 3283 4301 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 3300 4318 ] 3301 4319 3302 4320 [[package]] 4321 + name = "syntect" 4322 + version = "5.3.0" 4323 + source = "registry+https://github.com/rust-lang/crates.io-index" 4324 + checksum = "656b45c05d95a5704399aeef6bd0ddec7b2b3531b7c9e900abbf7c4d2190c925" 4325 + dependencies = [ 4326 + "bincode 1.3.3", 4327 + "fancy-regex", 4328 + "flate2", 4329 + "fnv", 4330 + "once_cell", 4331 + "plist", 4332 + "regex-syntax", 4333 + "serde", 4334 + "serde_derive", 4335 + "serde_json", 4336 + "thiserror 2.0.18", 4337 + "walkdir", 4338 + "yaml-rust", 4339 + ] 4340 + 4341 + [[package]] 3303 4342 name = "sysctl" 3304 4343 version = "0.5.5" 3305 4344 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 3380 4419 "fsrs", 3381 4420 "serde", 3382 4421 "serde_json", 4422 + ] 4423 + 4424 + [[package]] 4425 + name = "tala-typst" 4426 + version = "0.1.0" 4427 + dependencies = [ 4428 + "image", 4429 + "typst", 4430 + "typst-assets", 4431 + "typst-render", 3383 4432 ] 3384 4433 3385 4434 [[package]] ··· 3511 4560 ] 3512 4561 3513 4562 [[package]] 4563 + name = "tiny-skia" 4564 + version = "0.11.4" 4565 + source = "registry+https://github.com/rust-lang/crates.io-index" 4566 + checksum = "83d13394d44dae3207b52a326c0c85a8bf87f1541f23b0d143811088497b09ab" 4567 + dependencies = [ 4568 + "arrayref", 4569 + "arrayvec", 4570 + "bytemuck", 4571 + "cfg-if", 4572 + "log", 4573 + "png 0.17.16", 4574 + "tiny-skia-path", 4575 + ] 4576 + 4577 + [[package]] 4578 + name = "tiny-skia-path" 4579 + version = "0.11.4" 4580 + source = "registry+https://github.com/rust-lang/crates.io-index" 4581 + checksum = "9c9e7fc0c2e86a30b117d0462aa261b72b7a99b7ebd7deb3a14ceda95c5bdc93" 4582 + dependencies = [ 4583 + "arrayref", 4584 + "bytemuck", 4585 + "strict-num", 4586 + ] 4587 + 4588 + [[package]] 4589 + name = "tinystr" 4590 + version = "0.7.6" 4591 + source = "registry+https://github.com/rust-lang/crates.io-index" 4592 + checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" 4593 + dependencies = [ 4594 + "displaydoc", 4595 + "serde", 4596 + "zerovec 0.10.4", 4597 + ] 4598 + 4599 + [[package]] 3514 4600 name = "tinystr" 3515 4601 version = "0.8.2" 3516 4602 source = "registry+https://github.com/rust-lang/crates.io-index" 3517 4603 checksum = "42d3e9c45c09de15d06dd8acf5f4e0e399e85927b7f00711024eb7ae10fa4869" 3518 4604 dependencies = [ 3519 4605 "displaydoc", 3520 - "zerovec", 4606 + "serde_core", 4607 + "zerovec 0.11.5", 3521 4608 ] 4609 + 4610 + [[package]] 4611 + name = "tinyvec" 4612 + version = "1.11.0" 4613 + source = "registry+https://github.com/rust-lang/crates.io-index" 4614 + checksum = "3e61e67053d25a4e82c844e8424039d9745781b3fc4f32b8d55ed50f5f667ef3" 4615 + dependencies = [ 4616 + "tinyvec_macros", 4617 + ] 4618 + 4619 + [[package]] 4620 + name = "tinyvec_macros" 4621 + version = "0.1.1" 4622 + source = "registry+https://github.com/rust-lang/crates.io-index" 4623 + checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" 3522 4624 3523 4625 [[package]] 3524 4626 name = "toml" ··· 3661 4763 ] 3662 4764 3663 4765 [[package]] 4766 + name = "ttf-parser" 4767 + version = "0.25.1" 4768 + source = "registry+https://github.com/rust-lang/crates.io-index" 4769 + checksum = "d2df906b07856748fa3f6e0ad0cbaa047052d4a7dd609e231c4f72cee8c36f31" 4770 + dependencies = [ 4771 + "core_maths", 4772 + ] 4773 + 4774 + [[package]] 4775 + name = "two-face" 4776 + version = "0.4.5" 4777 + source = "registry+https://github.com/rust-lang/crates.io-index" 4778 + checksum = "39e51b6e60e545cfdae5a4639ff423818f52372211a8d9a3e892b4b0761f76b2" 4779 + dependencies = [ 4780 + "serde", 4781 + "serde_derive", 4782 + "syntect", 4783 + ] 4784 + 4785 + [[package]] 4786 + name = "typed-arena" 4787 + version = "2.0.2" 4788 + source = "registry+https://github.com/rust-lang/crates.io-index" 4789 + checksum = "6af6ae20167a9ece4bcb41af5b80f8a1f1df981f6391189ce00fd257af04126a" 4790 + 4791 + [[package]] 4792 + name = "typst" 4793 + version = "0.14.2" 4794 + source = "registry+https://github.com/rust-lang/crates.io-index" 4795 + checksum = "1f6511ee598476f4f322b4d13891083d96dbacb8f9c2b908604c7094ba390653" 4796 + dependencies = [ 4797 + "comemo", 4798 + "ecow", 4799 + "rustc-hash 2.1.1", 4800 + "typst-eval", 4801 + "typst-html", 4802 + "typst-layout", 4803 + "typst-library", 4804 + "typst-macros", 4805 + "typst-realize", 4806 + "typst-syntax", 4807 + "typst-timing", 4808 + "typst-utils", 4809 + ] 4810 + 4811 + [[package]] 4812 + name = "typst-assets" 4813 + version = "0.14.2" 4814 + source = "registry+https://github.com/rust-lang/crates.io-index" 4815 + checksum = "5613cb719a6222fe9b74027c3625d107767ec187bff26b8fc931cf58942c834f" 4816 + 4817 + [[package]] 4818 + name = "typst-eval" 4819 + version = "0.14.2" 4820 + source = "registry+https://github.com/rust-lang/crates.io-index" 4821 + checksum = "687757487dfc0c1e941344d5024cf7a28364e70c3e304faad89ac65597f62526" 4822 + dependencies = [ 4823 + "comemo", 4824 + "ecow", 4825 + "indexmap", 4826 + "rustc-hash 2.1.1", 4827 + "stacker", 4828 + "toml", 4829 + "typst-library", 4830 + "typst-macros", 4831 + "typst-syntax", 4832 + "typst-timing", 4833 + "typst-utils", 4834 + "unicode-segmentation", 4835 + ] 4836 + 4837 + [[package]] 4838 + name = "typst-html" 4839 + version = "0.14.2" 4840 + source = "registry+https://github.com/rust-lang/crates.io-index" 4841 + checksum = "e29f8da4f964d4c90739c3c1e0288b0ba1bccc3cc50623a6d558300b86ca8aad" 4842 + dependencies = [ 4843 + "bumpalo", 4844 + "comemo", 4845 + "ecow", 4846 + "palette", 4847 + "rustc-hash 2.1.1", 4848 + "time", 4849 + "typst-assets", 4850 + "typst-library", 4851 + "typst-macros", 4852 + "typst-svg", 4853 + "typst-syntax", 4854 + "typst-timing", 4855 + "typst-utils", 4856 + ] 4857 + 4858 + [[package]] 4859 + name = "typst-layout" 4860 + version = "0.14.2" 4861 + source = "registry+https://github.com/rust-lang/crates.io-index" 4862 + checksum = "4cab0200105831a9158e63718a0f6141c78cb2c1722ed17d19ad28941e3b8491" 4863 + dependencies = [ 4864 + "az", 4865 + "bumpalo", 4866 + "codex", 4867 + "comemo", 4868 + "ecow", 4869 + "either", 4870 + "hypher", 4871 + "icu_properties 1.5.1", 4872 + "icu_provider 1.5.0", 4873 + "icu_provider_adapters", 4874 + "icu_provider_blob", 4875 + "icu_segmenter", 4876 + "kurbo 0.12.0", 4877 + "memchr", 4878 + "rustc-hash 2.1.1", 4879 + "rustybuzz", 4880 + "smallvec", 4881 + "ttf-parser", 4882 + "typst-assets", 4883 + "typst-library", 4884 + "typst-macros", 4885 + "typst-syntax", 4886 + "typst-timing", 4887 + "typst-utils", 4888 + "unicode-bidi", 4889 + "unicode-math-class", 4890 + "unicode-script", 4891 + "unicode-segmentation", 4892 + ] 4893 + 4894 + [[package]] 4895 + name = "typst-library" 4896 + version = "0.14.2" 4897 + source = "registry+https://github.com/rust-lang/crates.io-index" 4898 + checksum = "e276a5de53020c43efe2111ec236252e54ea4480b5ac18063e663dfbe03d9d1b" 4899 + dependencies = [ 4900 + "az", 4901 + "bitflags 2.11.0", 4902 + "bumpalo", 4903 + "chinese-number", 4904 + "ciborium", 4905 + "codex", 4906 + "comemo", 4907 + "csv", 4908 + "ecow", 4909 + "flate2", 4910 + "fontdb", 4911 + "glidesort", 4912 + "hayagriva", 4913 + "hayro-syntax", 4914 + "icu_properties 1.5.1", 4915 + "icu_provider 1.5.0", 4916 + "icu_provider_blob", 4917 + "image", 4918 + "indexmap", 4919 + "kamadak-exif", 4920 + "kurbo 0.12.0", 4921 + "lipsum", 4922 + "memchr", 4923 + "palette", 4924 + "phf", 4925 + "png 0.17.16", 4926 + "qcms", 4927 + "rayon", 4928 + "regex", 4929 + "regex-syntax", 4930 + "roxmltree", 4931 + "rust_decimal", 4932 + "rustc-hash 2.1.1", 4933 + "rustybuzz", 4934 + "serde", 4935 + "serde_json", 4936 + "serde_yaml", 4937 + "siphasher", 4938 + "smallvec", 4939 + "syntect", 4940 + "time", 4941 + "toml", 4942 + "ttf-parser", 4943 + "two-face", 4944 + "typed-arena", 4945 + "typst-assets", 4946 + "typst-macros", 4947 + "typst-syntax", 4948 + "typst-timing", 4949 + "typst-utils", 4950 + "unicode-math-class", 4951 + "unicode-normalization", 4952 + "unicode-segmentation", 4953 + "unscanny", 4954 + "usvg", 4955 + "utf8_iter", 4956 + "wasmi", 4957 + "xmlwriter", 4958 + ] 4959 + 4960 + [[package]] 4961 + name = "typst-macros" 4962 + version = "0.14.2" 4963 + source = "registry+https://github.com/rust-lang/crates.io-index" 4964 + checksum = "141cbd1027129fbf6bda1013f52a264df7befc7388cc8f47767d65e803fd3a59" 4965 + dependencies = [ 4966 + "heck", 4967 + "proc-macro2", 4968 + "quote", 4969 + "syn", 4970 + ] 4971 + 4972 + [[package]] 4973 + name = "typst-realize" 4974 + version = "0.14.2" 4975 + source = "registry+https://github.com/rust-lang/crates.io-index" 4976 + checksum = "f7ffe964757fb93d2e98978aa2a74ee85b0f94c8643e8f3550737258b58f39d8" 4977 + dependencies = [ 4978 + "arrayvec", 4979 + "bumpalo", 4980 + "comemo", 4981 + "ecow", 4982 + "regex", 4983 + "typst-library", 4984 + "typst-macros", 4985 + "typst-syntax", 4986 + "typst-timing", 4987 + "typst-utils", 4988 + ] 4989 + 4990 + [[package]] 4991 + name = "typst-render" 4992 + version = "0.14.2" 4993 + source = "registry+https://github.com/rust-lang/crates.io-index" 4994 + checksum = "1baabef8c01dd7150380592811bf37af9b2498be86043834ddd629d1bcb48ccb" 4995 + dependencies = [ 4996 + "bytemuck", 4997 + "comemo", 4998 + "hayro", 4999 + "image", 5000 + "pixglyph", 5001 + "resvg", 5002 + "tiny-skia", 5003 + "ttf-parser", 5004 + "typst-assets", 5005 + "typst-library", 5006 + "typst-macros", 5007 + "typst-timing", 5008 + ] 5009 + 5010 + [[package]] 5011 + name = "typst-svg" 5012 + version = "0.14.2" 5013 + source = "registry+https://github.com/rust-lang/crates.io-index" 5014 + checksum = "e46b811837ade1f0243ef0d8bf3fb06d166443090eac22c28643f374c2ccdc9d" 5015 + dependencies = [ 5016 + "base64", 5017 + "comemo", 5018 + "ecow", 5019 + "flate2", 5020 + "hayro", 5021 + "hayro-svg", 5022 + "image", 5023 + "rustc-hash 2.1.1", 5024 + "ttf-parser", 5025 + "typst-assets", 5026 + "typst-library", 5027 + "typst-macros", 5028 + "typst-timing", 5029 + "typst-utils", 5030 + "xmlparser", 5031 + "xmlwriter", 5032 + ] 5033 + 5034 + [[package]] 3664 5035 name = "typst-syntax" 3665 5036 version = "0.14.2" 3666 5037 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 3727 5098 ] 3728 5099 3729 5100 [[package]] 5101 + name = "unic-langid" 5102 + version = "0.9.6" 5103 + source = "registry+https://github.com/rust-lang/crates.io-index" 5104 + checksum = "a28ba52c9b05311f4f6e62d5d9d46f094bd6e84cb8df7b3ef952748d752a7d05" 5105 + dependencies = [ 5106 + "unic-langid-impl", 5107 + "unic-langid-macros", 5108 + ] 5109 + 5110 + [[package]] 5111 + name = "unic-langid-impl" 5112 + version = "0.9.6" 5113 + source = "registry+https://github.com/rust-lang/crates.io-index" 5114 + checksum = "dce1bf08044d4b7a94028c93786f8566047edc11110595914de93362559bc658" 5115 + dependencies = [ 5116 + "serde", 5117 + "tinystr 0.8.2", 5118 + ] 5119 + 5120 + [[package]] 5121 + name = "unic-langid-macros" 5122 + version = "0.9.6" 5123 + source = "registry+https://github.com/rust-lang/crates.io-index" 5124 + checksum = "d5957eb82e346d7add14182a3315a7e298f04e1ba4baac36f7f0dbfedba5fc25" 5125 + dependencies = [ 5126 + "proc-macro-hack", 5127 + "tinystr 0.8.2", 5128 + "unic-langid-impl", 5129 + "unic-langid-macros-impl", 5130 + ] 5131 + 5132 + [[package]] 5133 + name = "unic-langid-macros-impl" 5134 + version = "0.9.6" 5135 + source = "registry+https://github.com/rust-lang/crates.io-index" 5136 + checksum = "a1249a628de3ad34b821ecb1001355bca3940bcb2f88558f1a8bd82e977f75b5" 5137 + dependencies = [ 5138 + "proc-macro-hack", 5139 + "quote", 5140 + "syn", 5141 + "unic-langid-impl", 5142 + ] 5143 + 5144 + [[package]] 5145 + name = "unicode-bidi" 5146 + version = "0.3.18" 5147 + source = "registry+https://github.com/rust-lang/crates.io-index" 5148 + checksum = "5c1cb5db39152898a79168971543b1cb5020dff7fe43c8dc468b0885f5e29df5" 5149 + 5150 + [[package]] 5151 + name = "unicode-bidi-mirroring" 5152 + version = "0.4.0" 5153 + source = "registry+https://github.com/rust-lang/crates.io-index" 5154 + checksum = "5dfa6e8c60bb66d49db113e0125ee8711b7647b5579dc7f5f19c42357ed039fe" 5155 + 5156 + [[package]] 5157 + name = "unicode-ccc" 5158 + version = "0.4.0" 5159 + source = "registry+https://github.com/rust-lang/crates.io-index" 5160 + checksum = "ce61d488bcdc9bc8b5d1772c404828b17fc481c0a582b5581e95fb233aef503e" 5161 + 5162 + [[package]] 3730 5163 name = "unicode-ident" 3731 5164 version = "1.0.24" 3732 5165 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 3739 5172 checksum = "7d246cf599d5fae3c8d56e04b20eb519adb89a8af8d0b0fbcded369aa3647d65" 3740 5173 3741 5174 [[package]] 5175 + name = "unicode-normalization" 5176 + version = "0.1.25" 5177 + source = "registry+https://github.com/rust-lang/crates.io-index" 5178 + checksum = "5fd4f6878c9cb28d874b009da9e8d183b5abc80117c40bbd187a1fde336be6e8" 5179 + dependencies = [ 5180 + "tinyvec", 5181 + ] 5182 + 5183 + [[package]] 5184 + name = "unicode-properties" 5185 + version = "0.1.4" 5186 + source = "registry+https://github.com/rust-lang/crates.io-index" 5187 + checksum = "7df058c713841ad818f1dc5d3fd88063241cc61f49f5fbea4b951e8cf5a8d71d" 5188 + 5189 + [[package]] 3742 5190 name = "unicode-script" 3743 5191 version = "0.5.8" 3744 5192 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 3751 5199 checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" 3752 5200 3753 5201 [[package]] 5202 + name = "unicode-vo" 5203 + version = "0.1.0" 5204 + source = "registry+https://github.com/rust-lang/crates.io-index" 5205 + checksum = "b1d386ff53b415b7fe27b50bb44679e2cc4660272694b7b6f3326d8480823a94" 5206 + 5207 + [[package]] 3754 5208 name = "unicode-width" 3755 5209 version = "0.2.2" 3756 5210 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 3761 5215 version = "0.2.6" 3762 5216 source = "registry+https://github.com/rust-lang/crates.io-index" 3763 5217 checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" 5218 + 5219 + [[package]] 5220 + name = "unsafe-libyaml" 5221 + version = "0.2.11" 5222 + source = "registry+https://github.com/rust-lang/crates.io-index" 5223 + checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861" 3764 5224 3765 5225 [[package]] 3766 5226 name = "unscanny" ··· 3784 5244 "idna", 3785 5245 "percent-encoding", 3786 5246 "serde", 5247 + "serde_derive", 5248 + ] 5249 + 5250 + [[package]] 5251 + name = "usvg" 5252 + version = "0.45.1" 5253 + source = "registry+https://github.com/rust-lang/crates.io-index" 5254 + checksum = "80be9b06fbae3b8b303400ab20778c80bbaf338f563afe567cf3c9eea17b47ef" 5255 + dependencies = [ 5256 + "base64", 5257 + "data-url", 5258 + "flate2", 5259 + "fontdb", 5260 + "imagesize", 5261 + "kurbo 0.11.3", 5262 + "log", 5263 + "pico-args", 5264 + "roxmltree", 5265 + "rustybuzz", 5266 + "simplecss", 5267 + "siphasher", 5268 + "strict-num", 5269 + "svgtypes", 5270 + "tiny-skia-path", 5271 + "unicode-bidi", 5272 + "unicode-script", 5273 + "unicode-vo", 5274 + "xmlwriter", 3787 5275 ] 3788 5276 3789 5277 [[package]] ··· 3933 5421 checksum = "990065f2fe63003fe337b932cfb5e3b80e0b4d0f5ff650e6985b1048f62c8319" 3934 5422 dependencies = [ 3935 5423 "leb128fmt", 3936 - "wasmparser", 5424 + "wasmparser 0.244.0", 3937 5425 ] 3938 5426 3939 5427 [[package]] ··· 3945 5433 "anyhow", 3946 5434 "indexmap", 3947 5435 "wasm-encoder", 3948 - "wasmparser", 5436 + "wasmparser 0.244.0", 5437 + ] 5438 + 5439 + [[package]] 5440 + name = "wasmi" 5441 + version = "0.51.5" 5442 + source = "registry+https://github.com/rust-lang/crates.io-index" 5443 + checksum = "bb321403ce594274827657a908e13d1d9918aa02257b8bf8391949d9764023ff" 5444 + dependencies = [ 5445 + "spin 0.9.8", 5446 + "wasmi_collections", 5447 + "wasmi_core", 5448 + "wasmi_ir", 5449 + "wasmparser 0.228.0", 5450 + ] 5451 + 5452 + [[package]] 5453 + name = "wasmi_collections" 5454 + version = "0.51.5" 5455 + source = "registry+https://github.com/rust-lang/crates.io-index" 5456 + checksum = "e9b8e98e45a2a534489f8225e765cbf1cb9a3078072605e58158910cf4749172" 5457 + 5458 + [[package]] 5459 + name = "wasmi_core" 5460 + version = "0.51.5" 5461 + source = "registry+https://github.com/rust-lang/crates.io-index" 5462 + checksum = "c25f375c0cdf14810eab07f532f61f14d4966f09c747a55067fdf3196e8512e6" 5463 + dependencies = [ 5464 + "libm", 5465 + ] 5466 + 5467 + [[package]] 5468 + name = "wasmi_ir" 5469 + version = "0.51.5" 5470 + source = "registry+https://github.com/rust-lang/crates.io-index" 5471 + checksum = "624e2a68a4293ecb8f564260b68394b29cf3b3edba6bce35532889a2cb33c3d9" 5472 + dependencies = [ 5473 + "wasmi_core", 5474 + ] 5475 + 5476 + [[package]] 5477 + name = "wasmparser" 5478 + version = "0.228.0" 5479 + source = "registry+https://github.com/rust-lang/crates.io-index" 5480 + checksum = "4abf1132c1fdf747d56bbc1bb52152400c70f336870f968b85e89ea422198ae3" 5481 + dependencies = [ 5482 + "bitflags 2.11.0", 3949 5483 ] 3950 5484 3951 5485 [[package]] ··· 3979 5513 "js-sys", 3980 5514 "wasm-bindgen", 3981 5515 ] 5516 + 5517 + [[package]] 5518 + name = "weezl" 5519 + version = "0.1.12" 5520 + source = "registry+https://github.com/rust-lang/crates.io-index" 5521 + checksum = "a28ac98ddc8b9274cb41bb4d9d4d5c425b6020c50c46f25559911905610b4a88" 3982 5522 3983 5523 [[package]] 3984 5524 name = "wgpu" ··· 4292 5832 4293 5833 [[package]] 4294 5834 name = "windows-sys" 5835 + version = "0.59.0" 5836 + source = "registry+https://github.com/rust-lang/crates.io-index" 5837 + checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" 5838 + dependencies = [ 5839 + "windows-targets 0.52.6", 5840 + ] 5841 + 5842 + [[package]] 5843 + name = "windows-sys" 4295 5844 version = "0.61.2" 4296 5845 source = "registry+https://github.com/rust-lang/crates.io-index" 4297 5846 checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" ··· 4504 6053 "serde_json", 4505 6054 "wasm-encoder", 4506 6055 "wasm-metadata", 4507 - "wasmparser", 6056 + "wasmparser 0.244.0", 4508 6057 "wit-parser", 4509 6058 ] 4510 6059 ··· 4523 6072 "serde_derive", 4524 6073 "serde_json", 4525 6074 "unicode-xid", 4526 - "wasmparser", 6075 + "wasmparser 0.244.0", 4527 6076 ] 4528 6077 4529 6078 [[package]] ··· 4540 6089 4541 6090 [[package]] 4542 6091 name = "writeable" 6092 + version = "0.5.5" 6093 + source = "registry+https://github.com/rust-lang/crates.io-index" 6094 + checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" 6095 + 6096 + [[package]] 6097 + name = "writeable" 4543 6098 version = "0.6.2" 4544 6099 source = "registry+https://github.com/rust-lang/crates.io-index" 4545 6100 checksum = "9edde0db4769d2dc68579893f2306b26c6ecfbe0ef499b013d731b7b9247e0b9" ··· 4551 6106 checksum = "3ae8337f8a065cfc972643663ea4279e04e7256de865aa66fe25cec5fb912d3f" 4552 6107 4553 6108 [[package]] 6109 + name = "xmlparser" 6110 + version = "0.13.6" 6111 + source = "registry+https://github.com/rust-lang/crates.io-index" 6112 + checksum = "66fee0b777b0f5ac1c69bb06d361268faafa61cd4682ae064a171c16c433e9e4" 6113 + 6114 + [[package]] 6115 + name = "xmlwriter" 6116 + version = "0.1.0" 6117 + source = "registry+https://github.com/rust-lang/crates.io-index" 6118 + checksum = "ec7a2a501ed189703dba8b08142f057e887dfc4b2cc4db2d343ac6376ba3e0b9" 6119 + 6120 + [[package]] 6121 + name = "yaml-rust" 6122 + version = "0.4.5" 6123 + source = "registry+https://github.com/rust-lang/crates.io-index" 6124 + checksum = "56c1936c4cc7a1c9ab21a1ebb602eb942ba868cbd44a99cb7cdc5892335e1c85" 6125 + dependencies = [ 6126 + "linked-hash-map", 6127 + ] 6128 + 6129 + [[package]] 4554 6130 name = "yoke" 4555 6131 version = "0.7.5" 4556 6132 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 4640 6216 4641 6217 [[package]] 4642 6218 name = "zerotrie" 6219 + version = "0.1.3" 6220 + source = "registry+https://github.com/rust-lang/crates.io-index" 6221 + checksum = "fb594dd55d87335c5f60177cee24f19457a5ec10a065e0a3014722ad252d0a1f" 6222 + dependencies = [ 6223 + "displaydoc", 6224 + "litemap 0.7.5", 6225 + "serde", 6226 + "zerovec 0.10.4", 6227 + ] 6228 + 6229 + [[package]] 6230 + name = "zerotrie" 4643 6231 version = "0.2.3" 4644 6232 source = "registry+https://github.com/rust-lang/crates.io-index" 4645 6233 checksum = "2a59c17a5562d507e4b54960e8569ebee33bee890c70aa3fe7b97e85a9fd7851" ··· 4651 6239 4652 6240 [[package]] 4653 6241 name = "zerovec" 6242 + version = "0.10.4" 6243 + source = "registry+https://github.com/rust-lang/crates.io-index" 6244 + checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" 6245 + dependencies = [ 6246 + "serde", 6247 + "yoke 0.7.5", 6248 + "zerofrom", 6249 + "zerovec-derive 0.10.3", 6250 + ] 6251 + 6252 + [[package]] 6253 + name = "zerovec" 4654 6254 version = "0.11.5" 4655 6255 source = "registry+https://github.com/rust-lang/crates.io-index" 4656 6256 checksum = "6c28719294829477f525be0186d13efa9a3c602f7ec202ca9e353d310fb9a002" 4657 6257 dependencies = [ 6258 + "serde", 4658 6259 "yoke 0.8.1", 4659 6260 "zerofrom", 4660 - "zerovec-derive", 6261 + "zerovec-derive 0.11.2", 6262 + ] 6263 + 6264 + [[package]] 6265 + name = "zerovec-derive" 6266 + version = "0.10.3" 6267 + source = "registry+https://github.com/rust-lang/crates.io-index" 6268 + checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" 6269 + dependencies = [ 6270 + "proc-macro2", 6271 + "quote", 6272 + "syn", 4661 6273 ] 4662 6274 4663 6275 [[package]] ··· 4691 6303 version = "1.0.21" 4692 6304 source = "registry+https://github.com/rust-lang/crates.io-index" 4693 6305 checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa" 6306 + 6307 + [[package]] 6308 + name = "zune-core" 6309 + version = "0.4.12" 6310 + source = "registry+https://github.com/rust-lang/crates.io-index" 6311 + checksum = "3f423a2c17029964870cfaabb1f13dfab7d092a62a29a89264f4d36990ca414a" 6312 + 6313 + [[package]] 6314 + name = "zune-core" 6315 + version = "0.5.1" 6316 + source = "registry+https://github.com/rust-lang/crates.io-index" 6317 + checksum = "cb8a0807f7c01457d0379ba880ba6322660448ddebc890ce29bb64da71fb40f9" 6318 + 6319 + [[package]] 6320 + name = "zune-jpeg" 6321 + version = "0.4.21" 6322 + source = "registry+https://github.com/rust-lang/crates.io-index" 6323 + checksum = "29ce2c8a9384ad323cf564b67da86e21d3cfdff87908bc1223ed5c99bc792713" 6324 + dependencies = [ 6325 + "zune-core 0.4.12", 6326 + ] 6327 + 6328 + [[package]] 6329 + name = "zune-jpeg" 6330 + version = "0.5.13" 6331 + source = "registry+https://github.com/rust-lang/crates.io-index" 6332 + checksum = "ec5f41c76397b7da451efd19915684f727d7e1d516384ca6bd0ec43ec94de23c" 6333 + dependencies = [ 6334 + "zune-core 0.5.1", 6335 + ]
+6 -1
Cargo.toml
··· 3 3 "crates/tala-format", 4 4 "crates/tala-srs", 5 5 "crates/tala-cli", 6 + "crates/tala-typst", 6 7 ] 7 8 resolver = "2" 8 9 9 10 [workspace.dependencies] 10 - typst-syntax = "0.14.2" 11 + typst-syntax = "0.14.2" 12 + typst = "0.14.2" 13 + typst-render = "0.14.2" 14 + typst-assets = { version = "0.14.2", features = ["fonts"] } 11 15 serde = { version = "1.0.228", features = ["derive"] } 12 16 serde_json = "1.0.149" 13 17 fsrs = "5.2.0" 14 18 clap = { version = "4.6.0", features = ["derive"] } 15 19 git2 = "0.20.4" 20 + image = { version = "0.25", default-features = false, features = ["png"] }
+12
crates/tala-typst/Cargo.toml
··· 1 + [package] 2 + name = "tala-typst" 3 + version = "0.1.0" 4 + edition = "2024" 5 + 6 + [dependencies] 7 + typst = { workspace = true } 8 + typst-render = { workspace = true } 9 + typst-assets = { workspace = true } 10 + 11 + [dev-dependencies] 12 + image = { workspace = true }
+48
crates/tala-typst/examples/dump_render.rs
··· 1 + /// cargo run -p tala-typst --example dump_render 2 + /// Opens /tmp/tala_render.png 3 + 4 + fn main() { 5 + let cases = [ 6 + ("authoring", tala_typst::Preamble::Authoring, r#"#card(id: "fb")[What is the circuit model of an actual capacitor?][Series: ESR + ESL + ideal $C$]"#), 7 + ("review_front", tala_typst::Preamble::ReviewFront, r#"#card(id: "fb")[$ integral_(-infinity)^infinity e^(-x^2) dif x = $][$ sqrt(pi) $]"#), 8 + ("review_cloze", tala_typst::Preamble::ReviewCloze, r#"#cloze(id: "cl")[The resonant frequency is where #blank[inductance] and #blank[capacitance] cancel.]"#), 9 + ]; 10 + 11 + let tmp = std::env::temp_dir(); 12 + let mut images = Vec::new(); 13 + 14 + for (label, preamble, fragment) in cases { 15 + let r = tala_typst::render(&tmp, fragment, preamble).unwrap(); 16 + let straight = premul_to_straight(&r.rgba); 17 + let img = image::RgbaImage::from_raw(r.width, r.height, straight).unwrap(); 18 + println!("{label}: {}x{}", r.width, r.height); 19 + images.push(img); 20 + } 21 + 22 + // Stack vertically into one PNG. 23 + let w = images.iter().map(|i| i.width()).max().unwrap(); 24 + let h = images.iter().map(|i| i.height()).sum(); 25 + let mut canvas = image::RgbaImage::from_pixel(w, h, image::Rgba([255, 255, 255, 255])); 26 + let mut y = 0u32; 27 + for img in &images { 28 + image::imageops::overlay(&mut canvas, img, 0, y as i64); 29 + y += img.height(); 30 + } 31 + 32 + let out = std::path::Path::new("/tmp/tala_render.png"); 33 + canvas.save(out).unwrap(); 34 + println!("saved: {}", out.display()); 35 + } 36 + 37 + fn premul_to_straight(rgba: &[u8]) -> Vec<u8> { 38 + rgba.chunks_exact(4).flat_map(|px| { 39 + let [r, g, b, a] = [px[0], px[1], px[2], px[3]]; 40 + if a == 0 { return [255u8, 255, 255, 255]; } 41 + if a == 255 { return [r, g, b, 255]; } 42 + let f = 255.0 / a as f32; 43 + [(r as f32 * f).min(255.0) as u8, 44 + (g as f32 * f).min(255.0) as u8, 45 + (b as f32 * f).min(255.0) as u8, 46 + a] 47 + }).collect() 48 + }
+282
crates/tala-typst/src/lib.rs
··· 1 + use std::path::{Path, PathBuf}; 2 + use std::sync::OnceLock; 3 + 4 + use typst::diag::{FileError, FileResult}; 5 + use typst::foundations::{Bytes, Datetime}; 6 + use typst::syntax::{FileId, Source, VirtualPath}; 7 + use typst::text::{Font, FontBook}; 8 + use typst::utils::LazyHash; 9 + use typst::{Library, LibraryExt}; 10 + use typst_render::render as typst_render_page; 11 + 12 + // ── Public types ────────────────────────────────────────────────────────────── 13 + 14 + #[derive(Debug, Clone, Copy)] 15 + pub enum Preamble { 16 + /// Show all card content: both sides of FrontBack, blank contents visible. 17 + Authoring, 18 + /// FrontBack: front side only. 19 + ReviewFront, 20 + /// Cloze: body rendered with #blank[] contents replaced by empty boxes. 21 + ReviewCloze, 22 + } 23 + 24 + pub struct RenderResult { 25 + /// Premultiplied RGBA bytes, row-major, `width * height * 4` bytes. 26 + pub rgba: Vec<u8>, 27 + pub width: u32, 28 + pub height: u32, 29 + } 30 + 31 + // ── Entry point ─────────────────────────────────────────────────────────────── 32 + 33 + /// Render a fragment of typst markup (e.g. a single `#card(...)` call) with the 34 + /// given preamble. `deck_dir` is the deck root; image files are resolved 35 + /// relative to `deck_dir/images/`. 36 + pub fn render(deck_dir: &Path, fragment: &str, preamble: Preamble) -> Result<RenderResult, Error> { 37 + let source_text = format!("{}\n{fragment}", preamble.as_str()); 38 + let world = TalaWorld::new(deck_dir, source_text); 39 + 40 + let warned = typst::compile::<typst::layout::PagedDocument>(&world); 41 + let document = warned.output.map_err(|diags| { 42 + Error::Compile(diags.iter().map(|d| d.message.to_string()).collect()) 43 + })?; 44 + 45 + let page = document.pages.first().ok_or(Error::NoOutput)?; 46 + let pixmap = typst_render_page(page, 2.0); // 2 px/pt ≈ 144 dpi 47 + 48 + Ok(RenderResult { 49 + rgba: pixmap.data().to_vec(), 50 + width: pixmap.width(), 51 + height: pixmap.height(), 52 + }) 53 + } 54 + 55 + // ── Preamble strings ────────────────────────────────────────────────────────── 56 + 57 + impl Preamble { 58 + fn as_str(self) -> &'static str { 59 + match self { 60 + Preamble::Authoring => PREAMBLE_AUTHORING, 61 + Preamble::ReviewFront => PREAMBLE_REVIEW_FRONT, 62 + Preamble::ReviewCloze => PREAMBLE_REVIEW_CLOZE, 63 + } 64 + } 65 + } 66 + 67 + /// Show both sides of a FrontBack card separated by a rule; blank contents 68 + /// visible; cloze body visible. 69 + const PREAMBLE_AUTHORING: &str = r#" 70 + #let card(id: "", dir: "fwd", ..args) = { 71 + let sides = args.pos() 72 + sides.at(0, default: []) 73 + if sides.len() > 1 { 74 + line(length: 100%) 75 + sides.at(1) 76 + } 77 + } 78 + #let blank(..args) = args.pos().at(0, default: []) 79 + #let cloze(id: "", ..args) = args.pos().at(0, default: []) 80 + #let img_cloze(id: "", src: "") = image("images/" + src + ".png") 81 + #let img(name) = image("images/" + name + ".png") 82 + "#; 83 + 84 + /// FrontBack: front side only; other card types unchanged. 85 + const PREAMBLE_REVIEW_FRONT: &str = r#" 86 + #let card(id: "", dir: "fwd", ..args) = args.pos().at(0, default: []) 87 + #let blank(..args) = args.pos().at(0, default: []) 88 + #let cloze(id: "", ..args) = args.pos().at(0, default: []) 89 + #let img_cloze(id: "", src: "") = image("images/" + src + ".png") 90 + #let img(name) = image("images/" + name + ".png") 91 + "#; 92 + 93 + /// Cloze review: blank contents replaced by fixed-width underline boxes. 94 + const PREAMBLE_REVIEW_CLOZE: &str = r#" 95 + #let card(id: "", dir: "fwd", ..args) = { 96 + let sides = args.pos() 97 + sides.at(0, default: []) 98 + if sides.len() > 1 { 99 + line(length: 100%) 100 + sides.at(1) 101 + } 102 + } 103 + #let blank(..args) = box(width: 4em, stroke: (bottom: 0.5pt), inset: (bottom: 2pt))[] 104 + #let cloze(id: "", ..args) = args.pos().at(0, default: []) 105 + #let img_cloze(id: "", src: "") = image("images/" + src + ".png") 106 + #let img(name) = image("images/" + name + ".png") 107 + "#; 108 + 109 + // ── World implementation ────────────────────────────────────────────────────── 110 + 111 + struct TalaWorld { 112 + deck_dir: PathBuf, 113 + main_id: FileId, 114 + source: Source, 115 + library: LazyHash<Library>, 116 + book: &'static LazyHash<FontBook>, 117 + fonts: &'static Vec<Font>, 118 + } 119 + 120 + impl TalaWorld { 121 + fn new(deck_dir: &Path, source_text: String) -> Self { 122 + let main_id = FileId::new(None, VirtualPath::new("main.typ")); 123 + let source = Source::new(main_id, source_text); 124 + let (book, fonts) = get_fonts(); 125 + Self { 126 + deck_dir: deck_dir.to_owned(), 127 + main_id, 128 + source, 129 + library: LazyHash::new(Library::builder().build()), 130 + book, 131 + fonts, 132 + } 133 + } 134 + } 135 + 136 + impl typst::World for TalaWorld { 137 + fn library(&self) -> &LazyHash<Library> { 138 + &self.library 139 + } 140 + 141 + fn book(&self) -> &LazyHash<FontBook> { 142 + self.book 143 + } 144 + 145 + fn main(&self) -> FileId { 146 + self.main_id 147 + } 148 + 149 + fn source(&self, id: FileId) -> FileResult<Source> { 150 + if id == self.main_id { 151 + Ok(self.source.clone()) 152 + } else { 153 + Err(FileError::NotFound( 154 + id.vpath().as_rootless_path().to_owned(), 155 + )) 156 + } 157 + } 158 + 159 + fn file(&self, id: FileId) -> FileResult<Bytes> { 160 + let rel = id.vpath().as_rootless_path(); 161 + let path = self.deck_dir.join(rel); 162 + 163 + // If the exact path exists, use it. 164 + if path.exists() { 165 + return std::fs::read(&path) 166 + .map(Bytes::new) 167 + .map_err(|_| FileError::NotFound(path)); 168 + } 169 + 170 + // For image references that omit extension, try common formats. 171 + if path.extension().map_or(false, |e| e == "png") { 172 + let stem = path.with_extension(""); 173 + for ext in ["jpg", "jpeg", "svg", "gif", "webp"] { 174 + let candidate = stem.with_extension(ext); 175 + if candidate.exists() { 176 + return std::fs::read(&candidate) 177 + .map(Bytes::new) 178 + .map_err(|_| FileError::NotFound(candidate)); 179 + } 180 + } 181 + } 182 + 183 + Err(FileError::NotFound(path)) 184 + } 185 + 186 + fn font(&self, index: usize) -> Option<Font> { 187 + self.fonts.get(index).cloned() 188 + } 189 + 190 + fn today(&self, _offset: Option<i64>) -> Option<Datetime> { 191 + None 192 + } 193 + } 194 + 195 + // ── Font loading ────────────────────────────────────────────────────────────── 196 + 197 + static FONTS: OnceLock<(LazyHash<FontBook>, Vec<Font>)> = OnceLock::new(); 198 + 199 + fn get_fonts() -> (&'static LazyHash<FontBook>, &'static Vec<Font>) { 200 + let (book, fonts) = FONTS.get_or_init(load_fonts); 201 + (book, fonts) 202 + } 203 + 204 + fn load_fonts() -> (LazyHash<FontBook>, Vec<Font>) { 205 + let mut book = FontBook::new(); 206 + let mut fonts = Vec::new(); 207 + 208 + for data in typst_assets::fonts() { 209 + let bytes = Bytes::new(data); 210 + let mut index = 0u32; 211 + loop { 212 + match Font::new(bytes.clone(), index) { 213 + Some(font) => { 214 + book.push(font.info().clone()); 215 + fonts.push(font); 216 + index += 1; 217 + } 218 + None => break, 219 + } 220 + } 221 + } 222 + 223 + (LazyHash::new(book), fonts) 224 + } 225 + 226 + // ── Error ───────────────────────────────────────────────────────────────────── 227 + 228 + #[derive(Debug)] 229 + pub enum Error { 230 + Compile(Vec<String>), 231 + NoOutput, 232 + } 233 + 234 + impl std::fmt::Display for Error { 235 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 236 + match self { 237 + Error::Compile(msgs) => write!(f, "typst compile error: {}", msgs.join("; ")), 238 + Error::NoOutput => write!(f, "typst produced no pages"), 239 + } 240 + } 241 + } 242 + 243 + impl std::error::Error for Error {} 244 + 245 + // ── Tests ───────────────────────────────────────────────────────────────────── 246 + 247 + #[cfg(test)] 248 + mod tests { 249 + use super::*; 250 + 251 + const FRONT_BACK: &str = r#"#card(id: "fb-001")[What is $E = m c^2$?][Einstein's mass--energy relation.]"#; 252 + const CLOZE: &str = r#"#cloze(id: "cl-001")[Resonance occurs where #blank[inductance] cancels #blank[capacitance].]"#; 253 + 254 + #[test] 255 + fn render_authoring_front_back() { 256 + let tmp = std::env::temp_dir(); 257 + let result = render(&tmp, FRONT_BACK, Preamble::Authoring).unwrap(); 258 + assert!(result.width > 0 && result.height > 0); 259 + assert_eq!(result.rgba.len() as u32, result.width * result.height * 4); 260 + } 261 + 262 + #[test] 263 + fn render_authoring_cloze() { 264 + let tmp = std::env::temp_dir(); 265 + let result = render(&tmp, CLOZE, Preamble::Authoring).unwrap(); 266 + assert!(result.width > 0); 267 + } 268 + 269 + #[test] 270 + fn render_review_front_only() { 271 + let tmp = std::env::temp_dir(); 272 + let result = render(&tmp, FRONT_BACK, Preamble::ReviewFront).unwrap(); 273 + assert!(result.width > 0); 274 + } 275 + 276 + #[test] 277 + fn render_review_cloze_blanks_hidden() { 278 + let tmp = std::env::temp_dir(); 279 + let result = render(&tmp, CLOZE, Preamble::ReviewCloze).unwrap(); 280 + assert!(result.width > 0); 281 + } 282 + }