├── .github └── workflows │ └── ci.yml ├── .gitignore ├── CHANGELOG.md ├── Cargo.lock ├── Cargo.toml ├── LICENSE ├── Makefile ├── README.md ├── pkg ├── pyrunner.typ └── typst.toml ├── src └── lib.rs └── test ├── example.pdf └── example.typ /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | 3 | on: 4 | push: 5 | branches: [main] 6 | pull_request: 7 | 8 | jobs: 9 | build: 10 | runs-on: ubuntu-latest 11 | steps: 12 | - name: Checkout repository 13 | uses: actions/checkout@v4 14 | 15 | - name: Setup Rust toolchain 16 | uses: dtolnay/rust-toolchain@stable 17 | 18 | - name: Build plugin 19 | run: | 20 | rustup target add wasm32-wasip1 21 | cargo install --git https://github.com/peng1999/wasm-minimal-protocol.git wasi-stub --locked 22 | cargo build --release --target wasm32-wasip1 23 | make pkg/typst-pyrunner.wasm BUILD_TYPE=release 24 | make install BUILD_TYPE=release 25 | 26 | - name: Setup Typst CLI 27 | uses: typst-community/setup-typst@v4 28 | 29 | - name: Compile example.typ to PDF 30 | run: typst compile test/example.typ 31 | 32 | - name: Upload PDF artifact 33 | uses: actions/upload-artifact@v4 34 | with: 35 | name: example-pdf 36 | path: test/example.pdf -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | /pkg/*.wasm 3 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), 6 | and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). 7 | 8 | ## [Unreleased] 9 | 10 | ## [0.3.0] 11 | 12 | ### Fixed 13 | 14 | - Deprecation warning in Typst 0.13 15 | 16 | ### Improved 17 | 18 | - Python version upgraded to 3.13. 19 | 20 | ## [0.2.0] 21 | 22 | ### Fixed 23 | 24 | - Panic when calling `open`. 25 | - Panic when calling `datetime.now()` 26 | 27 | ### Improved 28 | 29 | - Bundled wasm file gets smaller by removing some useless file from stdlib. 30 | 31 | ## [0.1.0] 32 | 33 | ### Added 34 | 35 | - `block`, `compile`, and `call` API. 36 | 37 | [Unreleased]: https://github.com/peng1999/typst-pyrunner/compare/v0.3.0...HEAD 38 | [0.3.0]: https://github.com/peng1999/typst-pyrunner/compare/v0.2.0...v0.3.0 39 | [0.2.0]: https://github.com/peng1999/typst-pyrunner/compare/v0.1.0...v0.2.0 40 | [0.1.0]: https://github.com/peng1999/typst-pyrunner/releases/tag/v0.1.0 41 | -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 4 4 | 5 | [[package]] 6 | name = "adler2" 7 | version = "2.0.0" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" 10 | 11 | [[package]] 12 | name = "adler32" 13 | version = "1.2.0" 14 | source = "registry+https://github.com/rust-lang/crates.io-index" 15 | checksum = "aae1277d39aeec15cb388266ecc24b11c80469deae6067e17a1a7aa9e5c1f234" 16 | 17 | [[package]] 18 | name = "ahash" 19 | version = "0.8.12" 20 | source = "registry+https://github.com/rust-lang/crates.io-index" 21 | checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" 22 | dependencies = [ 23 | "cfg-if", 24 | "getrandom 0.3.3", 25 | "once_cell", 26 | "version_check", 27 | "zerocopy", 28 | ] 29 | 30 | [[package]] 31 | name = "aho-corasick" 32 | version = "1.1.3" 33 | source = "registry+https://github.com/rust-lang/crates.io-index" 34 | checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" 35 | dependencies = [ 36 | "memchr", 37 | ] 38 | 39 | [[package]] 40 | name = "android-tzdata" 41 | version = "0.1.1" 42 | source = "registry+https://github.com/rust-lang/crates.io-index" 43 | checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" 44 | 45 | [[package]] 46 | name = "android_system_properties" 47 | version = "0.1.5" 48 | source = "registry+https://github.com/rust-lang/crates.io-index" 49 | checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" 50 | dependencies = [ 51 | "libc", 52 | ] 53 | 54 | [[package]] 55 | name = "anstream" 56 | version = "0.6.18" 57 | source = "registry+https://github.com/rust-lang/crates.io-index" 58 | checksum = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b" 59 | dependencies = [ 60 | "anstyle", 61 | "anstyle-parse", 62 | "anstyle-query", 63 | "anstyle-wincon", 64 | "colorchoice", 65 | "is_terminal_polyfill", 66 | "utf8parse", 67 | ] 68 | 69 | [[package]] 70 | name = "anstyle" 71 | version = "1.0.10" 72 | source = "registry+https://github.com/rust-lang/crates.io-index" 73 | checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9" 74 | 75 | [[package]] 76 | name = "anstyle-parse" 77 | version = "0.2.6" 78 | source = "registry+https://github.com/rust-lang/crates.io-index" 79 | checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9" 80 | dependencies = [ 81 | "utf8parse", 82 | ] 83 | 84 | [[package]] 85 | name = "anstyle-query" 86 | version = "1.1.2" 87 | source = "registry+https://github.com/rust-lang/crates.io-index" 88 | checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c" 89 | dependencies = [ 90 | "windows-sys 0.59.0", 91 | ] 92 | 93 | [[package]] 94 | name = "anstyle-wincon" 95 | version = "3.0.8" 96 | source = "registry+https://github.com/rust-lang/crates.io-index" 97 | checksum = "6680de5231bd6ee4c6191b8a1325daa282b415391ec9d3a37bd34f2060dc73fa" 98 | dependencies = [ 99 | "anstyle", 100 | "once_cell_polyfill", 101 | "windows-sys 0.59.0", 102 | ] 103 | 104 | [[package]] 105 | name = "ascii" 106 | version = "1.1.0" 107 | source = "registry+https://github.com/rust-lang/crates.io-index" 108 | checksum = "d92bec98840b8f03a5ff5413de5293bfcd8bf96467cf5452609f939ec6f5de16" 109 | 110 | [[package]] 111 | name = "atomic" 112 | version = "0.6.0" 113 | source = "registry+https://github.com/rust-lang/crates.io-index" 114 | checksum = "8d818003e740b63afc82337e3160717f4f63078720a810b7b903e70a5d1d2994" 115 | dependencies = [ 116 | "bytemuck", 117 | ] 118 | 119 | [[package]] 120 | name = "autocfg" 121 | version = "1.4.0" 122 | source = "registry+https://github.com/rust-lang/crates.io-index" 123 | checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" 124 | 125 | [[package]] 126 | name = "base64" 127 | version = "0.22.1" 128 | source = "registry+https://github.com/rust-lang/crates.io-index" 129 | checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" 130 | 131 | [[package]] 132 | name = "bitflags" 133 | version = "2.9.1" 134 | source = "registry+https://github.com/rust-lang/crates.io-index" 135 | checksum = "1b8e56985ec62d17e9c1001dc89c88ecd7dc08e47eba5ec7c29c7b5eeecde967" 136 | 137 | [[package]] 138 | name = "blake2" 139 | version = "0.10.6" 140 | source = "registry+https://github.com/rust-lang/crates.io-index" 141 | checksum = "46502ad458c9a52b69d4d4d32775c788b7a1b85e8bc9d482d92250fc0e3f8efe" 142 | dependencies = [ 143 | "digest", 144 | ] 145 | 146 | [[package]] 147 | name = "block-buffer" 148 | version = "0.10.4" 149 | source = "registry+https://github.com/rust-lang/crates.io-index" 150 | checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" 151 | dependencies = [ 152 | "generic-array", 153 | ] 154 | 155 | [[package]] 156 | name = "bstr" 157 | version = "1.12.0" 158 | source = "registry+https://github.com/rust-lang/crates.io-index" 159 | checksum = "234113d19d0d7d613b40e86fb654acf958910802bcceab913a4f9e7cda03b1a4" 160 | dependencies = [ 161 | "memchr", 162 | "regex-automata", 163 | "serde", 164 | ] 165 | 166 | [[package]] 167 | name = "bumpalo" 168 | version = "3.17.0" 169 | source = "registry+https://github.com/rust-lang/crates.io-index" 170 | checksum = "1628fb46dfa0b37568d12e5edd512553eccf6a22a78e8bde00bb4aed84d5bdbf" 171 | 172 | [[package]] 173 | name = "bytemuck" 174 | version = "1.23.0" 175 | source = "registry+https://github.com/rust-lang/crates.io-index" 176 | checksum = "9134a6ef01ce4b366b50689c94f82c14bc72bc5d0386829828a2e2752ef7958c" 177 | 178 | [[package]] 179 | name = "bzip2" 180 | version = "0.5.2" 181 | source = "registry+https://github.com/rust-lang/crates.io-index" 182 | checksum = "49ecfb22d906f800d4fe833b6282cf4dc1c298f5057ca0b5445e5c209735ca47" 183 | dependencies = [ 184 | "bzip2-sys", 185 | "libbz2-rs-sys", 186 | ] 187 | 188 | [[package]] 189 | name = "bzip2-sys" 190 | version = "0.1.13+1.0.8" 191 | source = "registry+https://github.com/rust-lang/crates.io-index" 192 | checksum = "225bff33b2141874fe80d71e07d6eec4f85c5c216453dd96388240f96e1acc14" 193 | dependencies = [ 194 | "cc", 195 | "pkg-config", 196 | ] 197 | 198 | [[package]] 199 | name = "caseless" 200 | version = "0.2.2" 201 | source = "registry+https://github.com/rust-lang/crates.io-index" 202 | checksum = "8b6fd507454086c8edfd769ca6ada439193cdb209c7681712ef6275cccbfe5d8" 203 | dependencies = [ 204 | "unicode-normalization", 205 | ] 206 | 207 | [[package]] 208 | name = "castaway" 209 | version = "0.2.3" 210 | source = "registry+https://github.com/rust-lang/crates.io-index" 211 | checksum = "0abae9be0aaf9ea96a3b1b8b1b55c602ca751eba1b1500220cea4ecbafe7c0d5" 212 | dependencies = [ 213 | "rustversion", 214 | ] 215 | 216 | [[package]] 217 | name = "cc" 218 | version = "1.2.24" 219 | source = "registry+https://github.com/rust-lang/crates.io-index" 220 | checksum = "16595d3be041c03b09d08d0858631facccee9221e579704070e6e9e4915d3bc7" 221 | dependencies = [ 222 | "shlex", 223 | ] 224 | 225 | [[package]] 226 | name = "cfg-if" 227 | version = "1.0.0" 228 | source = "registry+https://github.com/rust-lang/crates.io-index" 229 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 230 | 231 | [[package]] 232 | name = "cfg_aliases" 233 | version = "0.2.1" 234 | source = "registry+https://github.com/rust-lang/crates.io-index" 235 | checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" 236 | 237 | [[package]] 238 | name = "chrono" 239 | version = "0.4.41" 240 | source = "registry+https://github.com/rust-lang/crates.io-index" 241 | checksum = "c469d952047f47f91b68d1cba3f10d63c11d73e4636f24f08daf0278abf01c4d" 242 | dependencies = [ 243 | "android-tzdata", 244 | "iana-time-zone", 245 | "js-sys", 246 | "num-traits", 247 | "wasm-bindgen", 248 | "windows-link", 249 | ] 250 | 251 | [[package]] 252 | name = "ciborium" 253 | version = "0.2.2" 254 | source = "registry+https://github.com/rust-lang/crates.io-index" 255 | checksum = "42e69ffd6f0917f5c029256a24d0161db17cea3997d185db0d35926308770f0e" 256 | dependencies = [ 257 | "ciborium-io", 258 | "ciborium-ll", 259 | "serde", 260 | ] 261 | 262 | [[package]] 263 | name = "ciborium-io" 264 | version = "0.2.2" 265 | source = "registry+https://github.com/rust-lang/crates.io-index" 266 | checksum = "05afea1e0a06c9be33d539b876f1ce3692f4afea2cb41f740e7743225ed1c757" 267 | 268 | [[package]] 269 | name = "ciborium-ll" 270 | version = "0.2.2" 271 | source = "registry+https://github.com/rust-lang/crates.io-index" 272 | checksum = "57663b653d948a338bfb3eeba9bb2fd5fcfaecb9e199e87e1eda4d9e8b240fd9" 273 | dependencies = [ 274 | "ciborium-io", 275 | "half", 276 | ] 277 | 278 | [[package]] 279 | name = "clipboard-win" 280 | version = "5.4.0" 281 | source = "registry+https://github.com/rust-lang/crates.io-index" 282 | checksum = "15efe7a882b08f34e38556b14f2fb3daa98769d06c7f0c1b076dfd0d983bc892" 283 | dependencies = [ 284 | "error-code", 285 | ] 286 | 287 | [[package]] 288 | name = "colorchoice" 289 | version = "1.0.3" 290 | source = "registry+https://github.com/rust-lang/crates.io-index" 291 | checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" 292 | 293 | [[package]] 294 | name = "compact_str" 295 | version = "0.8.1" 296 | source = "registry+https://github.com/rust-lang/crates.io-index" 297 | checksum = "3b79c4069c6cad78e2e0cdfcbd26275770669fb39fd308a752dc110e83b9af32" 298 | dependencies = [ 299 | "castaway", 300 | "cfg-if", 301 | "itoa", 302 | "rustversion", 303 | "ryu", 304 | "static_assertions", 305 | ] 306 | 307 | [[package]] 308 | name = "constant_time_eq" 309 | version = "0.4.2" 310 | source = "registry+https://github.com/rust-lang/crates.io-index" 311 | checksum = "3d52eff69cd5e647efe296129160853a42795992097e8af39800e1060caeea9b" 312 | 313 | [[package]] 314 | name = "core-foundation" 315 | version = "0.9.4" 316 | source = "registry+https://github.com/rust-lang/crates.io-index" 317 | checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" 318 | dependencies = [ 319 | "core-foundation-sys", 320 | "libc", 321 | ] 322 | 323 | [[package]] 324 | name = "core-foundation-sys" 325 | version = "0.8.7" 326 | source = "registry+https://github.com/rust-lang/crates.io-index" 327 | checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" 328 | 329 | [[package]] 330 | name = "cpufeatures" 331 | version = "0.2.17" 332 | source = "registry+https://github.com/rust-lang/crates.io-index" 333 | checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" 334 | dependencies = [ 335 | "libc", 336 | ] 337 | 338 | [[package]] 339 | name = "crc32fast" 340 | version = "1.4.2" 341 | source = "registry+https://github.com/rust-lang/crates.io-index" 342 | checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" 343 | dependencies = [ 344 | "cfg-if", 345 | ] 346 | 347 | [[package]] 348 | name = "crossbeam-utils" 349 | version = "0.8.21" 350 | source = "registry+https://github.com/rust-lang/crates.io-index" 351 | checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" 352 | 353 | [[package]] 354 | name = "crunchy" 355 | version = "0.2.3" 356 | source = "registry+https://github.com/rust-lang/crates.io-index" 357 | checksum = "43da5946c66ffcc7745f48db692ffbb10a83bfe0afd96235c5c2a4fb23994929" 358 | 359 | [[package]] 360 | name = "crypto-common" 361 | version = "0.1.6" 362 | source = "registry+https://github.com/rust-lang/crates.io-index" 363 | checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" 364 | dependencies = [ 365 | "generic-array", 366 | "typenum", 367 | ] 368 | 369 | [[package]] 370 | name = "csv-core" 371 | version = "0.1.12" 372 | source = "registry+https://github.com/rust-lang/crates.io-index" 373 | checksum = "7d02f3b0da4c6504f86e9cd789d8dbafab48c2321be74e9987593de5a894d93d" 374 | dependencies = [ 375 | "memchr", 376 | ] 377 | 378 | [[package]] 379 | name = "digest" 380 | version = "0.10.7" 381 | source = "registry+https://github.com/rust-lang/crates.io-index" 382 | checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" 383 | dependencies = [ 384 | "block-buffer", 385 | "crypto-common", 386 | "subtle", 387 | ] 388 | 389 | [[package]] 390 | name = "dirs-next" 391 | version = "2.0.0" 392 | source = "registry+https://github.com/rust-lang/crates.io-index" 393 | checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" 394 | dependencies = [ 395 | "cfg-if", 396 | "dirs-sys-next", 397 | ] 398 | 399 | [[package]] 400 | name = "dirs-sys-next" 401 | version = "0.1.2" 402 | source = "registry+https://github.com/rust-lang/crates.io-index" 403 | checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" 404 | dependencies = [ 405 | "libc", 406 | "redox_users", 407 | "winapi", 408 | ] 409 | 410 | [[package]] 411 | name = "dns-lookup" 412 | version = "2.0.4" 413 | source = "registry+https://github.com/rust-lang/crates.io-index" 414 | checksum = "e5766087c2235fec47fafa4cfecc81e494ee679d0fd4a59887ea0919bfb0e4fc" 415 | dependencies = [ 416 | "cfg-if", 417 | "libc", 418 | "socket2", 419 | "windows-sys 0.48.0", 420 | ] 421 | 422 | [[package]] 423 | name = "dyn-clone" 424 | version = "1.0.19" 425 | source = "registry+https://github.com/rust-lang/crates.io-index" 426 | checksum = "1c7a8fb8a9fbf66c1f703fe16184d10ca0ee9d23be5b4436400408ba54a95005" 427 | 428 | [[package]] 429 | name = "either" 430 | version = "1.15.0" 431 | source = "registry+https://github.com/rust-lang/crates.io-index" 432 | checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" 433 | 434 | [[package]] 435 | name = "endian-type" 436 | version = "0.1.2" 437 | source = "registry+https://github.com/rust-lang/crates.io-index" 438 | checksum = "c34f04666d835ff5d62e058c3995147c06f42fe86ff053337632bca83e42702d" 439 | 440 | [[package]] 441 | name = "env_filter" 442 | version = "0.1.3" 443 | source = "registry+https://github.com/rust-lang/crates.io-index" 444 | checksum = "186e05a59d4c50738528153b83b0b0194d3a29507dfec16eccd4b342903397d0" 445 | dependencies = [ 446 | "log", 447 | "regex", 448 | ] 449 | 450 | [[package]] 451 | name = "env_home" 452 | version = "0.1.0" 453 | source = "registry+https://github.com/rust-lang/crates.io-index" 454 | checksum = "c7f84e12ccf0a7ddc17a6c41c93326024c42920d7ee630d04950e6926645c0fe" 455 | 456 | [[package]] 457 | name = "env_logger" 458 | version = "0.11.8" 459 | source = "registry+https://github.com/rust-lang/crates.io-index" 460 | checksum = "13c863f0904021b108aa8b2f55046443e6b1ebde8fd4a15c399893aae4fa069f" 461 | dependencies = [ 462 | "anstream", 463 | "anstyle", 464 | "env_filter", 465 | "jiff", 466 | "log", 467 | ] 468 | 469 | [[package]] 470 | name = "equivalent" 471 | version = "1.0.2" 472 | source = "registry+https://github.com/rust-lang/crates.io-index" 473 | checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" 474 | 475 | [[package]] 476 | name = "errno" 477 | version = "0.3.12" 478 | source = "registry+https://github.com/rust-lang/crates.io-index" 479 | checksum = "cea14ef9355e3beab063703aa9dab15afd25f0667c341310c1e5274bb1d0da18" 480 | dependencies = [ 481 | "libc", 482 | "windows-sys 0.59.0", 483 | ] 484 | 485 | [[package]] 486 | name = "error-code" 487 | version = "3.3.2" 488 | source = "registry+https://github.com/rust-lang/crates.io-index" 489 | checksum = "dea2df4cf52843e0452895c455a1a2cfbb842a1e7329671acf418fdc53ed4c59" 490 | 491 | [[package]] 492 | name = "exitcode" 493 | version = "1.1.2" 494 | source = "registry+https://github.com/rust-lang/crates.io-index" 495 | checksum = "de853764b47027c2e862a995c34978ffa63c1501f2e15f987ba11bd4f9bba193" 496 | 497 | [[package]] 498 | name = "fd-lock" 499 | version = "4.0.4" 500 | source = "registry+https://github.com/rust-lang/crates.io-index" 501 | checksum = "0ce92ff622d6dadf7349484f42c93271a0d49b7cc4d466a936405bacbe10aa78" 502 | dependencies = [ 503 | "cfg-if", 504 | "rustix", 505 | "windows-sys 0.59.0", 506 | ] 507 | 508 | [[package]] 509 | name = "flate2" 510 | version = "1.1.1" 511 | source = "registry+https://github.com/rust-lang/crates.io-index" 512 | checksum = "7ced92e76e966ca2fd84c8f7aa01a4aea65b0eb6648d72f7c8f3e2764a67fece" 513 | dependencies = [ 514 | "crc32fast", 515 | "libz-rs-sys", 516 | "miniz_oxide", 517 | ] 518 | 519 | [[package]] 520 | name = "foldhash" 521 | version = "0.1.5" 522 | source = "registry+https://github.com/rust-lang/crates.io-index" 523 | checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" 524 | 525 | [[package]] 526 | name = "generic-array" 527 | version = "0.14.7" 528 | source = "registry+https://github.com/rust-lang/crates.io-index" 529 | checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" 530 | dependencies = [ 531 | "typenum", 532 | "version_check", 533 | ] 534 | 535 | [[package]] 536 | name = "gethostname" 537 | version = "1.0.2" 538 | source = "registry+https://github.com/rust-lang/crates.io-index" 539 | checksum = "fc257fdb4038301ce4b9cd1b3b51704509692bb3ff716a410cbd07925d9dae55" 540 | dependencies = [ 541 | "rustix", 542 | "windows-targets 0.52.6", 543 | ] 544 | 545 | [[package]] 546 | name = "getopts" 547 | version = "0.2.21" 548 | source = "registry+https://github.com/rust-lang/crates.io-index" 549 | checksum = "14dbbfd5c71d70241ecf9e6f13737f7b5ce823821063188d7e46c41d371eebd5" 550 | dependencies = [ 551 | "unicode-width 0.1.14", 552 | ] 553 | 554 | [[package]] 555 | name = "getrandom" 556 | version = "0.2.16" 557 | source = "registry+https://github.com/rust-lang/crates.io-index" 558 | checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" 559 | dependencies = [ 560 | "cfg-if", 561 | "libc", 562 | "wasi 0.11.0+wasi-snapshot-preview1", 563 | ] 564 | 565 | [[package]] 566 | name = "getrandom" 567 | version = "0.3.3" 568 | source = "registry+https://github.com/rust-lang/crates.io-index" 569 | checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4" 570 | dependencies = [ 571 | "cfg-if", 572 | "libc", 573 | "r-efi", 574 | "wasi 0.14.2+wasi-0.2.4", 575 | ] 576 | 577 | [[package]] 578 | name = "glob" 579 | version = "0.3.2" 580 | source = "registry+https://github.com/rust-lang/crates.io-index" 581 | checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2" 582 | 583 | [[package]] 584 | name = "half" 585 | version = "2.6.0" 586 | source = "registry+https://github.com/rust-lang/crates.io-index" 587 | checksum = "459196ed295495a68f7d7fe1d84f6c4b7ff0e21fe3017b2f283c6fac3ad803c9" 588 | dependencies = [ 589 | "cfg-if", 590 | "crunchy", 591 | ] 592 | 593 | [[package]] 594 | name = "hashbrown" 595 | version = "0.15.3" 596 | source = "registry+https://github.com/rust-lang/crates.io-index" 597 | checksum = "84b26c544d002229e640969970a2e74021aadf6e2f96372b9c58eff97de08eb3" 598 | dependencies = [ 599 | "foldhash", 600 | ] 601 | 602 | [[package]] 603 | name = "heck" 604 | version = "0.5.0" 605 | source = "registry+https://github.com/rust-lang/crates.io-index" 606 | checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" 607 | 608 | [[package]] 609 | name = "hermit-abi" 610 | version = "0.3.9" 611 | source = "registry+https://github.com/rust-lang/crates.io-index" 612 | checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" 613 | 614 | [[package]] 615 | name = "hex" 616 | version = "0.4.3" 617 | source = "registry+https://github.com/rust-lang/crates.io-index" 618 | checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" 619 | 620 | [[package]] 621 | name = "hexf-parse" 622 | version = "0.2.1" 623 | source = "registry+https://github.com/rust-lang/crates.io-index" 624 | checksum = "dfa686283ad6dd069f105e5ab091b04c62850d3e4cf5d67debad1933f55023df" 625 | 626 | [[package]] 627 | name = "home" 628 | version = "0.5.11" 629 | source = "registry+https://github.com/rust-lang/crates.io-index" 630 | checksum = "589533453244b0995c858700322199b2becb13b627df2851f64a2775d024abcf" 631 | dependencies = [ 632 | "windows-sys 0.59.0", 633 | ] 634 | 635 | [[package]] 636 | name = "iana-time-zone" 637 | version = "0.1.63" 638 | source = "registry+https://github.com/rust-lang/crates.io-index" 639 | checksum = "b0c919e5debc312ad217002b8048a17b7d83f80703865bbfcfebb0458b0b27d8" 640 | dependencies = [ 641 | "android_system_properties", 642 | "core-foundation-sys", 643 | "iana-time-zone-haiku", 644 | "js-sys", 645 | "log", 646 | "wasm-bindgen", 647 | "windows-core 0.61.2", 648 | ] 649 | 650 | [[package]] 651 | name = "iana-time-zone-haiku" 652 | version = "0.1.2" 653 | source = "registry+https://github.com/rust-lang/crates.io-index" 654 | checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" 655 | dependencies = [ 656 | "cc", 657 | ] 658 | 659 | [[package]] 660 | name = "indexmap" 661 | version = "2.9.0" 662 | source = "registry+https://github.com/rust-lang/crates.io-index" 663 | checksum = "cea70ddb795996207ad57735b50c5982d8844f38ba9ee5f1aedcfb708a2aa11e" 664 | dependencies = [ 665 | "equivalent", 666 | "hashbrown", 667 | ] 668 | 669 | [[package]] 670 | name = "is-macro" 671 | version = "0.3.7" 672 | source = "registry+https://github.com/rust-lang/crates.io-index" 673 | checksum = "1d57a3e447e24c22647738e4607f1df1e0ec6f72e16182c4cd199f647cdfb0e4" 674 | dependencies = [ 675 | "heck", 676 | "proc-macro2", 677 | "quote", 678 | "syn", 679 | ] 680 | 681 | [[package]] 682 | name = "is_terminal_polyfill" 683 | version = "1.70.1" 684 | source = "registry+https://github.com/rust-lang/crates.io-index" 685 | checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" 686 | 687 | [[package]] 688 | name = "itertools" 689 | version = "0.14.0" 690 | source = "registry+https://github.com/rust-lang/crates.io-index" 691 | checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285" 692 | dependencies = [ 693 | "either", 694 | ] 695 | 696 | [[package]] 697 | name = "itoa" 698 | version = "1.0.15" 699 | source = "registry+https://github.com/rust-lang/crates.io-index" 700 | checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" 701 | 702 | [[package]] 703 | name = "jiff" 704 | version = "0.2.14" 705 | source = "registry+https://github.com/rust-lang/crates.io-index" 706 | checksum = "a194df1107f33c79f4f93d02c80798520551949d59dfad22b6157048a88cca93" 707 | dependencies = [ 708 | "jiff-static", 709 | "log", 710 | "portable-atomic", 711 | "portable-atomic-util", 712 | "serde", 713 | ] 714 | 715 | [[package]] 716 | name = "jiff-static" 717 | version = "0.2.14" 718 | source = "registry+https://github.com/rust-lang/crates.io-index" 719 | checksum = "6c6e1db7ed32c6c71b759497fae34bf7933636f75a251b9e736555da426f6442" 720 | dependencies = [ 721 | "proc-macro2", 722 | "quote", 723 | "syn", 724 | ] 725 | 726 | [[package]] 727 | name = "js-sys" 728 | version = "0.3.77" 729 | source = "registry+https://github.com/rust-lang/crates.io-index" 730 | checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" 731 | dependencies = [ 732 | "once_cell", 733 | "wasm-bindgen", 734 | ] 735 | 736 | [[package]] 737 | name = "junction" 738 | version = "1.2.0" 739 | source = "registry+https://github.com/rust-lang/crates.io-index" 740 | checksum = "72bbdfd737a243da3dfc1f99ee8d6e166480f17ab4ac84d7c34aacd73fc7bd16" 741 | dependencies = [ 742 | "scopeguard", 743 | "windows-sys 0.52.0", 744 | ] 745 | 746 | [[package]] 747 | name = "keccak" 748 | version = "0.1.5" 749 | source = "registry+https://github.com/rust-lang/crates.io-index" 750 | checksum = "ecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654" 751 | dependencies = [ 752 | "cpufeatures", 753 | ] 754 | 755 | [[package]] 756 | name = "lexical-parse-float" 757 | version = "1.0.5" 758 | source = "registry+https://github.com/rust-lang/crates.io-index" 759 | checksum = "de6f9cb01fb0b08060209a057c048fcbab8717b4c1ecd2eac66ebfe39a65b0f2" 760 | dependencies = [ 761 | "lexical-parse-integer", 762 | "lexical-util", 763 | "static_assertions", 764 | ] 765 | 766 | [[package]] 767 | name = "lexical-parse-integer" 768 | version = "1.0.5" 769 | source = "registry+https://github.com/rust-lang/crates.io-index" 770 | checksum = "72207aae22fc0a121ba7b6d479e42cbfea549af1479c3f3a4f12c70dd66df12e" 771 | dependencies = [ 772 | "lexical-util", 773 | "static_assertions", 774 | ] 775 | 776 | [[package]] 777 | name = "lexical-util" 778 | version = "1.0.6" 779 | source = "registry+https://github.com/rust-lang/crates.io-index" 780 | checksum = "5a82e24bf537fd24c177ffbbdc6ebcc8d54732c35b50a3f28cc3f4e4c949a0b3" 781 | dependencies = [ 782 | "static_assertions", 783 | ] 784 | 785 | [[package]] 786 | name = "lexopt" 787 | version = "0.3.1" 788 | source = "registry+https://github.com/rust-lang/crates.io-index" 789 | checksum = "9fa0e2a1fcbe2f6be6c42e342259976206b383122fc152e872795338b5a3f3a7" 790 | 791 | [[package]] 792 | name = "libbz2-rs-sys" 793 | version = "0.1.3" 794 | source = "registry+https://github.com/rust-lang/crates.io-index" 795 | checksum = "0864a00c8d019e36216b69c2c4ce50b83b7bd966add3cf5ba554ec44f8bebcf5" 796 | 797 | [[package]] 798 | name = "libc" 799 | version = "0.2.172" 800 | source = "registry+https://github.com/rust-lang/crates.io-index" 801 | checksum = "d750af042f7ef4f724306de029d18836c26c1765a54a6a3f094cbd23a7267ffa" 802 | 803 | [[package]] 804 | name = "libffi" 805 | version = "4.1.0" 806 | source = "registry+https://github.com/rust-lang/crates.io-index" 807 | checksum = "ebfd30a67b482a08116e753d0656cb626548cf4242543e5cc005be7639d99838" 808 | dependencies = [ 809 | "libc", 810 | "libffi-sys", 811 | ] 812 | 813 | [[package]] 814 | name = "libffi-sys" 815 | version = "3.3.1" 816 | source = "registry+https://github.com/rust-lang/crates.io-index" 817 | checksum = "f003aa318c9f0ee69eb0ada7c78f5c9d2fedd2ceb274173b5c7ff475eee584a3" 818 | dependencies = [ 819 | "cc", 820 | ] 821 | 822 | [[package]] 823 | name = "libloading" 824 | version = "0.8.7" 825 | source = "registry+https://github.com/rust-lang/crates.io-index" 826 | checksum = "6a793df0d7afeac54f95b471d3af7f0d4fb975699f972341a4b76988d49cdf0c" 827 | dependencies = [ 828 | "cfg-if", 829 | "windows-targets 0.53.0", 830 | ] 831 | 832 | [[package]] 833 | name = "libm" 834 | version = "0.2.15" 835 | source = "registry+https://github.com/rust-lang/crates.io-index" 836 | checksum = "f9fbbcab51052fe104eb5e5d351cf728d30a5be1fe14d9be8a3b097481fb97de" 837 | 838 | [[package]] 839 | name = "libredox" 840 | version = "0.1.3" 841 | source = "registry+https://github.com/rust-lang/crates.io-index" 842 | checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" 843 | dependencies = [ 844 | "bitflags", 845 | "libc", 846 | ] 847 | 848 | [[package]] 849 | name = "libz-rs-sys" 850 | version = "0.5.0" 851 | source = "registry+https://github.com/rust-lang/crates.io-index" 852 | checksum = "6489ca9bd760fe9642d7644e827b0c9add07df89857b0416ee15c1cc1a3b8c5a" 853 | dependencies = [ 854 | "zlib-rs", 855 | ] 856 | 857 | [[package]] 858 | name = "linux-raw-sys" 859 | version = "0.9.4" 860 | source = "registry+https://github.com/rust-lang/crates.io-index" 861 | checksum = "cd945864f07fe9f5371a27ad7b52a172b4b499999f1d97574c9fa68373937e12" 862 | 863 | [[package]] 864 | name = "lock_api" 865 | version = "0.4.12" 866 | source = "registry+https://github.com/rust-lang/crates.io-index" 867 | checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" 868 | dependencies = [ 869 | "autocfg", 870 | "scopeguard", 871 | ] 872 | 873 | [[package]] 874 | name = "log" 875 | version = "0.4.27" 876 | source = "registry+https://github.com/rust-lang/crates.io-index" 877 | checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" 878 | 879 | [[package]] 880 | name = "lz4_flex" 881 | version = "0.11.3" 882 | source = "registry+https://github.com/rust-lang/crates.io-index" 883 | checksum = "75761162ae2b0e580d7e7c390558127e5f01b4194debd6221fd8c207fc80e3f5" 884 | dependencies = [ 885 | "twox-hash", 886 | ] 887 | 888 | [[package]] 889 | name = "lzma-sys" 890 | version = "0.1.20" 891 | source = "registry+https://github.com/rust-lang/crates.io-index" 892 | checksum = "5fda04ab3764e6cde78b9974eec4f779acaba7c4e84b36eca3cf77c581b85d27" 893 | dependencies = [ 894 | "cc", 895 | "libc", 896 | "pkg-config", 897 | ] 898 | 899 | [[package]] 900 | name = "mac_address" 901 | version = "1.1.8" 902 | source = "registry+https://github.com/rust-lang/crates.io-index" 903 | checksum = "c0aeb26bf5e836cc1c341c8106051b573f1766dfa05aa87f0b98be5e51b02303" 904 | dependencies = [ 905 | "nix", 906 | "winapi", 907 | ] 908 | 909 | [[package]] 910 | name = "malachite-base" 911 | version = "0.6.0" 912 | source = "registry+https://github.com/rust-lang/crates.io-index" 913 | checksum = "554bcf7f816ff3c1eae8f2b95c4375156884c79988596a6d01b7b070710fa9e5" 914 | dependencies = [ 915 | "hashbrown", 916 | "itertools", 917 | "libm", 918 | "ryu", 919 | ] 920 | 921 | [[package]] 922 | name = "malachite-bigint" 923 | version = "0.6.0" 924 | source = "registry+https://github.com/rust-lang/crates.io-index" 925 | checksum = "df1acde414186498b2a6a1e271f8ce5d65eaa5c492e95271121f30718fe2f925" 926 | dependencies = [ 927 | "malachite-base", 928 | "malachite-nz", 929 | "num-integer", 930 | "num-traits", 931 | "paste", 932 | ] 933 | 934 | [[package]] 935 | name = "malachite-nz" 936 | version = "0.6.0" 937 | source = "registry+https://github.com/rust-lang/crates.io-index" 938 | checksum = "f43d406336c42a59e07813b57efd651db00118af84c640a221d666964b2ec71f" 939 | dependencies = [ 940 | "itertools", 941 | "libm", 942 | "malachite-base", 943 | ] 944 | 945 | [[package]] 946 | name = "malachite-q" 947 | version = "0.6.0" 948 | source = "registry+https://github.com/rust-lang/crates.io-index" 949 | checksum = "25911a58ea0426e0b7bb1dffc8324e82711c82abff868b8523ae69d8a47e8062" 950 | dependencies = [ 951 | "itertools", 952 | "malachite-base", 953 | "malachite-nz", 954 | ] 955 | 956 | [[package]] 957 | name = "maplit" 958 | version = "1.0.2" 959 | source = "registry+https://github.com/rust-lang/crates.io-index" 960 | checksum = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d" 961 | 962 | [[package]] 963 | name = "matches" 964 | version = "0.1.10" 965 | source = "registry+https://github.com/rust-lang/crates.io-index" 966 | checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5" 967 | 968 | [[package]] 969 | name = "md-5" 970 | version = "0.10.6" 971 | source = "registry+https://github.com/rust-lang/crates.io-index" 972 | checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" 973 | dependencies = [ 974 | "cfg-if", 975 | "digest", 976 | ] 977 | 978 | [[package]] 979 | name = "memchr" 980 | version = "2.7.4" 981 | source = "registry+https://github.com/rust-lang/crates.io-index" 982 | checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" 983 | 984 | [[package]] 985 | name = "memmap2" 986 | version = "0.5.10" 987 | source = "registry+https://github.com/rust-lang/crates.io-index" 988 | checksum = "83faa42c0a078c393f6b29d5db232d8be22776a891f8f56e5284faee4a20b327" 989 | dependencies = [ 990 | "libc", 991 | ] 992 | 993 | [[package]] 994 | name = "memoffset" 995 | version = "0.9.1" 996 | source = "registry+https://github.com/rust-lang/crates.io-index" 997 | checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" 998 | dependencies = [ 999 | "autocfg", 1000 | ] 1001 | 1002 | [[package]] 1003 | name = "miniz_oxide" 1004 | version = "0.8.8" 1005 | source = "registry+https://github.com/rust-lang/crates.io-index" 1006 | checksum = "3be647b768db090acb35d5ec5db2b0e1f1de11133ca123b9eacf5137868f892a" 1007 | dependencies = [ 1008 | "adler2", 1009 | ] 1010 | 1011 | [[package]] 1012 | name = "mt19937" 1013 | version = "3.1.0" 1014 | source = "registry+https://github.com/rust-lang/crates.io-index" 1015 | checksum = "df7151a832e54d2d6b2c827a20e5bcdd80359281cd2c354e725d4b82e7c471de" 1016 | dependencies = [ 1017 | "rand_core 0.9.3", 1018 | ] 1019 | 1020 | [[package]] 1021 | name = "nibble_vec" 1022 | version = "0.1.0" 1023 | source = "registry+https://github.com/rust-lang/crates.io-index" 1024 | checksum = "77a5d83df9f36fe23f0c3648c6bbb8b0298bb5f1939c8f2704431371f4b84d43" 1025 | dependencies = [ 1026 | "smallvec", 1027 | ] 1028 | 1029 | [[package]] 1030 | name = "nix" 1031 | version = "0.29.0" 1032 | source = "registry+https://github.com/rust-lang/crates.io-index" 1033 | checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46" 1034 | dependencies = [ 1035 | "bitflags", 1036 | "cfg-if", 1037 | "cfg_aliases", 1038 | "libc", 1039 | "memoffset", 1040 | ] 1041 | 1042 | [[package]] 1043 | name = "num-complex" 1044 | version = "0.4.6" 1045 | source = "registry+https://github.com/rust-lang/crates.io-index" 1046 | checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" 1047 | dependencies = [ 1048 | "num-traits", 1049 | ] 1050 | 1051 | [[package]] 1052 | name = "num-integer" 1053 | version = "0.1.46" 1054 | source = "registry+https://github.com/rust-lang/crates.io-index" 1055 | checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" 1056 | dependencies = [ 1057 | "num-traits", 1058 | ] 1059 | 1060 | [[package]] 1061 | name = "num-traits" 1062 | version = "0.2.19" 1063 | source = "registry+https://github.com/rust-lang/crates.io-index" 1064 | checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" 1065 | dependencies = [ 1066 | "autocfg", 1067 | ] 1068 | 1069 | [[package]] 1070 | name = "num_cpus" 1071 | version = "1.16.0" 1072 | source = "registry+https://github.com/rust-lang/crates.io-index" 1073 | checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" 1074 | dependencies = [ 1075 | "hermit-abi", 1076 | "libc", 1077 | ] 1078 | 1079 | [[package]] 1080 | name = "num_enum" 1081 | version = "0.7.3" 1082 | source = "registry+https://github.com/rust-lang/crates.io-index" 1083 | checksum = "4e613fc340b2220f734a8595782c551f1250e969d87d3be1ae0579e8d4065179" 1084 | dependencies = [ 1085 | "num_enum_derive", 1086 | ] 1087 | 1088 | [[package]] 1089 | name = "num_enum_derive" 1090 | version = "0.7.3" 1091 | source = "registry+https://github.com/rust-lang/crates.io-index" 1092 | checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" 1093 | dependencies = [ 1094 | "proc-macro2", 1095 | "quote", 1096 | "syn", 1097 | ] 1098 | 1099 | [[package]] 1100 | name = "once_cell" 1101 | version = "1.21.3" 1102 | source = "registry+https://github.com/rust-lang/crates.io-index" 1103 | checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" 1104 | 1105 | [[package]] 1106 | name = "once_cell_polyfill" 1107 | version = "1.70.1" 1108 | source = "registry+https://github.com/rust-lang/crates.io-index" 1109 | checksum = "a4895175b425cb1f87721b59f0f286c2092bd4af812243672510e1ac53e2e0ad" 1110 | 1111 | [[package]] 1112 | name = "optional" 1113 | version = "0.5.0" 1114 | source = "registry+https://github.com/rust-lang/crates.io-index" 1115 | checksum = "978aa494585d3ca4ad74929863093e87cac9790d81fe7aba2b3dc2890643a0fc" 1116 | 1117 | [[package]] 1118 | name = "page_size" 1119 | version = "0.6.0" 1120 | source = "registry+https://github.com/rust-lang/crates.io-index" 1121 | checksum = "30d5b2194ed13191c1999ae0704b7839fb18384fa22e49b57eeaa97d79ce40da" 1122 | dependencies = [ 1123 | "libc", 1124 | "winapi", 1125 | ] 1126 | 1127 | [[package]] 1128 | name = "parking_lot" 1129 | version = "0.12.3" 1130 | source = "registry+https://github.com/rust-lang/crates.io-index" 1131 | checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" 1132 | dependencies = [ 1133 | "lock_api", 1134 | "parking_lot_core", 1135 | ] 1136 | 1137 | [[package]] 1138 | name = "parking_lot_core" 1139 | version = "0.9.10" 1140 | source = "registry+https://github.com/rust-lang/crates.io-index" 1141 | checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" 1142 | dependencies = [ 1143 | "cfg-if", 1144 | "libc", 1145 | "redox_syscall", 1146 | "smallvec", 1147 | "windows-targets 0.52.6", 1148 | ] 1149 | 1150 | [[package]] 1151 | name = "paste" 1152 | version = "1.0.15" 1153 | source = "registry+https://github.com/rust-lang/crates.io-index" 1154 | checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" 1155 | 1156 | [[package]] 1157 | name = "phf" 1158 | version = "0.11.3" 1159 | source = "registry+https://github.com/rust-lang/crates.io-index" 1160 | checksum = "1fd6780a80ae0c52cc120a26a1a42c1ae51b247a253e4e06113d23d2c2edd078" 1161 | dependencies = [ 1162 | "phf_shared", 1163 | ] 1164 | 1165 | [[package]] 1166 | name = "phf_codegen" 1167 | version = "0.11.3" 1168 | source = "registry+https://github.com/rust-lang/crates.io-index" 1169 | checksum = "aef8048c789fa5e851558d709946d6d79a8ff88c0440c587967f8e94bfb1216a" 1170 | dependencies = [ 1171 | "phf_generator", 1172 | "phf_shared", 1173 | ] 1174 | 1175 | [[package]] 1176 | name = "phf_generator" 1177 | version = "0.11.3" 1178 | source = "registry+https://github.com/rust-lang/crates.io-index" 1179 | checksum = "3c80231409c20246a13fddb31776fb942c38553c51e871f8cbd687a4cfb5843d" 1180 | dependencies = [ 1181 | "phf_shared", 1182 | "rand", 1183 | ] 1184 | 1185 | [[package]] 1186 | name = "phf_shared" 1187 | version = "0.11.3" 1188 | source = "registry+https://github.com/rust-lang/crates.io-index" 1189 | checksum = "67eabc2ef2a60eb7faa00097bd1ffdb5bd28e62bf39990626a582201b7a754e5" 1190 | dependencies = [ 1191 | "siphasher", 1192 | ] 1193 | 1194 | [[package]] 1195 | name = "pkg-config" 1196 | version = "0.3.32" 1197 | source = "registry+https://github.com/rust-lang/crates.io-index" 1198 | checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" 1199 | 1200 | [[package]] 1201 | name = "pmutil" 1202 | version = "0.6.1" 1203 | source = "registry+https://github.com/rust-lang/crates.io-index" 1204 | checksum = "52a40bc70c2c58040d2d8b167ba9a5ff59fc9dab7ad44771cfde3dcfde7a09c6" 1205 | dependencies = [ 1206 | "proc-macro2", 1207 | "quote", 1208 | "syn", 1209 | ] 1210 | 1211 | [[package]] 1212 | name = "portable-atomic" 1213 | version = "1.11.0" 1214 | source = "registry+https://github.com/rust-lang/crates.io-index" 1215 | checksum = "350e9b48cbc6b0e028b0473b114454c6316e57336ee184ceab6e53f72c178b3e" 1216 | 1217 | [[package]] 1218 | name = "portable-atomic-util" 1219 | version = "0.2.4" 1220 | source = "registry+https://github.com/rust-lang/crates.io-index" 1221 | checksum = "d8a2f0d8d040d7848a709caf78912debcc3f33ee4b3cac47d73d1e1069e83507" 1222 | dependencies = [ 1223 | "portable-atomic", 1224 | ] 1225 | 1226 | [[package]] 1227 | name = "ppv-lite86" 1228 | version = "0.2.21" 1229 | source = "registry+https://github.com/rust-lang/crates.io-index" 1230 | checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" 1231 | dependencies = [ 1232 | "zerocopy", 1233 | ] 1234 | 1235 | [[package]] 1236 | name = "proc-macro2" 1237 | version = "1.0.95" 1238 | source = "registry+https://github.com/rust-lang/crates.io-index" 1239 | checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778" 1240 | dependencies = [ 1241 | "unicode-ident", 1242 | ] 1243 | 1244 | [[package]] 1245 | name = "pymath" 1246 | version = "0.0.2" 1247 | source = "registry+https://github.com/rust-lang/crates.io-index" 1248 | checksum = "5b66ab66a8610ce209d8b36cd0fecc3a15c494f715e0cb26f0586057f293abc9" 1249 | dependencies = [ 1250 | "libc", 1251 | ] 1252 | 1253 | [[package]] 1254 | name = "quote" 1255 | version = "1.0.40" 1256 | source = "registry+https://github.com/rust-lang/crates.io-index" 1257 | checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" 1258 | dependencies = [ 1259 | "proc-macro2", 1260 | ] 1261 | 1262 | [[package]] 1263 | name = "r-efi" 1264 | version = "5.2.0" 1265 | source = "registry+https://github.com/rust-lang/crates.io-index" 1266 | checksum = "74765f6d916ee2faa39bc8e68e4f3ed8949b48cccdac59983d287a7cb71ce9c5" 1267 | 1268 | [[package]] 1269 | name = "radium" 1270 | version = "1.1.0" 1271 | source = "registry+https://github.com/rust-lang/crates.io-index" 1272 | checksum = "db0b76288902db304c864a12046b73d2d895cc34a4bb8137baaeebe9978a072c" 1273 | dependencies = [ 1274 | "cfg-if", 1275 | ] 1276 | 1277 | [[package]] 1278 | name = "radix_trie" 1279 | version = "0.2.1" 1280 | source = "registry+https://github.com/rust-lang/crates.io-index" 1281 | checksum = "c069c179fcdc6a2fe24d8d18305cf085fdbd4f922c041943e203685d6a1c58fd" 1282 | dependencies = [ 1283 | "endian-type", 1284 | "nibble_vec", 1285 | ] 1286 | 1287 | [[package]] 1288 | name = "rand" 1289 | version = "0.8.5" 1290 | source = "registry+https://github.com/rust-lang/crates.io-index" 1291 | checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" 1292 | dependencies = [ 1293 | "libc", 1294 | "rand_chacha", 1295 | "rand_core 0.6.4", 1296 | ] 1297 | 1298 | [[package]] 1299 | name = "rand_chacha" 1300 | version = "0.3.1" 1301 | source = "registry+https://github.com/rust-lang/crates.io-index" 1302 | checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" 1303 | dependencies = [ 1304 | "ppv-lite86", 1305 | "rand_core 0.6.4", 1306 | ] 1307 | 1308 | [[package]] 1309 | name = "rand_core" 1310 | version = "0.6.4" 1311 | source = "registry+https://github.com/rust-lang/crates.io-index" 1312 | checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" 1313 | dependencies = [ 1314 | "getrandom 0.2.16", 1315 | ] 1316 | 1317 | [[package]] 1318 | name = "rand_core" 1319 | version = "0.9.3" 1320 | source = "registry+https://github.com/rust-lang/crates.io-index" 1321 | checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" 1322 | dependencies = [ 1323 | "getrandom 0.3.3", 1324 | ] 1325 | 1326 | [[package]] 1327 | name = "redox_syscall" 1328 | version = "0.5.12" 1329 | source = "registry+https://github.com/rust-lang/crates.io-index" 1330 | checksum = "928fca9cf2aa042393a8325b9ead81d2f0df4cb12e1e24cef072922ccd99c5af" 1331 | dependencies = [ 1332 | "bitflags", 1333 | ] 1334 | 1335 | [[package]] 1336 | name = "redox_users" 1337 | version = "0.4.6" 1338 | source = "registry+https://github.com/rust-lang/crates.io-index" 1339 | checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" 1340 | dependencies = [ 1341 | "getrandom 0.2.16", 1342 | "libredox", 1343 | "thiserror 1.0.69", 1344 | ] 1345 | 1346 | [[package]] 1347 | name = "regex" 1348 | version = "1.11.1" 1349 | source = "registry+https://github.com/rust-lang/crates.io-index" 1350 | checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" 1351 | dependencies = [ 1352 | "aho-corasick", 1353 | "memchr", 1354 | "regex-automata", 1355 | "regex-syntax", 1356 | ] 1357 | 1358 | [[package]] 1359 | name = "regex-automata" 1360 | version = "0.4.9" 1361 | source = "registry+https://github.com/rust-lang/crates.io-index" 1362 | checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" 1363 | dependencies = [ 1364 | "aho-corasick", 1365 | "memchr", 1366 | "regex-syntax", 1367 | ] 1368 | 1369 | [[package]] 1370 | name = "regex-syntax" 1371 | version = "0.8.5" 1372 | source = "registry+https://github.com/rust-lang/crates.io-index" 1373 | checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" 1374 | 1375 | [[package]] 1376 | name = "result-like" 1377 | version = "0.5.0" 1378 | source = "registry+https://github.com/rust-lang/crates.io-index" 1379 | checksum = "abf7172fef6a7d056b5c26bf6c826570267562d51697f4982ff3ba4aec68a9df" 1380 | dependencies = [ 1381 | "result-like-derive", 1382 | ] 1383 | 1384 | [[package]] 1385 | name = "result-like-derive" 1386 | version = "0.5.0" 1387 | source = "registry+https://github.com/rust-lang/crates.io-index" 1388 | checksum = "a8d6574c02e894d66370cfc681e5d68fedbc9a548fb55b30a96b3f0ae22d0fe5" 1389 | dependencies = [ 1390 | "pmutil", 1391 | "proc-macro2", 1392 | "quote", 1393 | "syn", 1394 | ] 1395 | 1396 | [[package]] 1397 | name = "ruff_python_ast" 1398 | version = "0.0.0" 1399 | source = "git+https://github.com/astral-sh/ruff.git?tag=0.11.0#2cd25ef6410fb5fca96af1578728a3d828d2d53a" 1400 | dependencies = [ 1401 | "aho-corasick", 1402 | "bitflags", 1403 | "compact_str", 1404 | "is-macro", 1405 | "itertools", 1406 | "memchr", 1407 | "ruff_python_trivia", 1408 | "ruff_source_file", 1409 | "ruff_text_size", 1410 | "rustc-hash", 1411 | ] 1412 | 1413 | [[package]] 1414 | name = "ruff_python_parser" 1415 | version = "0.0.0" 1416 | source = "git+https://github.com/astral-sh/ruff.git?tag=0.11.0#2cd25ef6410fb5fca96af1578728a3d828d2d53a" 1417 | dependencies = [ 1418 | "bitflags", 1419 | "bstr", 1420 | "compact_str", 1421 | "memchr", 1422 | "ruff_python_ast", 1423 | "ruff_python_trivia", 1424 | "ruff_text_size", 1425 | "rustc-hash", 1426 | "static_assertions", 1427 | "unicode-ident", 1428 | "unicode-normalization", 1429 | "unicode_names2", 1430 | ] 1431 | 1432 | [[package]] 1433 | name = "ruff_python_trivia" 1434 | version = "0.0.0" 1435 | source = "git+https://github.com/astral-sh/ruff.git?tag=0.11.0#2cd25ef6410fb5fca96af1578728a3d828d2d53a" 1436 | dependencies = [ 1437 | "itertools", 1438 | "ruff_source_file", 1439 | "ruff_text_size", 1440 | "unicode-ident", 1441 | ] 1442 | 1443 | [[package]] 1444 | name = "ruff_source_file" 1445 | version = "0.0.0" 1446 | source = "git+https://github.com/astral-sh/ruff.git?tag=0.11.0#2cd25ef6410fb5fca96af1578728a3d828d2d53a" 1447 | dependencies = [ 1448 | "memchr", 1449 | "ruff_text_size", 1450 | ] 1451 | 1452 | [[package]] 1453 | name = "ruff_text_size" 1454 | version = "0.0.0" 1455 | source = "git+https://github.com/astral-sh/ruff.git?tag=0.11.0#2cd25ef6410fb5fca96af1578728a3d828d2d53a" 1456 | 1457 | [[package]] 1458 | name = "rustc-hash" 1459 | version = "2.1.1" 1460 | source = "registry+https://github.com/rust-lang/crates.io-index" 1461 | checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" 1462 | 1463 | [[package]] 1464 | name = "rustix" 1465 | version = "1.0.7" 1466 | source = "registry+https://github.com/rust-lang/crates.io-index" 1467 | checksum = "c71e83d6afe7ff64890ec6b71d6a69bb8a610ab78ce364b3352876bb4c801266" 1468 | dependencies = [ 1469 | "bitflags", 1470 | "errno", 1471 | "libc", 1472 | "linux-raw-sys", 1473 | "windows-sys 0.59.0", 1474 | ] 1475 | 1476 | [[package]] 1477 | name = "rustpython" 1478 | version = "0.4.0" 1479 | source = "git+https://github.com/peng1999/RustPython.git?branch=trim#218d5f7a0a9c70fbf2c9c7916e76129cebb9acde" 1480 | dependencies = [ 1481 | "cfg-if", 1482 | "dirs-next", 1483 | "env_logger", 1484 | "lexopt", 1485 | "libc", 1486 | "log", 1487 | "ruff_python_parser", 1488 | "rustpython-compiler", 1489 | "rustpython-pylib", 1490 | "rustpython-stdlib", 1491 | "rustpython-vm", 1492 | "rustyline", 1493 | ] 1494 | 1495 | [[package]] 1496 | name = "rustpython-codegen" 1497 | version = "0.4.0" 1498 | source = "git+https://github.com/peng1999/RustPython.git?branch=trim#218d5f7a0a9c70fbf2c9c7916e76129cebb9acde" 1499 | dependencies = [ 1500 | "ahash", 1501 | "bitflags", 1502 | "indexmap", 1503 | "itertools", 1504 | "log", 1505 | "malachite-bigint", 1506 | "memchr", 1507 | "num-complex", 1508 | "num-traits", 1509 | "ruff_python_ast", 1510 | "ruff_source_file", 1511 | "ruff_text_size", 1512 | "rustpython-compiler-core", 1513 | "rustpython-compiler-source", 1514 | "rustpython-literal", 1515 | "rustpython-wtf8", 1516 | "thiserror 2.0.12", 1517 | "unicode_names2", 1518 | ] 1519 | 1520 | [[package]] 1521 | name = "rustpython-common" 1522 | version = "0.4.0" 1523 | source = "git+https://github.com/peng1999/RustPython.git?branch=trim#218d5f7a0a9c70fbf2c9c7916e76129cebb9acde" 1524 | dependencies = [ 1525 | "ascii", 1526 | "bitflags", 1527 | "bstr", 1528 | "cfg-if", 1529 | "getrandom 0.3.3", 1530 | "itertools", 1531 | "libc", 1532 | "lock_api", 1533 | "malachite-base", 1534 | "malachite-bigint", 1535 | "malachite-q", 1536 | "memchr", 1537 | "num-traits", 1538 | "once_cell", 1539 | "radium", 1540 | "rustpython-literal", 1541 | "rustpython-wtf8", 1542 | "siphasher", 1543 | "unicode_names2", 1544 | "widestring", 1545 | "windows-sys 0.59.0", 1546 | ] 1547 | 1548 | [[package]] 1549 | name = "rustpython-compiler" 1550 | version = "0.4.0" 1551 | source = "git+https://github.com/peng1999/RustPython.git?branch=trim#218d5f7a0a9c70fbf2c9c7916e76129cebb9acde" 1552 | dependencies = [ 1553 | "ruff_python_ast", 1554 | "ruff_python_parser", 1555 | "ruff_source_file", 1556 | "ruff_text_size", 1557 | "rustpython-codegen", 1558 | "rustpython-compiler-core", 1559 | "rustpython-compiler-source", 1560 | "thiserror 2.0.12", 1561 | ] 1562 | 1563 | [[package]] 1564 | name = "rustpython-compiler-core" 1565 | version = "0.4.0" 1566 | source = "git+https://github.com/peng1999/RustPython.git?branch=trim#218d5f7a0a9c70fbf2c9c7916e76129cebb9acde" 1567 | dependencies = [ 1568 | "bitflags", 1569 | "itertools", 1570 | "lz4_flex", 1571 | "malachite-bigint", 1572 | "num-complex", 1573 | "ruff_source_file", 1574 | "rustpython-wtf8", 1575 | ] 1576 | 1577 | [[package]] 1578 | name = "rustpython-compiler-source" 1579 | version = "0.4.0" 1580 | source = "git+https://github.com/peng1999/RustPython.git?branch=trim#218d5f7a0a9c70fbf2c9c7916e76129cebb9acde" 1581 | dependencies = [ 1582 | "ruff_source_file", 1583 | "ruff_text_size", 1584 | ] 1585 | 1586 | [[package]] 1587 | name = "rustpython-derive" 1588 | version = "0.4.0" 1589 | source = "git+https://github.com/peng1999/RustPython.git?branch=trim#218d5f7a0a9c70fbf2c9c7916e76129cebb9acde" 1590 | dependencies = [ 1591 | "proc-macro2", 1592 | "rustpython-compiler", 1593 | "rustpython-derive-impl", 1594 | "syn", 1595 | ] 1596 | 1597 | [[package]] 1598 | name = "rustpython-derive-impl" 1599 | version = "0.4.0" 1600 | source = "git+https://github.com/peng1999/RustPython.git?branch=trim#218d5f7a0a9c70fbf2c9c7916e76129cebb9acde" 1601 | dependencies = [ 1602 | "itertools", 1603 | "maplit", 1604 | "proc-macro2", 1605 | "quote", 1606 | "rustpython-compiler-core", 1607 | "rustpython-doc", 1608 | "syn", 1609 | "syn-ext", 1610 | "textwrap", 1611 | ] 1612 | 1613 | [[package]] 1614 | name = "rustpython-doc" 1615 | version = "0.3.0" 1616 | source = "git+https://github.com/RustPython/__doc__?tag=0.3.0#8b62ce5d796d68a091969c9fa5406276cb483f79" 1617 | dependencies = [ 1618 | "once_cell", 1619 | ] 1620 | 1621 | [[package]] 1622 | name = "rustpython-literal" 1623 | version = "0.4.0" 1624 | source = "git+https://github.com/peng1999/RustPython.git?branch=trim#218d5f7a0a9c70fbf2c9c7916e76129cebb9acde" 1625 | dependencies = [ 1626 | "hexf-parse", 1627 | "is-macro", 1628 | "lexical-parse-float", 1629 | "num-traits", 1630 | "rustpython-wtf8", 1631 | "unic-ucd-category", 1632 | ] 1633 | 1634 | [[package]] 1635 | name = "rustpython-pylib" 1636 | version = "0.4.0" 1637 | source = "git+https://github.com/peng1999/RustPython.git?branch=trim#218d5f7a0a9c70fbf2c9c7916e76129cebb9acde" 1638 | dependencies = [ 1639 | "glob", 1640 | "rustpython-compiler-core", 1641 | "rustpython-derive", 1642 | ] 1643 | 1644 | [[package]] 1645 | name = "rustpython-sre_engine" 1646 | version = "0.4.0" 1647 | source = "git+https://github.com/peng1999/RustPython.git?branch=trim#218d5f7a0a9c70fbf2c9c7916e76129cebb9acde" 1648 | dependencies = [ 1649 | "bitflags", 1650 | "num_enum", 1651 | "optional", 1652 | "rustpython-wtf8", 1653 | ] 1654 | 1655 | [[package]] 1656 | name = "rustpython-stdlib" 1657 | version = "0.4.0" 1658 | source = "git+https://github.com/peng1999/RustPython.git?branch=trim#218d5f7a0a9c70fbf2c9c7916e76129cebb9acde" 1659 | dependencies = [ 1660 | "adler32", 1661 | "ahash", 1662 | "ascii", 1663 | "base64", 1664 | "blake2", 1665 | "bzip2", 1666 | "cfg-if", 1667 | "crc32fast", 1668 | "crossbeam-utils", 1669 | "csv-core", 1670 | "digest", 1671 | "dns-lookup", 1672 | "dyn-clone", 1673 | "flate2", 1674 | "gethostname", 1675 | "hex", 1676 | "indexmap", 1677 | "itertools", 1678 | "junction", 1679 | "libc", 1680 | "libz-rs-sys", 1681 | "lzma-sys", 1682 | "mac_address", 1683 | "malachite-bigint", 1684 | "md-5", 1685 | "memchr", 1686 | "memmap2", 1687 | "mt19937", 1688 | "nix", 1689 | "num-complex", 1690 | "num-integer", 1691 | "num-traits", 1692 | "num_enum", 1693 | "page_size", 1694 | "parking_lot", 1695 | "paste", 1696 | "pymath", 1697 | "rand_core 0.9.3", 1698 | "rustix", 1699 | "rustpython-common", 1700 | "rustpython-derive", 1701 | "rustpython-vm", 1702 | "schannel", 1703 | "sha-1", 1704 | "sha2", 1705 | "sha3", 1706 | "socket2", 1707 | "system-configuration", 1708 | "termios", 1709 | "ucd", 1710 | "unic-char-property", 1711 | "unic-normal", 1712 | "unic-ucd-age", 1713 | "unic-ucd-bidi", 1714 | "unic-ucd-category", 1715 | "unic-ucd-ident", 1716 | "unicode-casing", 1717 | "unicode_names2", 1718 | "uuid", 1719 | "widestring", 1720 | "windows-sys 0.59.0", 1721 | "xml-rs", 1722 | "xz2", 1723 | ] 1724 | 1725 | [[package]] 1726 | name = "rustpython-vm" 1727 | version = "0.4.0" 1728 | source = "git+https://github.com/peng1999/RustPython.git?branch=trim#218d5f7a0a9c70fbf2c9c7916e76129cebb9acde" 1729 | dependencies = [ 1730 | "ahash", 1731 | "ascii", 1732 | "bitflags", 1733 | "bstr", 1734 | "caseless", 1735 | "cfg-if", 1736 | "chrono", 1737 | "constant_time_eq", 1738 | "crossbeam-utils", 1739 | "errno", 1740 | "exitcode", 1741 | "getrandom 0.3.3", 1742 | "glob", 1743 | "half", 1744 | "hex", 1745 | "indexmap", 1746 | "is-macro", 1747 | "itertools", 1748 | "junction", 1749 | "libc", 1750 | "libffi", 1751 | "libloading", 1752 | "log", 1753 | "malachite-bigint", 1754 | "memchr", 1755 | "memoffset", 1756 | "nix", 1757 | "num-complex", 1758 | "num-integer", 1759 | "num-traits", 1760 | "num_cpus", 1761 | "num_enum", 1762 | "once_cell", 1763 | "optional", 1764 | "parking_lot", 1765 | "paste", 1766 | "result-like", 1767 | "ruff_python_ast", 1768 | "ruff_python_parser", 1769 | "ruff_source_file", 1770 | "ruff_text_size", 1771 | "rustix", 1772 | "rustpython-codegen", 1773 | "rustpython-common", 1774 | "rustpython-compiler", 1775 | "rustpython-compiler-core", 1776 | "rustpython-compiler-source", 1777 | "rustpython-derive", 1778 | "rustpython-literal", 1779 | "rustpython-sre_engine", 1780 | "rustyline", 1781 | "schannel", 1782 | "static_assertions", 1783 | "strum", 1784 | "strum_macros", 1785 | "thiserror 2.0.12", 1786 | "thread_local", 1787 | "timsort", 1788 | "uname", 1789 | "unic-ucd-bidi", 1790 | "unic-ucd-category", 1791 | "unic-ucd-ident", 1792 | "unicode-casing", 1793 | "unicode_names2", 1794 | "which", 1795 | "widestring", 1796 | "windows", 1797 | "windows-sys 0.59.0", 1798 | "winreg", 1799 | ] 1800 | 1801 | [[package]] 1802 | name = "rustpython-wtf8" 1803 | version = "0.4.0" 1804 | source = "git+https://github.com/peng1999/RustPython.git?branch=trim#218d5f7a0a9c70fbf2c9c7916e76129cebb9acde" 1805 | dependencies = [ 1806 | "ascii", 1807 | "bstr", 1808 | "itertools", 1809 | "memchr", 1810 | ] 1811 | 1812 | [[package]] 1813 | name = "rustversion" 1814 | version = "1.0.21" 1815 | source = "registry+https://github.com/rust-lang/crates.io-index" 1816 | checksum = "8a0d197bd2c9dc6e53b84da9556a69ba4cdfab8619eb41a8bd1cc2027a0f6b1d" 1817 | 1818 | [[package]] 1819 | name = "rustyline" 1820 | version = "15.0.0" 1821 | source = "registry+https://github.com/rust-lang/crates.io-index" 1822 | checksum = "2ee1e066dc922e513bda599c6ccb5f3bb2b0ea5870a579448f2622993f0a9a2f" 1823 | dependencies = [ 1824 | "bitflags", 1825 | "cfg-if", 1826 | "clipboard-win", 1827 | "fd-lock", 1828 | "home", 1829 | "libc", 1830 | "log", 1831 | "memchr", 1832 | "nix", 1833 | "radix_trie", 1834 | "unicode-segmentation", 1835 | "unicode-width 0.2.0", 1836 | "utf8parse", 1837 | "windows-sys 0.59.0", 1838 | ] 1839 | 1840 | [[package]] 1841 | name = "ryu" 1842 | version = "1.0.20" 1843 | source = "registry+https://github.com/rust-lang/crates.io-index" 1844 | checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" 1845 | 1846 | [[package]] 1847 | name = "schannel" 1848 | version = "0.1.27" 1849 | source = "registry+https://github.com/rust-lang/crates.io-index" 1850 | checksum = "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d" 1851 | dependencies = [ 1852 | "windows-sys 0.59.0", 1853 | ] 1854 | 1855 | [[package]] 1856 | name = "scopeguard" 1857 | version = "1.2.0" 1858 | source = "registry+https://github.com/rust-lang/crates.io-index" 1859 | checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" 1860 | 1861 | [[package]] 1862 | name = "serde" 1863 | version = "1.0.219" 1864 | source = "registry+https://github.com/rust-lang/crates.io-index" 1865 | checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" 1866 | dependencies = [ 1867 | "serde_derive", 1868 | ] 1869 | 1870 | [[package]] 1871 | name = "serde_derive" 1872 | version = "1.0.219" 1873 | source = "registry+https://github.com/rust-lang/crates.io-index" 1874 | checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" 1875 | dependencies = [ 1876 | "proc-macro2", 1877 | "quote", 1878 | "syn", 1879 | ] 1880 | 1881 | [[package]] 1882 | name = "sha-1" 1883 | version = "0.10.1" 1884 | source = "registry+https://github.com/rust-lang/crates.io-index" 1885 | checksum = "f5058ada175748e33390e40e872bd0fe59a19f265d0158daa551c5a88a76009c" 1886 | dependencies = [ 1887 | "cfg-if", 1888 | "cpufeatures", 1889 | "digest", 1890 | ] 1891 | 1892 | [[package]] 1893 | name = "sha2" 1894 | version = "0.10.9" 1895 | source = "registry+https://github.com/rust-lang/crates.io-index" 1896 | checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" 1897 | dependencies = [ 1898 | "cfg-if", 1899 | "cpufeatures", 1900 | "digest", 1901 | ] 1902 | 1903 | [[package]] 1904 | name = "sha3" 1905 | version = "0.10.8" 1906 | source = "registry+https://github.com/rust-lang/crates.io-index" 1907 | checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" 1908 | dependencies = [ 1909 | "digest", 1910 | "keccak", 1911 | ] 1912 | 1913 | [[package]] 1914 | name = "shlex" 1915 | version = "1.3.0" 1916 | source = "registry+https://github.com/rust-lang/crates.io-index" 1917 | checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" 1918 | 1919 | [[package]] 1920 | name = "siphasher" 1921 | version = "1.0.1" 1922 | source = "registry+https://github.com/rust-lang/crates.io-index" 1923 | checksum = "56199f7ddabf13fe5074ce809e7d3f42b42ae711800501b5b16ea82ad029c39d" 1924 | 1925 | [[package]] 1926 | name = "smallvec" 1927 | version = "1.15.0" 1928 | source = "registry+https://github.com/rust-lang/crates.io-index" 1929 | checksum = "8917285742e9f3e1683f0a9c4e6b57960b7314d0b08d30d1ecd426713ee2eee9" 1930 | 1931 | [[package]] 1932 | name = "socket2" 1933 | version = "0.5.9" 1934 | source = "registry+https://github.com/rust-lang/crates.io-index" 1935 | checksum = "4f5fd57c80058a56cf5c777ab8a126398ece8e442983605d280a44ce79d0edef" 1936 | dependencies = [ 1937 | "libc", 1938 | "windows-sys 0.52.0", 1939 | ] 1940 | 1941 | [[package]] 1942 | name = "static_assertions" 1943 | version = "1.1.0" 1944 | source = "registry+https://github.com/rust-lang/crates.io-index" 1945 | checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" 1946 | 1947 | [[package]] 1948 | name = "strum" 1949 | version = "0.27.1" 1950 | source = "registry+https://github.com/rust-lang/crates.io-index" 1951 | checksum = "f64def088c51c9510a8579e3c5d67c65349dcf755e5479ad3d010aa6454e2c32" 1952 | 1953 | [[package]] 1954 | name = "strum_macros" 1955 | version = "0.27.1" 1956 | source = "registry+https://github.com/rust-lang/crates.io-index" 1957 | checksum = "c77a8c5abcaf0f9ce05d62342b7d298c346515365c36b673df4ebe3ced01fde8" 1958 | dependencies = [ 1959 | "heck", 1960 | "proc-macro2", 1961 | "quote", 1962 | "rustversion", 1963 | "syn", 1964 | ] 1965 | 1966 | [[package]] 1967 | name = "subtle" 1968 | version = "2.6.1" 1969 | source = "registry+https://github.com/rust-lang/crates.io-index" 1970 | checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" 1971 | 1972 | [[package]] 1973 | name = "syn" 1974 | version = "2.0.101" 1975 | source = "registry+https://github.com/rust-lang/crates.io-index" 1976 | checksum = "8ce2b7fc941b3a24138a0a7cf8e858bfc6a992e7978a068a5c760deb0ed43caf" 1977 | dependencies = [ 1978 | "proc-macro2", 1979 | "quote", 1980 | "unicode-ident", 1981 | ] 1982 | 1983 | [[package]] 1984 | name = "syn-ext" 1985 | version = "0.5.0" 1986 | source = "registry+https://github.com/rust-lang/crates.io-index" 1987 | checksum = "b126de4ef6c2a628a68609dd00733766c3b015894698a438ebdf374933fc31d1" 1988 | dependencies = [ 1989 | "proc-macro2", 1990 | "quote", 1991 | "syn", 1992 | ] 1993 | 1994 | [[package]] 1995 | name = "system-configuration" 1996 | version = "0.6.1" 1997 | source = "registry+https://github.com/rust-lang/crates.io-index" 1998 | checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" 1999 | dependencies = [ 2000 | "bitflags", 2001 | "core-foundation", 2002 | "system-configuration-sys", 2003 | ] 2004 | 2005 | [[package]] 2006 | name = "system-configuration-sys" 2007 | version = "0.6.0" 2008 | source = "registry+https://github.com/rust-lang/crates.io-index" 2009 | checksum = "8e1d1b10ced5ca923a1fcb8d03e96b8d3268065d724548c0211415ff6ac6bac4" 2010 | dependencies = [ 2011 | "core-foundation-sys", 2012 | "libc", 2013 | ] 2014 | 2015 | [[package]] 2016 | name = "termios" 2017 | version = "0.3.3" 2018 | source = "registry+https://github.com/rust-lang/crates.io-index" 2019 | checksum = "411c5bf740737c7918b8b1fe232dca4dc9f8e754b8ad5e20966814001ed0ac6b" 2020 | dependencies = [ 2021 | "libc", 2022 | ] 2023 | 2024 | [[package]] 2025 | name = "textwrap" 2026 | version = "0.16.2" 2027 | source = "registry+https://github.com/rust-lang/crates.io-index" 2028 | checksum = "c13547615a44dc9c452a8a534638acdf07120d4b6847c8178705da06306a3057" 2029 | 2030 | [[package]] 2031 | name = "thiserror" 2032 | version = "1.0.69" 2033 | source = "registry+https://github.com/rust-lang/crates.io-index" 2034 | checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" 2035 | dependencies = [ 2036 | "thiserror-impl 1.0.69", 2037 | ] 2038 | 2039 | [[package]] 2040 | name = "thiserror" 2041 | version = "2.0.12" 2042 | source = "registry+https://github.com/rust-lang/crates.io-index" 2043 | checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708" 2044 | dependencies = [ 2045 | "thiserror-impl 2.0.12", 2046 | ] 2047 | 2048 | [[package]] 2049 | name = "thiserror-impl" 2050 | version = "1.0.69" 2051 | source = "registry+https://github.com/rust-lang/crates.io-index" 2052 | checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" 2053 | dependencies = [ 2054 | "proc-macro2", 2055 | "quote", 2056 | "syn", 2057 | ] 2058 | 2059 | [[package]] 2060 | name = "thiserror-impl" 2061 | version = "2.0.12" 2062 | source = "registry+https://github.com/rust-lang/crates.io-index" 2063 | checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d" 2064 | dependencies = [ 2065 | "proc-macro2", 2066 | "quote", 2067 | "syn", 2068 | ] 2069 | 2070 | [[package]] 2071 | name = "thread_local" 2072 | version = "1.1.8" 2073 | source = "registry+https://github.com/rust-lang/crates.io-index" 2074 | checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" 2075 | dependencies = [ 2076 | "cfg-if", 2077 | "once_cell", 2078 | ] 2079 | 2080 | [[package]] 2081 | name = "timsort" 2082 | version = "0.1.3" 2083 | source = "registry+https://github.com/rust-lang/crates.io-index" 2084 | checksum = "639ce8ef6d2ba56be0383a94dd13b92138d58de44c62618303bb798fa92bdc00" 2085 | 2086 | [[package]] 2087 | name = "tinyvec" 2088 | version = "1.9.0" 2089 | source = "registry+https://github.com/rust-lang/crates.io-index" 2090 | checksum = "09b3661f17e86524eccd4371ab0429194e0d7c008abb45f7a7495b1719463c71" 2091 | dependencies = [ 2092 | "tinyvec_macros", 2093 | ] 2094 | 2095 | [[package]] 2096 | name = "tinyvec_macros" 2097 | version = "0.1.1" 2098 | source = "registry+https://github.com/rust-lang/crates.io-index" 2099 | checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" 2100 | 2101 | [[package]] 2102 | name = "twox-hash" 2103 | version = "1.6.3" 2104 | source = "registry+https://github.com/rust-lang/crates.io-index" 2105 | checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" 2106 | dependencies = [ 2107 | "cfg-if", 2108 | "static_assertions", 2109 | ] 2110 | 2111 | [[package]] 2112 | name = "typenum" 2113 | version = "1.18.0" 2114 | source = "registry+https://github.com/rust-lang/crates.io-index" 2115 | checksum = "1dccffe3ce07af9386bfd29e80c0ab1a8205a2fc34e4bcd40364df902cfa8f3f" 2116 | 2117 | [[package]] 2118 | name = "typst-pyrunner" 2119 | version = "0.1.0" 2120 | dependencies = [ 2121 | "ciborium", 2122 | "rustpython", 2123 | "wasm-minimal-protocol", 2124 | ] 2125 | 2126 | [[package]] 2127 | name = "ucd" 2128 | version = "0.1.1" 2129 | source = "registry+https://github.com/rust-lang/crates.io-index" 2130 | checksum = "fe4fa6e588762366f1eb4991ce59ad1b93651d0b769dfb4e4d1c5c4b943d1159" 2131 | 2132 | [[package]] 2133 | name = "uname" 2134 | version = "0.1.1" 2135 | source = "registry+https://github.com/rust-lang/crates.io-index" 2136 | checksum = "b72f89f0ca32e4db1c04e2a72f5345d59796d4866a1ee0609084569f73683dc8" 2137 | dependencies = [ 2138 | "libc", 2139 | ] 2140 | 2141 | [[package]] 2142 | name = "unic-char-property" 2143 | version = "0.9.0" 2144 | source = "registry+https://github.com/rust-lang/crates.io-index" 2145 | checksum = "a8c57a407d9b6fa02b4795eb81c5b6652060a15a7903ea981f3d723e6c0be221" 2146 | dependencies = [ 2147 | "unic-char-range", 2148 | ] 2149 | 2150 | [[package]] 2151 | name = "unic-char-range" 2152 | version = "0.9.0" 2153 | source = "registry+https://github.com/rust-lang/crates.io-index" 2154 | checksum = "0398022d5f700414f6b899e10b8348231abf9173fa93144cbc1a43b9793c1fbc" 2155 | 2156 | [[package]] 2157 | name = "unic-common" 2158 | version = "0.9.0" 2159 | source = "registry+https://github.com/rust-lang/crates.io-index" 2160 | checksum = "80d7ff825a6a654ee85a63e80f92f054f904f21e7d12da4e22f9834a4aaa35bc" 2161 | 2162 | [[package]] 2163 | name = "unic-normal" 2164 | version = "0.9.0" 2165 | source = "registry+https://github.com/rust-lang/crates.io-index" 2166 | checksum = "f09d64d33589a94628bc2aeb037f35c2e25f3f049c7348b5aa5580b48e6bba62" 2167 | dependencies = [ 2168 | "unic-ucd-normal", 2169 | ] 2170 | 2171 | [[package]] 2172 | name = "unic-ucd-age" 2173 | version = "0.9.0" 2174 | source = "registry+https://github.com/rust-lang/crates.io-index" 2175 | checksum = "6c8cfdfe71af46b871dc6af2c24fcd360e2f3392ee4c5111877f2947f311671c" 2176 | dependencies = [ 2177 | "unic-char-property", 2178 | "unic-char-range", 2179 | "unic-ucd-version", 2180 | ] 2181 | 2182 | [[package]] 2183 | name = "unic-ucd-bidi" 2184 | version = "0.9.0" 2185 | source = "registry+https://github.com/rust-lang/crates.io-index" 2186 | checksum = "d1d568b51222484e1f8209ce48caa6b430bf352962b877d592c29ab31fb53d8c" 2187 | dependencies = [ 2188 | "unic-char-property", 2189 | "unic-char-range", 2190 | "unic-ucd-version", 2191 | ] 2192 | 2193 | [[package]] 2194 | name = "unic-ucd-category" 2195 | version = "0.9.0" 2196 | source = "registry+https://github.com/rust-lang/crates.io-index" 2197 | checksum = "1b8d4591f5fcfe1bd4453baaf803c40e1b1e69ff8455c47620440b46efef91c0" 2198 | dependencies = [ 2199 | "matches", 2200 | "unic-char-property", 2201 | "unic-char-range", 2202 | "unic-ucd-version", 2203 | ] 2204 | 2205 | [[package]] 2206 | name = "unic-ucd-hangul" 2207 | version = "0.9.0" 2208 | source = "registry+https://github.com/rust-lang/crates.io-index" 2209 | checksum = "eb1dc690e19010e1523edb9713224cba5ef55b54894fe33424439ec9a40c0054" 2210 | dependencies = [ 2211 | "unic-ucd-version", 2212 | ] 2213 | 2214 | [[package]] 2215 | name = "unic-ucd-ident" 2216 | version = "0.9.0" 2217 | source = "registry+https://github.com/rust-lang/crates.io-index" 2218 | checksum = "e230a37c0381caa9219d67cf063aa3a375ffed5bf541a452db16e744bdab6987" 2219 | dependencies = [ 2220 | "unic-char-property", 2221 | "unic-char-range", 2222 | "unic-ucd-version", 2223 | ] 2224 | 2225 | [[package]] 2226 | name = "unic-ucd-normal" 2227 | version = "0.9.0" 2228 | source = "registry+https://github.com/rust-lang/crates.io-index" 2229 | checksum = "86aed873b8202d22b13859dda5fe7c001d271412c31d411fd9b827e030569410" 2230 | dependencies = [ 2231 | "unic-char-property", 2232 | "unic-char-range", 2233 | "unic-ucd-hangul", 2234 | "unic-ucd-version", 2235 | ] 2236 | 2237 | [[package]] 2238 | name = "unic-ucd-version" 2239 | version = "0.9.0" 2240 | source = "registry+https://github.com/rust-lang/crates.io-index" 2241 | checksum = "96bd2f2237fe450fcd0a1d2f5f4e91711124f7857ba2e964247776ebeeb7b0c4" 2242 | dependencies = [ 2243 | "unic-common", 2244 | ] 2245 | 2246 | [[package]] 2247 | name = "unicode-casing" 2248 | version = "0.1.0" 2249 | source = "registry+https://github.com/rust-lang/crates.io-index" 2250 | checksum = "623f59e6af2a98bdafeb93fa277ac8e1e40440973001ca15cf4ae1541cd16d56" 2251 | 2252 | [[package]] 2253 | name = "unicode-ident" 2254 | version = "1.0.18" 2255 | source = "registry+https://github.com/rust-lang/crates.io-index" 2256 | checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" 2257 | 2258 | [[package]] 2259 | name = "unicode-normalization" 2260 | version = "0.1.24" 2261 | source = "registry+https://github.com/rust-lang/crates.io-index" 2262 | checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" 2263 | dependencies = [ 2264 | "tinyvec", 2265 | ] 2266 | 2267 | [[package]] 2268 | name = "unicode-segmentation" 2269 | version = "1.12.0" 2270 | source = "registry+https://github.com/rust-lang/crates.io-index" 2271 | checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" 2272 | 2273 | [[package]] 2274 | name = "unicode-width" 2275 | version = "0.1.14" 2276 | source = "registry+https://github.com/rust-lang/crates.io-index" 2277 | checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" 2278 | 2279 | [[package]] 2280 | name = "unicode-width" 2281 | version = "0.2.0" 2282 | source = "registry+https://github.com/rust-lang/crates.io-index" 2283 | checksum = "1fc81956842c57dac11422a97c3b8195a1ff727f06e85c84ed2e8aa277c9a0fd" 2284 | 2285 | [[package]] 2286 | name = "unicode_names2" 2287 | version = "1.3.0" 2288 | source = "registry+https://github.com/rust-lang/crates.io-index" 2289 | checksum = "d1673eca9782c84de5f81b82e4109dcfb3611c8ba0d52930ec4a9478f547b2dd" 2290 | dependencies = [ 2291 | "phf", 2292 | "unicode_names2_generator", 2293 | ] 2294 | 2295 | [[package]] 2296 | name = "unicode_names2_generator" 2297 | version = "1.3.0" 2298 | source = "registry+https://github.com/rust-lang/crates.io-index" 2299 | checksum = "b91e5b84611016120197efd7dc93ef76774f4e084cd73c9fb3ea4a86c570c56e" 2300 | dependencies = [ 2301 | "getopts", 2302 | "log", 2303 | "phf_codegen", 2304 | "rand", 2305 | ] 2306 | 2307 | [[package]] 2308 | name = "utf8parse" 2309 | version = "0.2.2" 2310 | source = "registry+https://github.com/rust-lang/crates.io-index" 2311 | checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" 2312 | 2313 | [[package]] 2314 | name = "uuid" 2315 | version = "1.17.0" 2316 | source = "registry+https://github.com/rust-lang/crates.io-index" 2317 | checksum = "3cf4199d1e5d15ddd86a694e4d0dffa9c323ce759fea589f00fef9d81cc1931d" 2318 | dependencies = [ 2319 | "atomic", 2320 | "js-sys", 2321 | "wasm-bindgen", 2322 | ] 2323 | 2324 | [[package]] 2325 | name = "venial" 2326 | version = "0.5.0" 2327 | source = "registry+https://github.com/rust-lang/crates.io-index" 2328 | checksum = "61584a325b16f97b5b25fcc852eb9550843a251057a5e3e5992d2376f3df4bb2" 2329 | dependencies = [ 2330 | "proc-macro2", 2331 | "quote", 2332 | ] 2333 | 2334 | [[package]] 2335 | name = "version_check" 2336 | version = "0.9.5" 2337 | source = "registry+https://github.com/rust-lang/crates.io-index" 2338 | checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" 2339 | 2340 | [[package]] 2341 | name = "wasi" 2342 | version = "0.11.0+wasi-snapshot-preview1" 2343 | source = "registry+https://github.com/rust-lang/crates.io-index" 2344 | checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" 2345 | 2346 | [[package]] 2347 | name = "wasi" 2348 | version = "0.14.2+wasi-0.2.4" 2349 | source = "registry+https://github.com/rust-lang/crates.io-index" 2350 | checksum = "9683f9a5a998d873c0d21fcbe3c083009670149a8fab228644b8bd36b2c48cb3" 2351 | dependencies = [ 2352 | "wit-bindgen-rt", 2353 | ] 2354 | 2355 | [[package]] 2356 | name = "wasm-bindgen" 2357 | version = "0.2.100" 2358 | source = "registry+https://github.com/rust-lang/crates.io-index" 2359 | checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" 2360 | dependencies = [ 2361 | "cfg-if", 2362 | "once_cell", 2363 | "rustversion", 2364 | "wasm-bindgen-macro", 2365 | ] 2366 | 2367 | [[package]] 2368 | name = "wasm-bindgen-backend" 2369 | version = "0.2.100" 2370 | source = "registry+https://github.com/rust-lang/crates.io-index" 2371 | checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" 2372 | dependencies = [ 2373 | "bumpalo", 2374 | "log", 2375 | "proc-macro2", 2376 | "quote", 2377 | "syn", 2378 | "wasm-bindgen-shared", 2379 | ] 2380 | 2381 | [[package]] 2382 | name = "wasm-bindgen-macro" 2383 | version = "0.2.100" 2384 | source = "registry+https://github.com/rust-lang/crates.io-index" 2385 | checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" 2386 | dependencies = [ 2387 | "quote", 2388 | "wasm-bindgen-macro-support", 2389 | ] 2390 | 2391 | [[package]] 2392 | name = "wasm-bindgen-macro-support" 2393 | version = "0.2.100" 2394 | source = "registry+https://github.com/rust-lang/crates.io-index" 2395 | checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" 2396 | dependencies = [ 2397 | "proc-macro2", 2398 | "quote", 2399 | "syn", 2400 | "wasm-bindgen-backend", 2401 | "wasm-bindgen-shared", 2402 | ] 2403 | 2404 | [[package]] 2405 | name = "wasm-bindgen-shared" 2406 | version = "0.2.100" 2407 | source = "registry+https://github.com/rust-lang/crates.io-index" 2408 | checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" 2409 | dependencies = [ 2410 | "unicode-ident", 2411 | ] 2412 | 2413 | [[package]] 2414 | name = "wasm-minimal-protocol" 2415 | version = "0.1.0" 2416 | source = "git+https://github.com/astrale-sharp/wasm-minimal-protocol.git?rev=9773b6f#9773b6f657fb8726e255310d9db9bc00345d8891" 2417 | dependencies = [ 2418 | "proc-macro2", 2419 | "quote", 2420 | "venial", 2421 | ] 2422 | 2423 | [[package]] 2424 | name = "which" 2425 | version = "7.0.3" 2426 | source = "registry+https://github.com/rust-lang/crates.io-index" 2427 | checksum = "24d643ce3fd3e5b54854602a080f34fb10ab75e0b813ee32d00ca2b44fa74762" 2428 | dependencies = [ 2429 | "either", 2430 | "env_home", 2431 | "rustix", 2432 | "winsafe", 2433 | ] 2434 | 2435 | [[package]] 2436 | name = "widestring" 2437 | version = "1.2.0" 2438 | source = "registry+https://github.com/rust-lang/crates.io-index" 2439 | checksum = "dd7cf3379ca1aac9eea11fba24fd7e315d621f8dfe35c8d7d2be8b793726e07d" 2440 | 2441 | [[package]] 2442 | name = "winapi" 2443 | version = "0.3.9" 2444 | source = "registry+https://github.com/rust-lang/crates.io-index" 2445 | checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" 2446 | dependencies = [ 2447 | "winapi-i686-pc-windows-gnu", 2448 | "winapi-x86_64-pc-windows-gnu", 2449 | ] 2450 | 2451 | [[package]] 2452 | name = "winapi-i686-pc-windows-gnu" 2453 | version = "0.4.0" 2454 | source = "registry+https://github.com/rust-lang/crates.io-index" 2455 | checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 2456 | 2457 | [[package]] 2458 | name = "winapi-x86_64-pc-windows-gnu" 2459 | version = "0.4.0" 2460 | source = "registry+https://github.com/rust-lang/crates.io-index" 2461 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 2462 | 2463 | [[package]] 2464 | name = "windows" 2465 | version = "0.52.0" 2466 | source = "registry+https://github.com/rust-lang/crates.io-index" 2467 | checksum = "e48a53791691ab099e5e2ad123536d0fff50652600abaf43bbf952894110d0be" 2468 | dependencies = [ 2469 | "windows-core 0.52.0", 2470 | "windows-targets 0.52.6", 2471 | ] 2472 | 2473 | [[package]] 2474 | name = "windows-core" 2475 | version = "0.52.0" 2476 | source = "registry+https://github.com/rust-lang/crates.io-index" 2477 | checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" 2478 | dependencies = [ 2479 | "windows-targets 0.52.6", 2480 | ] 2481 | 2482 | [[package]] 2483 | name = "windows-core" 2484 | version = "0.61.2" 2485 | source = "registry+https://github.com/rust-lang/crates.io-index" 2486 | checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3" 2487 | dependencies = [ 2488 | "windows-implement", 2489 | "windows-interface", 2490 | "windows-link", 2491 | "windows-result", 2492 | "windows-strings", 2493 | ] 2494 | 2495 | [[package]] 2496 | name = "windows-implement" 2497 | version = "0.60.0" 2498 | source = "registry+https://github.com/rust-lang/crates.io-index" 2499 | checksum = "a47fddd13af08290e67f4acabf4b459f647552718f683a7b415d290ac744a836" 2500 | dependencies = [ 2501 | "proc-macro2", 2502 | "quote", 2503 | "syn", 2504 | ] 2505 | 2506 | [[package]] 2507 | name = "windows-interface" 2508 | version = "0.59.1" 2509 | source = "registry+https://github.com/rust-lang/crates.io-index" 2510 | checksum = "bd9211b69f8dcdfa817bfd14bf1c97c9188afa36f4750130fcdf3f400eca9fa8" 2511 | dependencies = [ 2512 | "proc-macro2", 2513 | "quote", 2514 | "syn", 2515 | ] 2516 | 2517 | [[package]] 2518 | name = "windows-link" 2519 | version = "0.1.1" 2520 | source = "registry+https://github.com/rust-lang/crates.io-index" 2521 | checksum = "76840935b766e1b0a05c0066835fb9ec80071d4c09a16f6bd5f7e655e3c14c38" 2522 | 2523 | [[package]] 2524 | name = "windows-result" 2525 | version = "0.3.4" 2526 | source = "registry+https://github.com/rust-lang/crates.io-index" 2527 | checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6" 2528 | dependencies = [ 2529 | "windows-link", 2530 | ] 2531 | 2532 | [[package]] 2533 | name = "windows-strings" 2534 | version = "0.4.2" 2535 | source = "registry+https://github.com/rust-lang/crates.io-index" 2536 | checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57" 2537 | dependencies = [ 2538 | "windows-link", 2539 | ] 2540 | 2541 | [[package]] 2542 | name = "windows-sys" 2543 | version = "0.48.0" 2544 | source = "registry+https://github.com/rust-lang/crates.io-index" 2545 | checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" 2546 | dependencies = [ 2547 | "windows-targets 0.48.5", 2548 | ] 2549 | 2550 | [[package]] 2551 | name = "windows-sys" 2552 | version = "0.52.0" 2553 | source = "registry+https://github.com/rust-lang/crates.io-index" 2554 | checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" 2555 | dependencies = [ 2556 | "windows-targets 0.52.6", 2557 | ] 2558 | 2559 | [[package]] 2560 | name = "windows-sys" 2561 | version = "0.59.0" 2562 | source = "registry+https://github.com/rust-lang/crates.io-index" 2563 | checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" 2564 | dependencies = [ 2565 | "windows-targets 0.52.6", 2566 | ] 2567 | 2568 | [[package]] 2569 | name = "windows-targets" 2570 | version = "0.48.5" 2571 | source = "registry+https://github.com/rust-lang/crates.io-index" 2572 | checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" 2573 | dependencies = [ 2574 | "windows_aarch64_gnullvm 0.48.5", 2575 | "windows_aarch64_msvc 0.48.5", 2576 | "windows_i686_gnu 0.48.5", 2577 | "windows_i686_msvc 0.48.5", 2578 | "windows_x86_64_gnu 0.48.5", 2579 | "windows_x86_64_gnullvm 0.48.5", 2580 | "windows_x86_64_msvc 0.48.5", 2581 | ] 2582 | 2583 | [[package]] 2584 | name = "windows-targets" 2585 | version = "0.52.6" 2586 | source = "registry+https://github.com/rust-lang/crates.io-index" 2587 | checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" 2588 | dependencies = [ 2589 | "windows_aarch64_gnullvm 0.52.6", 2590 | "windows_aarch64_msvc 0.52.6", 2591 | "windows_i686_gnu 0.52.6", 2592 | "windows_i686_gnullvm 0.52.6", 2593 | "windows_i686_msvc 0.52.6", 2594 | "windows_x86_64_gnu 0.52.6", 2595 | "windows_x86_64_gnullvm 0.52.6", 2596 | "windows_x86_64_msvc 0.52.6", 2597 | ] 2598 | 2599 | [[package]] 2600 | name = "windows-targets" 2601 | version = "0.53.0" 2602 | source = "registry+https://github.com/rust-lang/crates.io-index" 2603 | checksum = "b1e4c7e8ceaaf9cb7d7507c974735728ab453b67ef8f18febdd7c11fe59dca8b" 2604 | dependencies = [ 2605 | "windows_aarch64_gnullvm 0.53.0", 2606 | "windows_aarch64_msvc 0.53.0", 2607 | "windows_i686_gnu 0.53.0", 2608 | "windows_i686_gnullvm 0.53.0", 2609 | "windows_i686_msvc 0.53.0", 2610 | "windows_x86_64_gnu 0.53.0", 2611 | "windows_x86_64_gnullvm 0.53.0", 2612 | "windows_x86_64_msvc 0.53.0", 2613 | ] 2614 | 2615 | [[package]] 2616 | name = "windows_aarch64_gnullvm" 2617 | version = "0.48.5" 2618 | source = "registry+https://github.com/rust-lang/crates.io-index" 2619 | checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" 2620 | 2621 | [[package]] 2622 | name = "windows_aarch64_gnullvm" 2623 | version = "0.52.6" 2624 | source = "registry+https://github.com/rust-lang/crates.io-index" 2625 | checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" 2626 | 2627 | [[package]] 2628 | name = "windows_aarch64_gnullvm" 2629 | version = "0.53.0" 2630 | source = "registry+https://github.com/rust-lang/crates.io-index" 2631 | checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764" 2632 | 2633 | [[package]] 2634 | name = "windows_aarch64_msvc" 2635 | version = "0.48.5" 2636 | source = "registry+https://github.com/rust-lang/crates.io-index" 2637 | checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" 2638 | 2639 | [[package]] 2640 | name = "windows_aarch64_msvc" 2641 | version = "0.52.6" 2642 | source = "registry+https://github.com/rust-lang/crates.io-index" 2643 | checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" 2644 | 2645 | [[package]] 2646 | name = "windows_aarch64_msvc" 2647 | version = "0.53.0" 2648 | source = "registry+https://github.com/rust-lang/crates.io-index" 2649 | checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c" 2650 | 2651 | [[package]] 2652 | name = "windows_i686_gnu" 2653 | version = "0.48.5" 2654 | source = "registry+https://github.com/rust-lang/crates.io-index" 2655 | checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" 2656 | 2657 | [[package]] 2658 | name = "windows_i686_gnu" 2659 | version = "0.52.6" 2660 | source = "registry+https://github.com/rust-lang/crates.io-index" 2661 | checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" 2662 | 2663 | [[package]] 2664 | name = "windows_i686_gnu" 2665 | version = "0.53.0" 2666 | source = "registry+https://github.com/rust-lang/crates.io-index" 2667 | checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3" 2668 | 2669 | [[package]] 2670 | name = "windows_i686_gnullvm" 2671 | version = "0.52.6" 2672 | source = "registry+https://github.com/rust-lang/crates.io-index" 2673 | checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" 2674 | 2675 | [[package]] 2676 | name = "windows_i686_gnullvm" 2677 | version = "0.53.0" 2678 | source = "registry+https://github.com/rust-lang/crates.io-index" 2679 | checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11" 2680 | 2681 | [[package]] 2682 | name = "windows_i686_msvc" 2683 | version = "0.48.5" 2684 | source = "registry+https://github.com/rust-lang/crates.io-index" 2685 | checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" 2686 | 2687 | [[package]] 2688 | name = "windows_i686_msvc" 2689 | version = "0.52.6" 2690 | source = "registry+https://github.com/rust-lang/crates.io-index" 2691 | checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" 2692 | 2693 | [[package]] 2694 | name = "windows_i686_msvc" 2695 | version = "0.53.0" 2696 | source = "registry+https://github.com/rust-lang/crates.io-index" 2697 | checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d" 2698 | 2699 | [[package]] 2700 | name = "windows_x86_64_gnu" 2701 | version = "0.48.5" 2702 | source = "registry+https://github.com/rust-lang/crates.io-index" 2703 | checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" 2704 | 2705 | [[package]] 2706 | name = "windows_x86_64_gnu" 2707 | version = "0.52.6" 2708 | source = "registry+https://github.com/rust-lang/crates.io-index" 2709 | checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" 2710 | 2711 | [[package]] 2712 | name = "windows_x86_64_gnu" 2713 | version = "0.53.0" 2714 | source = "registry+https://github.com/rust-lang/crates.io-index" 2715 | checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba" 2716 | 2717 | [[package]] 2718 | name = "windows_x86_64_gnullvm" 2719 | version = "0.48.5" 2720 | source = "registry+https://github.com/rust-lang/crates.io-index" 2721 | checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" 2722 | 2723 | [[package]] 2724 | name = "windows_x86_64_gnullvm" 2725 | version = "0.52.6" 2726 | source = "registry+https://github.com/rust-lang/crates.io-index" 2727 | checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" 2728 | 2729 | [[package]] 2730 | name = "windows_x86_64_gnullvm" 2731 | version = "0.53.0" 2732 | source = "registry+https://github.com/rust-lang/crates.io-index" 2733 | checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57" 2734 | 2735 | [[package]] 2736 | name = "windows_x86_64_msvc" 2737 | version = "0.48.5" 2738 | source = "registry+https://github.com/rust-lang/crates.io-index" 2739 | checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" 2740 | 2741 | [[package]] 2742 | name = "windows_x86_64_msvc" 2743 | version = "0.52.6" 2744 | source = "registry+https://github.com/rust-lang/crates.io-index" 2745 | checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" 2746 | 2747 | [[package]] 2748 | name = "windows_x86_64_msvc" 2749 | version = "0.53.0" 2750 | source = "registry+https://github.com/rust-lang/crates.io-index" 2751 | checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" 2752 | 2753 | [[package]] 2754 | name = "winreg" 2755 | version = "0.55.0" 2756 | source = "registry+https://github.com/rust-lang/crates.io-index" 2757 | checksum = "cb5a765337c50e9ec252c2069be9bf91c7df47afb103b642ba3a53bf8101be97" 2758 | dependencies = [ 2759 | "cfg-if", 2760 | "windows-sys 0.59.0", 2761 | ] 2762 | 2763 | [[package]] 2764 | name = "winsafe" 2765 | version = "0.0.19" 2766 | source = "registry+https://github.com/rust-lang/crates.io-index" 2767 | checksum = "d135d17ab770252ad95e9a872d365cf3090e3be864a34ab46f48555993efc904" 2768 | 2769 | [[package]] 2770 | name = "wit-bindgen-rt" 2771 | version = "0.39.0" 2772 | source = "registry+https://github.com/rust-lang/crates.io-index" 2773 | checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" 2774 | dependencies = [ 2775 | "bitflags", 2776 | ] 2777 | 2778 | [[package]] 2779 | name = "xml-rs" 2780 | version = "0.8.26" 2781 | source = "registry+https://github.com/rust-lang/crates.io-index" 2782 | checksum = "a62ce76d9b56901b19a74f19431b0d8b3bc7ca4ad685a746dfd78ca8f4fc6bda" 2783 | 2784 | [[package]] 2785 | name = "xz2" 2786 | version = "0.1.7" 2787 | source = "registry+https://github.com/rust-lang/crates.io-index" 2788 | checksum = "388c44dc09d76f1536602ead6d325eb532f5c122f17782bd57fb47baeeb767e2" 2789 | dependencies = [ 2790 | "lzma-sys", 2791 | ] 2792 | 2793 | [[package]] 2794 | name = "zerocopy" 2795 | version = "0.8.25" 2796 | source = "registry+https://github.com/rust-lang/crates.io-index" 2797 | checksum = "a1702d9583232ddb9174e01bb7c15a2ab8fb1bc6f227aa1233858c351a3ba0cb" 2798 | dependencies = [ 2799 | "zerocopy-derive", 2800 | ] 2801 | 2802 | [[package]] 2803 | name = "zerocopy-derive" 2804 | version = "0.8.25" 2805 | source = "registry+https://github.com/rust-lang/crates.io-index" 2806 | checksum = "28a6e20d751156648aa063f3800b706ee209a32c0b4d9f24be3d980b01be55ef" 2807 | dependencies = [ 2808 | "proc-macro2", 2809 | "quote", 2810 | "syn", 2811 | ] 2812 | 2813 | [[package]] 2814 | name = "zlib-rs" 2815 | version = "0.5.0" 2816 | source = "registry+https://github.com/rust-lang/crates.io-index" 2817 | checksum = "868b928d7949e09af2f6086dfc1e01936064cc7a819253bce650d4e2a2d63ba8" 2818 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "typst-pyrunner" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [lib] 9 | crate-type = ["cdylib"] 10 | 11 | [dependencies] 12 | ciborium = "0.2.1" 13 | rustpython = { branch = "trim", git = "https://github.com/peng1999/RustPython.git", features = ["freeze-stdlib", "stdlib"], default-features = false } 14 | wasm-minimal-protocol = { git = "https://github.com/astrale-sharp/wasm-minimal-protocol.git", rev = "9773b6f" } 15 | 16 | [profile.dev] 17 | lto = 'thin' # Enable link-time optimization 18 | opt-level = 'z' # Optimize for size 19 | panic = 'abort' # Abort on panic 20 | 21 | [profile.release] 22 | lto = true # Enable link-time optimization 23 | strip = true # Strip symbols from binary* 24 | opt-level = 'z' # Optimize for size 25 | codegen-units = 1 # Reduce number of codegen units to increase optimizations 26 | panic = 'abort' # Abort on panic 27 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Peng Guanwen 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | BUILD_TYPE ?= debug 2 | TMP_WASM ?= /tmp/typst-pyrunner.wasm 3 | 4 | # extract version from toml 5 | VERSION := $(shell grep '^version' pkg/typst.toml | head -n1 | sed -E 's/version\s*=\s*"(.+)"/\1/') 6 | PKG := pyrunner 7 | LOCAL := $(HOME)/.local/share/typst/packages/local 8 | INSTALL_DIR := $(LOCAL)/$(PKG)/$(VERSION) 9 | 10 | .PHONY: all install 11 | 12 | all: pkg/typst-pyrunner.wasm 13 | 14 | pkg/typst-pyrunner.wasm: target/wasm32-wasip1/${BUILD_TYPE}/typst_pyrunner.wasm 15 | wasi-stub $^ -o $(TMP_WASM) --stub-function wasi_snapshot_preview1:random_get,wasi_snapshot_preview1:environ_get,wasi_snapshot_preview1:environ_sizes_get,wasi_snapshot_preview1:clock_time_get -r 0 16 | wasi-stub $(TMP_WASM) -o $(TMP_WASM) --stub-function wasi_snapshot_preview1:fd_prestat_get -r 8 17 | wasi-stub $(TMP_WASM) -o $@ --stub-module wasi_snapshot_preview1 18 | 19 | install: all 20 | @echo "Installing to $(INSTALL_DIR)..." 21 | rm -rf $(INSTALL_DIR) 22 | mkdir -p $(INSTALL_DIR) 23 | cp pkg/* $(INSTALL_DIR)/ 24 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Typst Python Runner Plugin 2 | [![CI](https://github.com/peng1999/typst-pyrunner/actions/workflows/ci.yml/badge.svg)](https://github.com/peng1999/typst-pyrunner/actions/workflows/ci.yml) 3 | 4 | Run python code in [typst](https://typst.app) using [RustPython](https://github.com/RustPython/RustPython). 5 | 6 | ````typst 7 | #import "@preview/pyrunner:0.2.0" as py 8 | 9 | #let compiled = py.compile( 10 | ```python 11 | def find_emails(string): 12 | import re 13 | return re.findall(r"\b[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}\b", string) 14 | 15 | def sum_all(*array): 16 | return sum(array) 17 | ```) 18 | 19 | #let txt = "My email address is john.doe@example.com and my friend's email address is jane.doe@example.net." 20 | 21 | #py.call(compiled, "find_emails", txt) 22 | #py.call(compiled, "sum_all", 1, 2, 3) 23 | ```` 24 | 25 | Block mode is also available. 26 | 27 | ````typst 28 | #let code = ``` 29 | f'{a+b=}' 30 | ``` 31 | 32 | #py.block(code, globals: (a: 1, b: 2)) 33 | 34 | #py.block(code, globals: (a: "1", b: "2")) 35 | ```` 36 | 37 | The result will be `a+b=3` and `a+b='12'`. 38 | 39 | ## Current limitations 40 | 41 | Due to restrictions of typst and its plugin system, some Python function will not work as expected: 42 | - File and network IO will always raise an exception. 43 | - `datatime.now` will always return 1970-01-01. 44 | 45 | Also, there is no way to import third-party modules. Only bundled stdlib modules are available. We might find a way to lift this restriction, so feel free to submit an issue if you want this functionality. 46 | 47 | ## API 48 | ### `block` 49 | Run Python code block and get its result. 50 | 51 | #### Arguments 52 | - `code` : string | raw content - The Python code to run. 53 | - `globals` : dict (named optional) - The global variables to bring into scope. 54 | 55 | #### Returns 56 | The last expression of the code block. 57 | 58 | ### `compile` 59 | Compile Python code to bytecode. 60 | 61 | #### Arguments 62 | - `code` : string | raw content - The Python code to compile. 63 | 64 | #### Returns 65 | The bytecode representation in `bytes`. 66 | 67 | ### `call` 68 | Call a python function with arguments. 69 | 70 | #### Arguments 71 | - `compiled` : bytes - The bytecode representation of Python code. 72 | - `fn_name` : string - The name of the function to be called. 73 | - `..args` : any - The arguments to pass to the function. 74 | 75 | #### Returns 76 | The result of the function call. 77 | 78 | ## Build from source 79 | 80 | Install [`wasi-stub`][]. You should use a slightly modified one. See [the related issue](https://github.com/astrale-sharp/wasm-minimal-protocol/issues/22#issuecomment-1827379467). 81 | 82 | [`wasi-stub`]: https://github.com/astrale-sharp/wasm-minimal-protocol 83 | 84 | 87 | 88 | Build pyrunner. 89 | 90 | ``` 91 | rustup target add wasm32-wasip1 92 | cargo build --release --target wasm32-wasip1 93 | make pkg/typst-pyrunner.wasm 94 | ``` 95 | 96 | Add to local package. 97 | 98 | ``` 99 | make install BUILD_TYPE=release 100 | ``` 101 | -------------------------------------------------------------------------------- /pkg/pyrunner.typ: -------------------------------------------------------------------------------- 1 | #let py = plugin("./typst-pyrunner.wasm") 2 | 3 | #let extract(code) = { 4 | if type(code) == content { 5 | code.text 6 | } else { 7 | code 8 | } 9 | } 10 | 11 | #let block(code, globals: (:)) = { 12 | let code = extract(code) 13 | cbor(py.run_py(bytes(code), cbor.encode(globals))) 14 | } 15 | 16 | #let compile(code) = { 17 | let code = extract(code) 18 | py.compile_py(bytes(code)) 19 | } 20 | 21 | #let call(compiled, fn_name, ..args) = { 22 | cbor(py.call_compiled(compiled, bytes(fn_name), cbor.encode(args.pos()))) 23 | } 24 | 25 | -------------------------------------------------------------------------------- /pkg/typst.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "pyrunner" 3 | version = "0.3.0" 4 | entrypoint = "pyrunner.typ" 5 | authors = ["Peng Guanwen"] 6 | license = "MIT" 7 | description = "Run python code in typst." 8 | repository = "https://github.com/peng1999/typst-pyrunner" 9 | keywords = ["wasm", "python", "runtime", "rustpython"] 10 | categories = ["scripting", "integration"] 11 | compiler = "0.13" 12 | -------------------------------------------------------------------------------- /src/lib.rs: -------------------------------------------------------------------------------- 1 | use rustpython::vm::{ 2 | builtins::{ 3 | PyBaseException, PyBaseExceptionRef, PyBool, PyBytes, PyDict, PyInt, PyList, PyTuple, 4 | }, 5 | bytecode::BasicBag, 6 | compiler::CodeObject, 7 | convert::ToPyObject, 8 | frozen::FrozenCodeObject, 9 | types::Representable, 10 | AsObject, PyObjectRef, PyPayload, VirtualMachine, 11 | }; 12 | use wasm_minimal_protocol::{initiate_protocol, wasm_func}; 13 | 14 | initiate_protocol!(); 15 | 16 | #[wasm_func] 17 | pub fn run_py(code: &[u8], globals: &[u8]) -> Result, String> { 18 | let code = std::str::from_utf8(code).map_err(|err| err.to_string())?; 19 | let globals = ciborium::de::from_reader::(globals) 20 | .map_err(|err| err.to_string())? 21 | .into_map() 22 | .map_err(|_| "globals not a map".to_string())?; 23 | 24 | let interpreter = rustpython::InterpreterConfig::default() 25 | .init_stdlib() 26 | .interpreter(); 27 | let result = interpreter.enter(|vm| { 28 | let globals = globals 29 | .into_iter() 30 | .map(|(key, value)| { 31 | let key = key 32 | .into_text() 33 | .map_err(|_| "key not a string".to_string())?; 34 | let obj = cbor_to_py(vm, value).map_err(|err| pyerr_to_string(err, vm))?; 35 | Ok::<_, String>((key, obj)) 36 | }) 37 | .collect::, _>>()?; 38 | run_with_vm(vm, code, &globals).map_err(|err| pyerr_to_string(err, vm)) 39 | })?; 40 | 41 | let mut buffer = vec![]; 42 | ciborium::ser::into_writer(&result, &mut buffer).map_err(|err| err.to_string())?; 43 | Ok(buffer) 44 | } 45 | 46 | #[wasm_func] 47 | pub fn compile_py(code: &[u8]) -> Result, String> { 48 | let code = std::str::from_utf8(code).map_err(|err| err.to_string())?; 49 | let interpreter = rustpython::InterpreterConfig::default() 50 | .init_stdlib() 51 | .interpreter(); 52 | let result = interpreter.enter(|vm| { 53 | let code = vm 54 | .compile( 55 | code, 56 | rustpython::vm::compiler::Mode::Exec, 57 | "
".to_string(), 58 | ) 59 | .map_err(|err| pyerr_to_string(vm.new_syntax_error(&err, None), vm))?; 60 | let frozen_code = FrozenCodeObject::encode(&code); 61 | Ok::<_, String>(frozen_code) 62 | })?; 63 | 64 | Ok(result.bytes) 65 | } 66 | 67 | #[wasm_func] 68 | fn call_compiled(frozen_code: &[u8], fn_name: &[u8], args: &[u8]) -> Result, String> { 69 | let fn_name = std::str::from_utf8(fn_name).map_err(|err| err.to_string())?; 70 | let args = ciborium::de::from_reader::(args) 71 | .map_err(|err| err.to_string())? 72 | .into_array() 73 | .map_err(|_| "args not an array".to_string())?; 74 | let code = FrozenCodeObject { bytes: frozen_code }.decode(BasicBag); 75 | 76 | let interpreter = rustpython::InterpreterConfig::default() 77 | .init_stdlib() 78 | .interpreter(); 79 | let result = interpreter.enter(|vm| { 80 | run_compiled_with_vm(vm, code, fn_name, args).map_err(|err| pyerr_to_string(err, vm)) 81 | })?; 82 | 83 | let mut buffer = vec![]; 84 | ciborium::ser::into_writer(&result, &mut buffer).map_err(|err| err.to_string())?; 85 | Ok(buffer) 86 | } 87 | 88 | fn pyerr_to_string(err: PyBaseExceptionRef, vm: &VirtualMachine) -> String { 89 | PyBaseException::repr_str(&err, vm).unwrap_or("Error during print".to_string()) 90 | } 91 | 92 | fn cbor_to_py( 93 | vm: &VirtualMachine, 94 | val: ciborium::Value, 95 | ) -> Result { 96 | match val { 97 | ciborium::Value::Null => Ok(vm.ctx.none()), 98 | ciborium::Value::Bool(b) => Ok(vm.ctx.new_bool(b).to_pyobject(vm)), 99 | ciborium::Value::Integer(i) => Ok(vm.ctx.new_int(i128::from(i)).to_pyobject(vm)), 100 | ciborium::Value::Float(f) => Ok(vm.ctx.new_float(f).to_pyobject(vm)), 101 | ciborium::Value::Bytes(b) => Ok(vm.ctx.new_bytes(b).to_pyobject(vm)), 102 | ciborium::Value::Text(s) => Ok(vm.ctx.new_str(s).to_pyobject(vm)), 103 | ciborium::Value::Array(arr) => { 104 | let items = arr 105 | .into_iter() 106 | .map(|item| cbor_to_py(vm, item)) 107 | .collect::, _>>()?; 108 | Ok(vm.ctx.new_list(items).to_pyobject(vm)) 109 | } 110 | ciborium::Value::Map(map) => { 111 | let dict = vm.ctx.new_dict(); 112 | for (key, value) in map { 113 | let key = cbor_to_py(vm, key)?; 114 | let value = cbor_to_py(vm, value)?; 115 | dict.set_item(key.as_object(), value, vm)?; 116 | } 117 | Ok(dict.to_pyobject(vm)) 118 | } 119 | _ => Err(vm.new_type_error("Unsupported type".to_string())), 120 | } 121 | } 122 | 123 | fn py_to_cbor( 124 | vm: &VirtualMachine, 125 | obj: PyObjectRef, 126 | ) -> Result { 127 | if obj.is(&vm.ctx.none()) { 128 | return Ok(ciborium::Value::Null); 129 | } 130 | if let Ok(num) = obj.clone().downcast::() { 131 | let int = num.try_to_primitive::(vm)?; 132 | if obj.is_instance(PyBool::class(&vm.ctx).as_object(), vm)? { 133 | return Ok((int != 0).into()); 134 | } 135 | return Ok(int.into()); 136 | } 137 | if let Ok(bytes) = obj.clone().downcast::() { 138 | return Ok(bytes.as_bytes().into()); 139 | } 140 | if let Ok(list) = obj.clone().downcast::() { 141 | let values = list 142 | .into_iter() 143 | .map(|item| py_to_cbor(vm, item.clone())) 144 | .collect::, _>>()?; 145 | return Ok(values.into()); 146 | } 147 | if let Ok(list) = obj.clone().downcast::() { 148 | let values = list 149 | .borrow_vec() 150 | .iter() 151 | .map(|item| py_to_cbor(vm, item.clone())) 152 | .collect::, _>>()?; 153 | return Ok(values.into()); 154 | }; 155 | if let Ok(dict) = obj.clone().downcast::() { 156 | let kvs = dict 157 | .into_iter() 158 | .map(|(key, value)| { 159 | let key = ciborium::Value::from(key.str(vm)?.to_string()); 160 | let value = py_to_cbor(vm, value.clone())?; 161 | Ok((key, value)) 162 | }) 163 | .collect::, _>>()?; 164 | return Ok(kvs.into()); 165 | }; 166 | Ok(obj.str(vm)?.to_string().into()) 167 | } 168 | 169 | fn run_with_vm( 170 | vm: &VirtualMachine, 171 | code: &str, 172 | globals: &[(String, PyObjectRef)], 173 | ) -> Result { 174 | let scope = vm.new_scope_with_builtins(); 175 | for (name, value) in globals { 176 | scope.globals.set_item(name, value.clone(), vm)?; 177 | } 178 | let obj = vm.run_block_expr(scope, code)?; 179 | Ok(py_to_cbor(vm, obj)?) 180 | } 181 | 182 | fn run_compiled_with_vm( 183 | vm: &VirtualMachine, 184 | code: CodeObject, 185 | fn_name: &str, 186 | args: Vec, 187 | ) -> Result { 188 | let code = vm.ctx.new_code(code); 189 | let scope = vm.new_scope_with_builtins(); 190 | vm.run_code_obj(code, scope.clone())?; 191 | let fn_obj = scope.globals.get_item(fn_name, vm)?; 192 | let args = args 193 | .into_iter() 194 | .map(|arg| cbor_to_py(vm, arg)) 195 | .collect::, _>>()?; 196 | let result = fn_obj.call(args, vm)?; 197 | Ok(py_to_cbor(vm, result)?) 198 | } 199 | -------------------------------------------------------------------------------- /test/example.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/peng1999/typst-pyrunner/7cff456633b6f525791c33b3727f228becc0db83/test/example.pdf -------------------------------------------------------------------------------- /test/example.typ: -------------------------------------------------------------------------------- 1 | #import "@local/pyrunner:0.3.0" as py 2 | 3 | #let compiled = py.compile( 4 | ```python 5 | 6 | def find_emails(string): 7 | import re 8 | return re.findall(r"\b[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}\b", string) 9 | 10 | def sum_all(*array): 11 | return sum(array) 12 | 13 | def add(a, b): 14 | return f'{a+b=}' 15 | ```) 16 | 17 | #let txt = "My email address is john.doe@example.com and my friend's email address is jane.doe@example.net." 18 | 19 | #py.call(compiled, "find_emails", txt) 20 | #py.call(compiled, "sum_all", 1, 2, 3) 21 | 22 | #py.block(``` 23 | import sys 24 | sys.version, sys.path 25 | ```) 26 | 27 | #py.block( 28 | ```python 29 | [1, True, {"a": a, 5: "hello"}, None] 30 | ```, 31 | globals: (a: 3)) 32 | 33 | #py.call(compiled, "add", 1, 2) 34 | #py.call(compiled, "add", "1", "2") 35 | 36 | #let comp = py.compile( 37 | ```python 38 | def tai_ts(): 39 | import datetime 40 | n = datetime.datetime.now() 41 | return n 42 | 43 | def file_io(): 44 | try: 45 | open("test.txt", "w") 46 | except Exception as e: 47 | return f"Error: {e}" 48 | return 1 49 | ```) 50 | #py.call(comp, "tai_ts") 51 | #py.call(comp, "file_io") 52 | --------------------------------------------------------------------------------