diff --git a/.cargo/config.toml b/.cargo/config.toml new file mode 100644 index 000000000000..53e2ac1a7f5f --- /dev/null +++ b/.cargo/config.toml @@ -0,0 +1,2 @@ +[alias] +testit = "test --workspace --test tests --" diff --git a/.github/.well-known/funding-manifest-urls b/.github/.well-known/funding-manifest-urls new file mode 100644 index 000000000000..9c0d85947104 --- /dev/null +++ b/.github/.well-known/funding-manifest-urls @@ -0,0 +1 @@ +https://typst.app/funding.json diff --git a/.github/ISSUE_TEMPLATE/1-bug.yml b/.github/ISSUE_TEMPLATE/1-bug.yml new file mode 100644 index 000000000000..3519af67569b --- /dev/null +++ b/.github/ISSUE_TEMPLATE/1-bug.yml @@ -0,0 +1,46 @@ +name: 🐞 Compiler Bug Report +description: For bugs in the Typst compiler +title: Write a short and descriptive title! +labels: + - bug +body: + - type: markdown + attributes: + value: Thanks for reporting a bug in the Typst compiler. Did you [take a look](https://github.com/typst/typst/issues?q=is%3Aopen+is%3Aissue+label%3Abug) if your issue has already been filed? If so, join the discussion there! Is your issue related to Typst's web app? Please file it [here](https://github.com/typst/webapp-issues/issues) instead. + - type: textarea + id: description + attributes: + label: Description + description: Please describe your issue. Include specific steps to reproduce it or a screenshot if the problem is with Typst's output. + placeholder: Terse and specific description of the bug. You can add a screenshot by dragging an image here. + validations: + required: true + - type: input + id: repro-url + attributes: + label: Reproduction URL + description: If you did not specify Typst code above, you can share a link to your typst.app project here. + placeholder: https://typst.app/project/rU6j4Q5foiCcvB7Hz_gs9m + validations: + required: false + - type: dropdown + id: os + attributes: + label: Operating system + description: Which platform did you run the compiler on? + multiple: true + options: + - Web app + - Windows + - Linux + - macOS + validations: + required: false + - type: checkboxes + id: updated + attributes: + label: Typst version + description: Please check this box to confirm you are using the latest released version of Typst or an unreleased commit from this repository after the latest release. + options: + - label: I am using the latest version of Typst + required: false diff --git a/.github/ISSUE_TEMPLATE/2-feature.yml b/.github/ISSUE_TEMPLATE/2-feature.yml new file mode 100644 index 000000000000..b441eb3049ae --- /dev/null +++ b/.github/ISSUE_TEMPLATE/2-feature.yml @@ -0,0 +1,25 @@ +name: 🪴 Compiler Feature Request +description: For feature requests for the Typst compiler +title: Write a short and descriptive title! +labels: + - feature request +body: + - type: markdown + attributes: + value: Thanks for sharing your feature request for the Typst compiler. Did you [take a look](https://github.com/typst/typst/issues?q=is%3Aopen+is%3Aissue+label%3A%22feature+request%22) if a similar request has already been filed? If so, join the discussion there! Is your feature request related to Typst's web app? Please file it [here](https://github.com/typst/webapp-issues/issues) instead. + - type: textarea + id: description + attributes: + label: Description + description: Please describe your feature request. You can also add a mockup if you are requesting a new output feature! + placeholder: Terse and specific description of the feature. You can add an image by dragging a file here. + validations: + required: true + - type: textarea + id: use-case + attributes: + label: Use Case + description: Please describe why this feature would be useful. + placeholder: Describe what users can accomplish with this feature and whom it might be useful for. + validations: + required: true diff --git a/.github/ISSUE_TEMPLATE/3-docs.yml b/.github/ISSUE_TEMPLATE/3-docs.yml new file mode 100644 index 000000000000..564b59987053 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/3-docs.yml @@ -0,0 +1,17 @@ +name: 📖 Documentation +description: For issues with the documentation +title: Write a short and descriptive title! +labels: + - docs +body: + - type: markdown + attributes: + value: Thanks for reporting an issue with Typst's documentation. Did you [take a look](https://github.com/typst/typst/issues?q=is%3Aopen+is%3Aissue+label%3Adocs) if your issue has already been filed? If so, join the discussion there! Is your issue related to Typst's web app? Please file it [here](https://github.com/typst/webapp-issues/issues) instead. + - type: textarea + id: description + attributes: + label: Description + description: Please describe your issue. + placeholder: Terse and specific description of the issue. You can add a screenshot by dragging an image here. + validations: + required: true diff --git a/.github/ISSUE_TEMPLATE/bug.yml b/.github/ISSUE_TEMPLATE/bug.yml deleted file mode 100644 index a1d0cd7d7412..000000000000 --- a/.github/ISSUE_TEMPLATE/bug.yml +++ /dev/null @@ -1,46 +0,0 @@ -name: 🐞 Compiler Bug Report -description: For bugs of the Typst compiler -title: Write a short and descriptive title! -labels: - - bug -body: - - type: markdown - attributes: - value: Thanks for reporting a bug on the Typst compiler. Did you [take a look](https://github.com/typst/typst/issues?q=is%3Aopen+is%3Aissue+label%3Abug+-label%3A%22web+app%22) if your issue has already been filed? If so, join the discussion there! Is your issue related to Typst's web app? Please file it [here](https://github.com/typst/webapp-issues/issues) instead. - - type: textarea - id: description - attributes: - label: Description - description: Please describe your issue. Include specific steps to reproduce it or a screenshot if the problem is with Typst's output. - placeholder: Terse and specific description of the bug. You can add a screenshot by dragging an image here. - validations: - required: true - - type: input - id: repro-url - attributes: - label: Reproduction URL - description: If your did not specify Typst code above, you can share a link to your typst.app project here - placeholder: https://typst.app/project/rU6j4Q5foiCcvB7Hz_gs9m - validations: - required: false - - type: dropdown - id: os - attributes: - label: Operating system - description: Which platform did you run the compiler on? - multiple: true - options: - - Web app - - Windows - - Linux - - macOS - validations: - required: false - - type: checkboxes - id: updated - attributes: - label: Typst version - description: Please check this box to confirm you are using the latest released version of Typst or an unreleased commit from this repository after the latest release. - options: - - label: I am using the latest version of Typst - required: false diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 2c76b807b171..601c1e9a5cb0 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -3,9 +3,12 @@ contact_links: - name: 💻 Web App Issues url: https://github.com/typst/webapp-issues/issues about: Bug reports or feature requests for Typst's official web app + - name: 🏛️ Typst Forum + url: https://forum.typst.app/ + about: Do you have a question instead of a specific bug or feature request? Open a question in the Forum! - name: 💬 Typst Discord url: https://discord.gg/2uDybryKPe - about: Get answers to your questions about Typst on our Discord server. - - name: 🗣️ Discussions on GitHub - url: https://github.com/typst/typst/discussions - about: Do you have a question instead of a specific bug or feature request? Open a discussion thread! + about: If you're unsure about your issue, join and chat with the community on our Discord server! + - name: 📨 Contact Us + url: https://typst.app/contact/ + about: Did you have a bad interaction here or need to speak with the Typst Team privately? You can contact us directly. diff --git a/.github/ISSUE_TEMPLATE/feature.yml b/.github/ISSUE_TEMPLATE/feature.yml deleted file mode 100644 index 44e13d3f9b1a..000000000000 --- a/.github/ISSUE_TEMPLATE/feature.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: 🪴 Compiler Feature Request -description: For feature request for the Typst compiler -title: Write a short and descriptive title! -labels: - - feature request -body: - - type: markdown - attributes: - value: Thanks for sharing your feature request for the Typst compiler. Did you [take a look](https://github.com/typst/typst/issues?q=is%3Aopen+is%3Aissue+label%3A%22feature+request%22+-label%3A%22web+app%22+) if a similar request has already been filed? If so, join the discussion there! Is your feature request related to Typst's web app? Please file it [here](https://github.com/typst/webapp-issues/issues) instead. - - type: textarea - id: description - attributes: - label: Description - description: Please describe your feature request. You can also add a mockup if you are requesting a new output feature! - placeholder: Terse and specific description of the feature. You can add an image by dragging a file here. - validations: - required: true - - type: textarea - id: use-case - attributes: - label: Use Case - description: Please describe why this feature would be useful. - placeholder: Describe what users can accomplish with this feature and whom it might be useful for. - validations: - required: true diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c6743f867f25..3c6bbaad660f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,37 +1,117 @@ name: Continuous integration -on: [push, pull_request] +on: [push, pull_request, merge_group] env: RUSTFLAGS: "-Dwarnings" RUSTDOCFLAGS: "-Dwarnings" + TYPST_TESTS_EXTENDED: true + PKG_CONFIG_i686-unknown-linux-gnu: /usr/bin/i686-linux-gnu-pkgconf jobs: + # This allows us to have one branch protection rule for the full test matrix. + # See: https://github.com/orgs/community/discussions/4324 tests: name: Tests runs-on: ubuntu-latest + needs: [test-matrix] + if: always() steps: - - uses: actions/checkout@v3 - - uses: dtolnay/rust-toolchain@stable + - name: Tests successful + if: ${{ !(contains(needs.*.result, 'failure')) }} + run: exit 0 + - name: Tests failing + if: ${{ contains(needs.*.result, 'failure') }} + run: exit 1 + + test-matrix: + name: Tests + strategy: + matrix: + os: [ubuntu-latest, windows-latest] + bits: [64] + include: + - os: ubuntu-latest + bits: 32 + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + - if: startsWith(matrix.os, 'ubuntu-') && matrix.bits == 32 + run: | + sudo dpkg --add-architecture i386 + sudo apt update + sudo apt install -y gcc-multilib libssl-dev:i386 pkg-config:i386 + - uses: dtolnay/rust-toolchain@1.89.0 + with: + targets: ${{ matrix.bits == 32 && 'i686-unknown-linux-gnu' || '' }} - uses: Swatinem/rust-cache@v2 - - run: cargo build --workspace - - run: cargo test --workspace --no-fail-fast + with: + key: ${{ matrix.bits }} + - run: cargo test --workspace --no-run ${{ matrix.bits == 32 && '--target i686-unknown-linux-gnu' || '' }} + - run: cargo test --workspace --no-fail-fast ${{ matrix.bits == 32 && '--target i686-unknown-linux-gnu' || '' }} + - name: Upload rendered test output + if: failure() + uses: actions/upload-artifact@v4 + with: + name: tests-rendered-${{ matrix.os }}-${{ matrix.bits }} + path: tests/store/render/** + retention-days: 3 + - name: Update test artifacts + if: failure() + run: | + cargo test --workspace --test tests ${{ matrix.bits == 32 && '--target i686-unknown-linux-gnu' || '' }} -- --update + echo 'updated_artifacts=1' >> "$GITHUB_ENV" + - name: Upload updated reference output (for use if the test changes are desired) + if: failure() && env.updated_artifacts + uses: actions/upload-artifact@v4 + with: + name: tests-updated-${{ matrix.os }}-${{ matrix.bits }} + path: tests/ref/** + retention-days: 3 checks: name: Check clippy, formatting, and documentation runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: dtolnay/rust-toolchain@stable + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@1.89.0 + with: + components: clippy, rustfmt - uses: Swatinem/rust-cache@v2 - - run: cargo clippy --workspace --all-targets + - run: cargo clippy --workspace --all-targets --all-features + - run: cargo clippy --workspace --all-targets --no-default-features - run: cargo fmt --check --all - run: cargo doc --workspace --no-deps + - run: git diff --exit-code min-version: - name: Check mininum Rust version + name: Check minimum Rust version runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: dtolnay/rust-toolchain@1.70.0 + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@1.88.0 - uses: Swatinem/rust-cache@v2 - run: cargo check --workspace + + fuzz: + name: Check fuzzers + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@master + with: + toolchain: nightly-2025-05-10 + - uses: Swatinem/rust-cache@v2 + - run: cargo install --locked cargo-fuzz@0.12.0 + - run: cd tests/fuzz && cargo fuzz build --dev + + miri: + name: Check unsafe code + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@master + with: + components: miri + toolchain: nightly-2025-05-10 + - uses: Swatinem/rust-cache@v2 + - run: cargo miri test -p typst-library test_miri diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 10b1da4eaedb..4b85258e771d 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -2,50 +2,127 @@ name: Build and Publish Docker Image on: release: - types: [created] + types: [published] workflow_dispatch: env: REGISTRY: ghcr.io - IMAGE_NAME: ${{ github.repository }} - PLATFORMS: linux/amd64,linux/arm64 jobs: - build-and-publish: + build: + name: Build Images runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + platform: + - linux/amd64 + - linux/arm64 permissions: contents: read packages: write steps: + - name: Prepare + run: | + platform=${{ matrix.platform }} + echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV + echo "IMAGE_NAME=${REGISTRY}/${GITHUB_REPOSITORY@L}" >> $GITHUB_ENV + - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 + + - name: Get current date + run: echo "TYPST_BUILD_DATE=\"$(date -u +'%Y-%m-%dT%H:%M:%SZ')\" >> $GITHUB_ENV" - name: Setup Docker buildx - uses: docker/setup-buildx-action@v2.5.0 + uses: docker/setup-buildx-action@v3.7.1 with: - platforms: ${{ env.PLATFORMS }} + platforms: ${{ matrix.platform }} + + - name: Extract Docker metadata + id: meta + uses: docker/metadata-action@v5.5.1 + with: + images: ${{ env.IMAGE_NAME }} - name: Log into registry ${{ env.REGISTRY }} - uses: docker/login-action@v2.1.0 + uses: docker/login-action@v3.3.0 with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Extract Docker metadata - id: meta - uses: docker/metadata-action@v4.3.0 + - name: Build Docker image + id: build + uses: docker/build-push-action@v6.9.0 with: - images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} - - - name: Build and push Docker image - id: build-and-push - uses: docker/build-push-action@v4.0.0 - with: - push: true - tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - platforms: ${{ env.PLATFORMS }} + platforms: ${{ matrix.platform }} + outputs: type=image,name=${{ env.IMAGE_NAME }},push-by-digest=true,name-canonical=true,push=true cache-from: type=gha cache-to: type=gha,mode=max + build-args: | + REVISION=${{ github.sha }} + CREATED=${{ env.TYPST_BUILD_DATE }} + + - name: Export digest + run: | + mkdir -p /tmp/digests + digest="${{ steps.build.outputs.digest }}" + touch "/tmp/digests/${digest#sha256:}" + + - name: Upload digest + uses: actions/upload-artifact@v4 + with: + name: digests-${{ env.PLATFORM_PAIR }} + path: /tmp/digests/* + if-no-files-found: error + retention-days: 1 + + merge: + name: Merge and Publish + runs-on: ubuntu-latest + needs: + - build + + permissions: + contents: read + packages: write + + steps: + - name: Prepare + run: | + echo "IMAGE_NAME=${REGISTRY}/${GITHUB_REPOSITORY@L}" >> $GITHUB_ENV + + - name: Download digests + uses: actions/download-artifact@v4 + with: + path: /tmp/digests + pattern: digests-* + merge-multiple: true + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Docker meta + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.IMAGE_NAME }} + + - name: Log into registry ${{ env.REGISTRY }} + uses: docker/login-action@v3.0.0 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Create manifest list and push + working-directory: /tmp/digests + run: | + docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \ + $(printf '${{ env.IMAGE_NAME }}@sha256:%s ' *) + - name: Inspect image + run: | + docker buildx imagetools inspect ${{ env.IMAGE_NAME }}:${{ steps.meta.outputs.version }} diff --git a/.github/workflows/forum.yml b/.github/workflows/forum.yml new file mode 100644 index 000000000000..e2e8d1acaa61 --- /dev/null +++ b/.github/workflows/forum.yml @@ -0,0 +1,81 @@ +name: Move to Typst Forum +on: + issues: + types: + - labeled +jobs: + add-comment: + if: github.event.label.name == 'to-forum' + runs-on: ubuntu-latest + permissions: + issues: write + steps: + - name: Call Discourse API to create forum post + env: + ISSUE_BODY: ${{ github.event.issue.body }} + ISSUE_TITLE: ${{ github.event.issue.title }} + ISSUE_NUMBER: ${{ github.event.issue.number }} + ISSUE_URL: ${{ github.event.issue.html_url }} + ISSUE_USER_LOGIN: ${{ github.event.issue.user.login }} + REPOSITORY_OWNER: ${{ github.repository_owner }} + run: | + read -d '' RAW << END_OF_BODY + This topic was moved from GitHub issue ${ISSUE_NUMBER}. Please continue the conversation here. + + Here is the original issue: + [quote="${ISSUE_USER_LOGIN}"] + ${ISSUE_BODY} + [/quote] + + Browse the previous discussion at ${ISSUE_URL} + END_OF_BODY + + TITLE_JSON=$(jq -n --arg title "[#${ISSUE_NUMBER}] ${ISSUE_TITLE}" '$title') + RAW_JSON=$(jq -n --arg raw "$RAW" '$raw') + EXTERNAL_ID_JSON=$(jq -n --arg external_id "gh-${REPOSITORY_OWNER}-typst-${ISSUE_NUMBER}" '$external_id') + + RESPONSE=$(curl -X POST "https://forum.typst.app/posts.json" \ + --fail-with-body \ + -H "Api-Key: ${{ secrets.DISCOURSE_TOKEN }}" \ + -H "Content-Type: application/json" \ + -d "{ + \"title\": $TITLE_JSON, + \"category\": 4, + \"external_id\": $EXTERNAL_ID_JSON, + \"raw\": $RAW_JSON + }") + + # Check if response contains errors + if [ $(jq -n --argjson response "$RESPONSE" '$response.errors | length') -gt 0 ]; then + # Join the errors with commas + ERRORS=$(jq -n --argjson response "$RESPONSE" '$response.errors | join(", ")') + echo "DISCOURSE_ERROR=$ERRORS" >> $GITHUB_ENV + exit 1 + fi + + # Check if the response returned a non-200 status code + if [ $? -ne 0 ]; then + echo "DISCOURSE_ERROR=Failed to call the Discourse API" >> $GITHUB_ENV + exit 1 + fi + + THREAD_ID="$(jq -n --argjson response "$RESPONSE" '$response.topic_id')" + if [ "$THREAD_ID" = 'null' ]; then + echo "DISCOURSE_ERROR=Failed to retrieve new thread ID" >> $GITHUB_ENV + exit 1 + fi + + echo "THREAD_ID=$THREAD_ID" >> $GITHUB_ENV + - name: Add a comment if the workflow failed + if: failure() + run: | + gh issue comment ${{ github.event.issue.number }} --body "Failed to move this issue to the Typst Forum. This is the error that the API call returned: $DISCOURSE_ERROR" + - name: Add comment and close as not planned + run: | + gh issue close "$NUMBER" --reason "not planned" --comment "$BODY" + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_REPO: ${{ github.repository }} + NUMBER: ${{ github.event.issue.number }} + BODY: > + We moved this issue to the Typst Forum. Please continue the discussion there: https://forum.typst.app/t/${{ env.THREAD_ID }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1e7156e4ae6b..666d02868842 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,8 +3,9 @@ name: Build Release Binaries on: + workflow_dispatch: release: - types: [created] + types: [published] jobs: build-release: @@ -25,6 +26,9 @@ jobs: - target: armv7-unknown-linux-musleabi os: ubuntu-latest cross: true + - target: riscv64gc-unknown-linux-gnu + os: ubuntu-latest + cross: true - target: x86_64-apple-darwin os: macos-latest cross: false @@ -34,18 +38,21 @@ jobs: - target: x86_64-pc-windows-msvc os: windows-latest cross: false + - target: aarch64-pc-windows-msvc + os: windows-latest + cross: false steps: - - uses: actions/checkout@v3 - - uses: dtolnay/rust-toolchain@stable + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@1.89.0 with: target: ${{ matrix.target }} - name: Run Cross - if: ${{ matrix.cross}} + if: ${{ matrix.cross }} run: | - cargo install cross --git https://github.com/cross-rs/cross.git - cross build -p typst-cli --release --target ${{ matrix.target }} --features self-update + cargo install cross --git https://github.com/cross-rs/cross.git --locked --rev 085092ca + cross build -p typst-cli --release --target ${{ matrix.target }} --features self-update,vendor-openssl - name: Run Cargo if: ${{ !matrix.cross }} @@ -65,7 +72,15 @@ jobs: tar cJf $directory.tar.xz $directory fi - - uses: ncipollo/release-action@v1.12.0 + - uses: actions/upload-artifact@v4 + if: github.event_name == 'workflow_dispatch' + with: + name: typst-${{ matrix.target }} + path: "typst-${{ matrix.target }}.*" + retention-days: 3 + + - uses: ncipollo/release-action@v1.14.0 + if: github.event_name == 'release' with: artifacts: "typst-${{ matrix.target }}.*" allowUpdates: true diff --git a/.gitignore b/.gitignore index 9a368e5e00e0..a1915f4a3dbd 100644 --- a/.gitignore +++ b/.gitignore @@ -6,10 +6,12 @@ desktop.ini .DS_Store # Tests and benchmarks -tests/png -tests/pdf -tests/svg -tests/target +tests/store +tests/suite/**/*.pdf +tests/fuzz/target +tests/fuzz/corpus +tests/fuzz/artifacts +tests/fuzz/coverage tarpaulin-report.html # Rust @@ -18,6 +20,7 @@ tarpaulin-report.html # Node node_modules +tools/test-helper/dist package-lock.json # Nix diff --git a/CITATION.cff b/CITATION.cff new file mode 100644 index 000000000000..631f9d032d5b --- /dev/null +++ b/CITATION.cff @@ -0,0 +1,42 @@ +cff-version: 1.2.0 +title: Typst +message: >- + If you use this software, please cite it using the + metadata from this file. +type: software +authors: + - given-names: Laurenz + family-names: Mädje + email: laurenz.maedje@typst.app + - given-names: Martin + family-names: Haug + email: martin.haug@typst.app + - name: The Typst Project Developers +references: + - title: A Programmable Markup Language for Typesetting + authors: + - family-names: Mädje + given-names: Laurenz + year: 2022 + type: thesis + thesis-type: Master's thesis + url: https://laurmaedje.github.io/programmable-markup-language-for-typesetting.pdf + institution: + name: Technische Universität Berlin + - title: Fast typesetting with incremental compilation + authors: + - family-names: Haug + given-names: Martin + year: 2022 + type: thesis + thesis-type: Master's thesis + doi: 10.13140/RG.2.2.15606.88642 + url: https://doi.org/10.13140/RG.2.2.15606.88642 + institution: + name: Technische Universität Berlin +repository-code: 'https://github.com/typst/typst' +url: 'https://typst.app/' +keywords: + - typesetting + - markup language +license: Apache-2.0 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index dfa836d18c0f..33c5343c5ccb 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -37,8 +37,8 @@ Below are some signs of a good PR: - Adds/changes as little code and as few interfaces as possible. Should changes to larger-scale abstractions be necessary, these should be discussed throughout the implementation process. -- Adds tests if appropriate (with reference images for visual tests). See the - [testing] readme for more details. +- Adds tests if appropriate (with reference output for visual/HTML tests). See + the [testing] readme for more details. - Contains documentation comments on all new Rust types. - Comes with brief documentation for all new Typst definitions (elements/functions), ideally with a concise example that fits into ~5-10 diff --git a/Cargo.lock b/Cargo.lock index 62345eaa6f89..3108ad02853d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,53 +1,18 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] -name = "adler" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" - -[[package]] -name = "aes" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac1f845298e95f983ff1944b728ae08b8cebab80d684f0a832ed0fc74dfa27e2" -dependencies = [ - "cfg-if", - "cipher", - "cpufeatures", -] - -[[package]] -name = "ahash" -version = "0.7.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a824f2aa7e75a0c98c5a504fceb80649e9c35265d44525b5f94de4771a395cd" -dependencies = [ - "getrandom", - "once_cell", - "version_check", -] - -[[package]] -name = "ahash" -version = "0.8.6" +name = "adler2" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91429305e9f0a25f6205c5b8e0d2db09e0708a7a6df0f42212bb56c32c8ac97a" -dependencies = [ - "cfg-if", - "getrandom", - "once_cell", - "version_check", - "zerocopy", -] +checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" [[package]] name = "aho-corasick" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" dependencies = [ "memchr", ] @@ -69,50 +34,52 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.4" +version = "0.6.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ab91ebe16eb252986481c5b62f6098f3b698a45e34b5b98200cf20dd2484a44" +checksum = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b" dependencies = [ "anstyle", "anstyle-parse", "anstyle-query", "anstyle-wincon", "colorchoice", + "is_terminal_polyfill", "utf8parse", ] [[package]] name = "anstyle" -version = "1.0.4" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87" +checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9" [[package]] name = "anstyle-parse" -version = "0.2.2" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "317b9a89c1868f5ea6ff1d9539a69f45dffc21ce321ac1fd1160dfa48c8e2140" +checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.0.0" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b" +checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c" dependencies = [ - "windows-sys", + "windows-sys 0.59.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.1" +version = "3.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0699d10d2f4d628a98ee7b57b289abbc98ff3bad977cb3152709d4bf2330628" +checksum = "ca3534e77181a9cc07539ad51f2141fe32f6c3ffd4df76db8ad92346b003ae4e" dependencies = [ "anstyle", - "windows-sys", + "once_cell", + "windows-sys 0.59.0", ] [[package]] @@ -124,23 +91,38 @@ dependencies = [ "num-traits", ] +[[package]] +name = "arbitrary" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dde20b3d026af13f561bdd0f15edf01fc734f0dafcedbaf42bba506a9517f223" +dependencies = [ + "derive_arbitrary", +] + [[package]] name = "arrayref" -version = "0.3.7" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" +checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" [[package]] name = "arrayvec" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] -name = "autocfg" +name = "ascii" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +checksum = "d92bec98840b8f03a5ff5413de5293bfcd8bf96467cf5452609f939ec6f5de16" + +[[package]] +name = "autocfg" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "az" @@ -150,25 +132,19 @@ checksum = "7b7e4c2464d97fe331d41de9d5db0def0a96f4d823b8b32a2efd503578988973" [[package]] name = "base64" -version = "0.21.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" - -[[package]] -name = "base64ct" -version = "1.6.0" +version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] name = "biblatex" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e41df82f0d1c4919d946bb0c7c3d179b6071246243d308a1bdee6cfecee3bc7" +version = "0.10.0" +source = "git+https://github.com/typst/biblatex.git#d6a0dc3b84412b6ac2e66516f4d434a971c540df" dependencies = [ "numerals", "paste", "strum", + "unic-langid", "unicode-normalization", "unscanny", ] @@ -205,9 +181,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.1" +version = "2.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" +checksum = "1b8e56985ec62d17e9c1001dc89c88ecd7dc08e47eba5ec7c29c7b5eeecde967" dependencies = [ "serde", ] @@ -225,48 +201,37 @@ dependencies = [ ] [[package]] -name = "block-buffer" -version = "0.10.4" +name = "bumpalo" +version = "3.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" -dependencies = [ - "generic-array", -] +checksum = "1628fb46dfa0b37568d12e5edd512553eccf6a22a78e8bde00bb4aed84d5bdbf" [[package]] -name = "bumpalo" -version = "3.14.0" +name = "by_address" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" +checksum = "64fa3c856b712db6612c019f14756e64e4bcea13337a6b33b696333a9eaa2d06" [[package]] -name = "bytecheck" -version = "0.6.11" +name = "bytemuck" +version = "1.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b6372023ac861f6e6dc89c8344a8f398fb42aaba2b5dbc649ca0c0e9dbcb627" +checksum = "5c76a5792e44e4abe34d3abf15636779261d45a7450612059293d1d2cfc63422" dependencies = [ - "bytecheck_derive", - "ptr_meta", - "simdutf8", + "bytemuck_derive", ] [[package]] -name = "bytecheck_derive" -version = "0.6.11" +name = "bytemuck_derive" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7ec4c6f261935ad534c0c22dbef2201b45918860eb1c574b972bd213a76af61" +checksum = "3fa76293b4f7bb636ab88fd78228235b5248b4d05cc589aed610f954af5d7c7a" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn", ] -[[package]] -name = "bytemuck" -version = "1.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "374d28ec25809ee0e23827c2ab573d729e293f281dfe393500e7ad618baa61c6" - [[package]] name = "byteorder" version = "1.5.0" @@ -274,34 +239,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] -name = "bzip2" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdb116a6ef3f6c3698828873ad02c3014b3c85cadb88496095628e3ef1e347f8" -dependencies = [ - "bzip2-sys", - "libc", -] - -[[package]] -name = "bzip2-sys" -version = "0.1.11+1.0.8" +name = "byteorder-lite" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc" -dependencies = [ - "cc", - "libc", - "pkg-config", -] +checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495" [[package]] name = "cc" -version = "1.0.83" +version = "1.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +checksum = "e4730490333d58093109dc02c23174c3f4d490998c3fed3cc8e82d57afedb9cf" dependencies = [ "jobserver", "libc", + "shlex", ] [[package]] @@ -312,9 +263,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chinese-number" -version = "0.7.3" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9cec9efb10b00914876c7e7b1fdaec572b888443b4046cd11ba91eb8c5a1ccb" +checksum = "49fccaef6346f6d6a741908d3b79fe97c2debe2fbb5eb3a7d00ff5981b52bb6c" dependencies = [ "chinese-variant", "enum-ordinalize", @@ -324,15 +275,15 @@ dependencies = [ [[package]] name = "chinese-variant" -version = "1.0.9" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aeea139b89efab957972956e5d3e4efb66a6c261f726abf6911040cc8ef700f7" +checksum = "7588475145507237ded760e52bf2f1085495245502033756d28ea72ade0e498b" [[package]] name = "chrono" -version = "0.4.31" +version = "0.4.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" +checksum = "7e36cc9d416881d2e24f9a963be5fb1cd90966419ac844274161d10488b3e825" dependencies = [ "android-tzdata", "iana-time-zone", @@ -340,11 +291,17 @@ dependencies = [ "windows-targets", ] +[[package]] +name = "chunked_transfer" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e4de3bc4ea267985becf712dc6d9eed8b04c953b3fcfb339ebc87acd9804901" + [[package]] name = "ciborium" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "effd91f6c78e5a4ace8a5d3c0b6bfaec9e2baaef55f3efc00e45fb2e477ee926" +checksum = "42e69ffd6f0917f5c029256a24d0161db17cea3997d185db0d35926308770f0e" dependencies = [ "ciborium-io", "ciborium-ll", @@ -353,45 +310,34 @@ dependencies = [ [[package]] name = "ciborium-io" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdf919175532b369853f5d5e20b26b43112613fd6fe7aee757e35f7a44642656" +checksum = "05afea1e0a06c9be33d539b876f1ce3692f4afea2cb41f740e7743225ed1c757" [[package]] name = "ciborium-ll" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "defaa24ecc093c77630e6c15e17c51f5e187bf35ee514f4e2d67baaa96dae22b" +checksum = "57663b653d948a338bfb3eeba9bb2fd5fcfaecb9e199e87e1eda4d9e8b240fd9" dependencies = [ "ciborium-io", "half", ] -[[package]] -name = "cipher" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" -dependencies = [ - "crypto-common", - "inout", -] - [[package]] name = "citationberg" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c857faf24e89710f105b623c174508070a9e11e056a749f251ca4c56f59ad88" +version = "0.5.0" +source = "git+https://github.com/typst/citationberg.git?rev=35cc83fb325d22c9b5bd5c7fc1d8e79897308076#35cc83fb325d22c9b5bd5c7fc1d8e79897308076" dependencies = [ - "quick-xml 0.28.2", + "quick-xml 0.38.3", "serde", ] [[package]] name = "clap" -version = "4.4.7" +version = "4.5.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac495e00dcec98c83465d5ad66c5c4fabd652fd6686e7c6269b117e729a6f17b" +checksum = "3e77c3243bd94243c03672cb5154667347c457ca271254724f9f393aee1c05ff" dependencies = [ "clap_builder", "clap_derive", @@ -399,48 +345,49 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.4.7" +version = "4.5.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c77ed9a32a62e6ca27175d00d29d05ca32e396ea1eb5fb01d8256b669cec7663" +checksum = "1b26884eb4b57140e4d2d93652abfa49498b938b3c9179f9fc487b0acc3edad7" dependencies = [ "anstream", "anstyle", "clap_lex", "strsim", + "terminal_size", ] [[package]] name = "clap_complete" -version = "4.4.4" +version = "4.5.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bffe91f06a11b4b9420f62103854e90867812cd5d01557f853c5ee8e791b12ae" +checksum = "375f9d8255adeeedd51053574fd8d4ba875ea5fa558e86617b07f09f1680c8b6" dependencies = [ "clap", ] [[package]] name = "clap_derive" -version = "4.4.7" +version = "4.5.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf9804afaaf59a91e75b022a30fb7229a7901f60c755489cc61c9b423b836442" +checksum = "bf4ced95c6f4a675af3da73304b9ac4ed991640c36374e4b46795c49e17cf1ed" dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.38", + "syn", ] [[package]] name = "clap_lex" -version = "0.6.0" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1" +checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6" [[package]] name = "clap_mangen" -version = "0.2.15" +version = "0.2.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3be86020147691e1d2ef58f75346a3d4d94807bfc473e377d52f09f0f7d77f7" +checksum = "724842fa9b144f9b89b3f3d371a89f3455eea660361d13a554f68f8ae5d6c13a" dependencies = [ "clap", "roff", @@ -462,6 +409,32 @@ dependencies = [ "unicode-width", ] +[[package]] +name = "codex" +version = "0.1.1" +source = "git+https://github.com/typst/codex?rev=775d828#775d82873c3f74ce95ec2621f8541de1b48778a7" + +[[package]] +name = "color-print" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3aa954171903797d5623e047d9ab69d91b493657917bdfb8c2c80ecaf9cdb6f4" +dependencies = [ + "color-print-proc-macro", +] + +[[package]] +name = "color-print-proc-macro" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "692186b5ebe54007e45a59aea47ece9eb4108e141326c304cdc91699a7118a22" +dependencies = [ + "nom", + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "color_quant" version = "1.1.0" @@ -470,128 +443,113 @@ checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" [[package]] name = "colorchoice" -version = "1.0.0" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" +checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" [[package]] name = "comemo" -version = "0.3.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28a097f142aeb5b03af73595536cd55f5d649fca4d656379aac86b3af133cf92" +checksum = "649d7b2d867b569729c03c0f6968db10bc95921182a1f2b2012b1b549492f39d" dependencies = [ "comemo-macros", + "parking_lot", + "rustc-hash", "siphasher", + "slab", ] [[package]] name = "comemo-macros" -version = "0.3.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168cc09917f6a014a4cf6ed166d1b541a20a768c60f9cc348f25203ee8312940" +checksum = "51c87fc7e85487493ddedae1a3a34b897c77ad8825375b79265a8a162c28d535" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn", ] [[package]] -name = "constant_time_eq" -version = "0.1.5" +name = "core-foundation" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" +dependencies = [ + "core-foundation-sys", + "libc", +] [[package]] name = "core-foundation-sys" -version = "0.8.4" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "core_maths" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3b02505ccb8c50b0aa21ace0fc08c3e53adebd4e58caa18a36152803c7709a3" +checksum = "77745e017f5edba1a9c1d854f6f3a52dac8a12dd5af5d2f54aecf61e43d80d30" dependencies = [ "libm", ] -[[package]] -name = "cpufeatures" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce420fe07aecd3e67c5f910618fe65e94158f6dcc0adf44e00d69ce2bdfe0fd0" -dependencies = [ - "libc", -] - [[package]] name = "crc32fast" -version = "1.3.2" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" +checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" dependencies = [ "cfg-if", ] [[package]] name = "crossbeam-channel" -version = "0.5.8" +version = "0.5.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a33c2bf77f2df06183c3aa30d1e96c0695a313d4f9c453cc3762a6db39f99200" +checksum = "82b8f8f868b36967f9606790d1903570de9ceaf870a7bf9fbbd3016d636a2cb2" dependencies = [ - "cfg-if", "crossbeam-utils", ] [[package]] name = "crossbeam-deque" -version = "0.8.3" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef" +checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51" dependencies = [ - "cfg-if", "crossbeam-epoch", "crossbeam-utils", ] [[package]] name = "crossbeam-epoch" -version = "0.9.15" +version = "0.9.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae211234986c545741a7dc064309f67ee1e5ad243d0e48335adc0484d960bcc7" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" dependencies = [ - "autocfg", - "cfg-if", "crossbeam-utils", - "memoffset", - "scopeguard", ] [[package]] name = "crossbeam-utils" -version = "0.8.16" +version = "0.8.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" -dependencies = [ - "cfg-if", -] +checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" [[package]] -name = "crypto-common" -version = "0.1.6" +name = "crunchy" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" -dependencies = [ - "generic-array", - "typenum", -] +checksum = "43da5946c66ffcc7745f48db692ffbb10a83bfe0afd96235c5c2a4fb23994929" [[package]] name = "csv" -version = "1.3.0" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac574ff4d437a7b5ad237ef331c17ccca63c46479e5b5453eb8e10bb99a759fe" +checksum = "acdc4883a9c96732e4733212c01447ebd805833b7275a73ca3ee080fd77afdaf" dependencies = [ "csv-core", "itoa", @@ -608,97 +566,84 @@ dependencies = [ "memchr", ] -[[package]] -name = "dashmap" -version = "5.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" -dependencies = [ - "cfg-if", - "hashbrown 0.14.2", - "lock_api", - "once_cell", - "parking_lot_core", -] - [[package]] name = "data-url" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41b319d1b62ffbd002e057f36bebd1f42b9f97927c9577461d855f3513c4289f" +checksum = "5c297a1c74b71ae29df00c3e22dd9534821d60eb9af5a0192823fa2acea70c2a" [[package]] name = "deranged" -version = "0.3.9" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f32d04922c60427da6f9fef14d042d9edddef64cb9d4ce0d64d0685fbeb1fd3" +checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" dependencies = [ "powerfmt", ] [[package]] -name = "digest" -version = "0.10.7" +name = "derive_arbitrary" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +checksum = "30542c1ad912e0e3d22a1935c290e12e8a29d704a420177a31faad4a601a0800" dependencies = [ - "block-buffer", - "crypto-common", - "subtle", + "proc-macro2", + "quote", + "syn", ] [[package]] name = "dirs" -version = "5.0.1" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" +checksum = "c3e8aa94d75141228480295a7d0e7feb620b1a5ad9f12bc40be62411e38cce4e" dependencies = [ "dirs-sys", ] [[package]] name = "dirs-sys" -version = "0.4.1" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" +checksum = "e01a3366d27ee9890022452ee61b2b63a67e6f13f58900b651ff5665f0bb1fab" dependencies = [ "libc", "option-ext", "redox_users", - "windows-sys", + "windows-sys 0.59.0", ] [[package]] name = "displaydoc" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn", ] [[package]] name = "downcast-rs" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" +checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2" [[package]] name = "ecow" -version = "0.2.0" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6ea5e3f9cda726431da9d1a8d5a29785d544b31e98e1ca7a210906244002e02" +checksum = "e42fc0a93992b20c58b99e59d61eaf1635a25bfbe49e4275c34ba0aee98119ba" dependencies = [ "serde", ] [[package]] name = "either" -version = "1.9.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" [[package]] name = "embedded-io" @@ -706,26 +651,30 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef1a6892d9eef45c8fa6b9e0086428a2cca8491aca8f787c534a3d6d0bcb3ced" +[[package]] +name = "embedded-io" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edd0f118536f44f5ccd48bcb8b111bdc3de888b58c74639dfb034a357d0f206d" + [[package]] name = "enum-ordinalize" -version = "3.1.15" +version = "4.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bf1fa3f06bbff1ea5b1a9c7b14aa992a39657db60a2759457328d7e058f49ee" +checksum = "fea0dcfa4e54eeb516fe454635a95753ddd39acda650ce703031c6973e315dd5" dependencies = [ - "num-bigint", - "num-traits", - "proc-macro2", - "quote", - "syn 2.0.38", + "enum-ordinalize-derive", ] [[package]] -name = "env_logger" -version = "0.10.0" +name = "enum-ordinalize-derive" +version = "4.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85cdab6a89accf66733ad5a1693a4dcced6aeff64602b634530dd73c1f3ee9f0" +checksum = "0d28318a75d4aead5c4db25382e8ef717932d0346600cacae6357eb5941bc5ff" dependencies = [ - "log", + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -746,12 +695,12 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.5" +version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3e13f66a2f95e32a39eaa81f6b95d42878ca0e1db0c7543723dfe12557e860" +checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d" dependencies = [ "libc", - "windows-sys", + "windows-sys 0.59.0", ] [[package]] @@ -772,47 +721,39 @@ checksum = "dd2e7510819d6fbf51a5545c8f922716ecfb14df168a3242f7d33e0239efe6a1" [[package]] name = "fastrand" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" -dependencies = [ - "instant", -] - -[[package]] -name = "fastrand" -version = "2.0.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" +checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" [[package]] name = "fdeflate" -version = "0.3.0" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d329bdeac514ee06249dabc27877490f17f5d371ec693360768b838e19f3ae10" +checksum = "1e6853b52649d4ac5c0bd02320cddc5ba956bdb407c4b75a2c6b75bf51500f8c" dependencies = [ "simd-adler32", ] [[package]] name = "filetime" -version = "0.2.22" +version = "0.2.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4029edd3e734da6fe05b6cd7bd2960760a616bd2ddd0d59a0124746d6272af0" +checksum = "35c0522e981e68cbfa8c3f978441a5f34b30b96e146b33cd3359176b50fe8586" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.3.5", - "windows-sys", + "libredox", + "windows-sys 0.59.0", ] [[package]] name = "flate2" -version = "1.0.28" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" +checksum = "4a3d7db9596fecd151c5f638c0ee5d5bd487b6e0ea232e5dc96d5250f6f94b1d" dependencies = [ "crc32fast", + "libz-rs-sys", "miniz_oxide", ] @@ -822,26 +763,50 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "98de4bbd547a563b716d8dfa9aad1cb19bfab00f4fa09a6a4ed21dbcf44ce9c4" +[[package]] +name = "float-cmp" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b09cf3155332e944990140d967ff5eceb70df778b34f77d8075db46e4704e6d8" +dependencies = [ + "num-traits", +] + [[package]] name = "fnv" version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +[[package]] +name = "foldhash" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0d2fde1f7b3d48b8395d5f2de76c18a528bd6a9cdde438df747bfcba3e05d6f" + +[[package]] +name = "font-types" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02a596f5713680923a2080d86de50fe472fb290693cf0f701187a1c8b36996b7" +dependencies = [ + "bytemuck", +] + [[package]] name = "fontconfig-parser" -version = "0.5.3" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "674e258f4b5d2dcd63888c01c68413c51f565e8af99d2f7701c7b81d79ef41c4" +checksum = "c1fcfcd44ca6e90c921fee9fa665d530b21ef1327a4c1a6c5250ea44b776ada7" dependencies = [ "roxmltree", ] [[package]] name = "fontdb" -version = "0.15.0" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "020e203f177c0fb250fb19455a252e838d2bbbce1f80f25ecc42402aafa8cd38" +checksum = "457e789b3d1202543297a350643cf459f836cade38934e7a4cf6a39e7cde2905" dependencies = [ "fontconfig-parser", "log", @@ -851,15 +816,36 @@ dependencies = [ "ttf-parser", ] +[[package]] +name = "foreign-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +dependencies = [ + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-shared" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" + [[package]] name = "form_urlencoded" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" dependencies = [ "percent-encoding", ] +[[package]] +name = "fs_extra" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" + [[package]] name = "fsevent-sys" version = "4.1.0" @@ -876,82 +862,92 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" [[package]] -name = "generic-array" -version = "0.14.7" +name = "getopts" +version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +checksum = "14dbbfd5c71d70241ecf9e6f13737f7b5ce823821063188d7e46c41d371eebd5" dependencies = [ - "typenum", - "version_check", + "unicode-width", ] [[package]] -name = "getopts" -version = "0.2.21" +name = "getrandom" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14dbbfd5c71d70241ecf9e6f13737f7b5ce823821063188d7e46c41d371eebd5" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ - "unicode-width", + "cfg-if", + "libc", + "wasi 0.11.0+wasi-snapshot-preview1", ] [[package]] name = "getrandom" -version = "0.2.10" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" +checksum = "43a49c392881ce6d5c3b8cb70f98717b7c07aabbdff06687b9030dbfbe2725f8" dependencies = [ "cfg-if", "libc", - "wasi", + "wasi 0.13.3+wasi-0.2.2", + "windows-targets", ] [[package]] name = "gif" -version = "0.12.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80792593675e051cf94a4b111980da2ba60d4a83e43e0048c5693baab3977045" +checksum = "3fb2d69b19215e18bb912fa30f7ce15846e301408695e44e0ef719f1da9e19f2" dependencies = [ "color_quant", "weezl", ] [[package]] -name = "half" -version = "1.8.2" +name = "glidesort" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7" +checksum = "f2e102e6eb644d3e0b186fc161e4460417880a0a0b87d235f2e5b8fb30f2e9e0" [[package]] -name = "hashbrown" -version = "0.12.3" +name = "half" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +checksum = "6dd08c532ae367adf81c312a4580bc67f1d0fe8bc9c460520283f4c0ff277888" dependencies = [ - "ahash 0.7.7", + "cfg-if", + "crunchy", ] [[package]] name = "hashbrown" -version = "0.14.2" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f93e7192158dbcda357bdec5fb5788eebf8bbac027f3f33e719d29135ae84156" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" [[package]] -name = "hayagriva" -version = "0.4.0" +name = "hashbrown" +version = "0.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5af3d464a6b5ae882f15fe1da4e696fd96b77fee78ded933e0ad81d1d87cbc5" +checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" +dependencies = [ + "foldhash", +] + +[[package]] +name = "hayagriva" +version = "0.8.1" +source = "git+https://github.com/typst/hayagriva?rev=03ae2acf#03ae2acf168e65604e74f0361e74ba4ef7689f16" dependencies = [ "biblatex", "ciborium", "citationberg", - "indexmap 2.0.2", + "indexmap 2.7.1", "numerals", "paste", - "rkyv", "serde", - "serde_yaml 0.9.27", - "thiserror", + "serde_yaml 0.9.34+deprecated", + "thiserror 1.0.69", "unic-langid", "unicode-segmentation", "unscanny", @@ -959,45 +955,96 @@ dependencies = [ ] [[package]] -name = "heck" -version = "0.4.1" +name = "hayro" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" +checksum = "a063475c55469656ada01db8d502ccafe3351f463854019aeb686c105246307b" +dependencies = [ + "bytemuck", + "hayro-interpret", + "image", + "kurbo", +] [[package]] -name = "hermit-abi" -version = "0.3.3" +name = "hayro-font" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" +checksum = "961d753ae00c7aaf512ed386dd4c723a18cf1c0cb2e0772e87bbe8c18ed1a6df" +dependencies = [ + "log", + "phf", +] [[package]] -name = "hmac" -version = "0.12.1" +name = "hayro-interpret" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +checksum = "b35e0d2bc380332441b45e47d52b10d05c5df74a7b1e6c8ca95254aef2be1b38" dependencies = [ - "digest", + "bitflags 2.9.1", + "hayro-font", + "hayro-syntax", + "kurbo", + "log", + "phf", + "qcms", + "rustc-hash", + "siphasher", + "skrifa", + "smallvec", + "yoke 0.8.0", ] [[package]] -name = "hypher" -version = "0.1.4" +name = "hayro-syntax" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94bf16dd62ea2bec617a6f8a3e1ba03107311783069a647787ac689d1f35321e" +checksum = "c1d3e06bd0f8a1861e353ed4d516751fac3c1c0a202cbe9f3ed325be9194e1cf" +dependencies = [ + "flate2", + "kurbo", + "log", + "rustc-hash", + "smallvec", + "zune-jpeg", +] [[package]] -name = "iai" -version = "0.1.1" -source = "git+https://github.com/typst/iai#3f0f92736408ebce6545808b98e0cb2aea89b7dd" +name = "hayro-write" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d55f2b3e748993b8d87ff2e72d34f74b4c9a11d09d6c5f4eb54340f5d2aed275" dependencies = [ - "cfg-if", + "flate2", + "hayro-syntax", + "log", + "pdf-writer", ] +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "httpdate" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" + +[[package]] +name = "hypher" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b24ad5637230df201ab1034d593f1d09bf7f2a9274f2e8897638078579f4265" + [[package]] name = "iana-time-zone" -version = "0.1.58" +version = "0.1.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8326b86b6cff230b97d0d312a6c40a60726df3332e721f72a1b035f451663b20" +checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -1018,55 +1065,79 @@ dependencies = [ [[package]] name = "icu_collections" -version = "1.3.2" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3907b2246e8dd5a29ead8a965e7c0c8a90e9b928e614a4279257d45c5e553e91" +checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" dependencies = [ "displaydoc", "serde", - "yoke", + "yoke 0.7.5", "zerofrom", - "zerovec", + "zerovec 0.10.4", ] [[package]] name = "icu_locid" -version = "1.3.2" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f284eb342dc49d3e9d9f3b188489d76b5d22dfb1d1a5e0d1941811253bac625c" +checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" dependencies = [ "displaydoc", "litemap", - "tinystr", + "tinystr 0.7.6", "writeable", - "zerovec", + "zerovec 0.10.4", ] [[package]] name = "icu_locid_transform" -version = "1.3.2" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6551daf80882d8e68eee186cc19e132d8bde1b1f059a79b93384a5ca0e8fc5e7" +checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" dependencies = [ "displaydoc", "icu_locid", "icu_locid_transform_data", "icu_provider", - "tinystr", - "zerovec", + "tinystr 0.7.6", + "zerovec 0.10.4", ] [[package]] name = "icu_locid_transform_data" -version = "1.3.2" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" + +[[package]] +name = "icu_normalizer" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "utf16_iter", + "utf8_iter", + "write16", + "zerovec 0.10.4", +] + +[[package]] +name = "icu_normalizer_data" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a741eba5431f75eb2f1f9022d3cffabcadda6771e54fb4e77c8ba8653e4da44" +checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" [[package]] name = "icu_properties" -version = "1.3.2" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3477ae70f8ca8dc08ff7574b5398ed0a2f2e4e6b66bdff2558a92ed67e262be1" +checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" dependencies = [ "displaydoc", "icu_collections", @@ -1074,21 +1145,21 @@ dependencies = [ "icu_properties_data", "icu_provider", "serde", - "tinystr", - "zerovec", + "tinystr 0.7.6", + "zerovec 0.10.4", ] [[package]] name = "icu_properties_data" -version = "1.3.4" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98507b488098f45eb95ef495612a2012e4d8ad6095dda86cb2f1728aa2204a60" +checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" [[package]] name = "icu_provider" -version = "1.3.2" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68acdef80034b5e35d8524e9817479d389a4f9774f3f0cbe1bf3884d80fd5934" +checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" dependencies = [ "displaydoc", "icu_locid", @@ -1096,55 +1167,56 @@ dependencies = [ "postcard", "serde", "stable_deref_trait", - "tinystr", + "tinystr 0.7.6", "writeable", - "yoke", + "yoke 0.7.5", "zerofrom", - "zerovec", + "zerovec 0.10.4", ] [[package]] name = "icu_provider_adapters" -version = "1.3.2" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36b380ef2d3d93b015cd0563d7e0d005cc07f82a5503716dbc191798d0079e1d" +checksum = "d6324dfd08348a8e0374a447ebd334044d766b1839bb8d5ccf2482a99a77c0bc" dependencies = [ "icu_locid", "icu_locid_transform", "icu_provider", - "tinystr", - "zerovec", + "tinystr 0.7.6", + "zerovec 0.10.4", ] [[package]] name = "icu_provider_blob" -version = "1.3.2" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c31326d28c7f95a964a4f0ee86c24002da5f6db907e3bcb079949b4ff103b6a9" +checksum = "c24b98d1365f55d78186c205817631a4acf08d7a45bdf5dc9dcf9c5d54dccf51" dependencies = [ "icu_provider", "postcard", "serde", "writeable", - "zerovec", + "zerotrie", + "zerovec 0.10.4", ] [[package]] name = "icu_provider_macros" -version = "1.3.2" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2060258edfcfe32ca7058849bf0f146cb5c59aadbedf480333c0d0002f97bc99" +checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn", ] [[package]] name = "icu_segmenter" -version = "1.3.2" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcb3c1981ce2187a745f391a741cb14e77453325acb3b2e014b05da51c0a39f2" +checksum = "a717725612346ffc2d7b42c94b820db6908048f39434504cb130e8b46256b0de" dependencies = [ "core_maths", "displaydoc", @@ -1154,71 +1226,68 @@ dependencies = [ "icu_segmenter_data", "serde", "utf8_iter", - "zerovec", + "zerovec 0.10.4", ] [[package]] name = "icu_segmenter_data" -version = "1.3.2" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9703f6713044d1c0a1335a6d78ffece4c9380582416ace6feeb608e84d279fc7" +checksum = "f739ee737260d955e330bc83fdeaaf1631f7fb7ed218761d3c04bb13bb7d79df" [[package]] name = "idna" -version = "0.4.0" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" +checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" dependencies = [ - "unicode-bidi", - "unicode-normalization", + "idna_adapter", + "smallvec", + "utf8_iter", ] [[package]] -name = "if_chain" -version = "1.0.2" +name = "idna_adapter" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb56e1aa765b4b4f3aadfab769793b7087bb03a4ea4920644a6d238e2df5b9ed" +checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" +dependencies = [ + "icu_normalizer", + "icu_properties", +] [[package]] name = "image" -version = "0.24.7" +version = "0.25.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f3dfdbdd72063086ff443e297b61695500514b1e41095b6fb9a5ab48a70a711" +checksum = "db35664ce6b9810857a38a906215e75a9c879f0696556a39f59c62829710251a" dependencies = [ "bytemuck", - "byteorder", + "byteorder-lite", "color_quant", "gif", - "jpeg-decoder", - "num-rational", + "image-webp", "num-traits", "png", + "zune-core", + "zune-jpeg", ] [[package]] -name = "imagesize" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "029d73f573d8e8d63e6d5020011d3255b28c3ba85d6cf870a07184ed23de9284" - -[[package]] -name = "include_dir" -version = "0.7.3" +name = "image-webp" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18762faeff7122e89e0857b02f7ce6fcc0d101d5e9ad2ad7846cc01d61b7f19e" +checksum = "b77d01e822461baa8409e156015a1d91735549f0f2c17691bd2d996bef238f7f" dependencies = [ - "include_dir_macros", + "byteorder-lite", + "quick-error", ] [[package]] -name = "include_dir_macros" -version = "0.7.3" +name = "imagesize" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b139284b5cf57ecfa712bcc66950bb635b31aff41c188e8a4cfc758eca374a3f" -dependencies = [ - "proc-macro2", - "quote", -] +checksum = "edcd27d72f2f071c64249075f42e205ff93c9a4c5f6c6da53e79ed9f9832c285" [[package]] name = "indexmap" @@ -1232,52 +1301,29 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.0.2" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8adf3ddd720272c6ea8bf59463c04e0f93d0bbf7c5439b691bca2987e0270897" +checksum = "8c9c992b02b5b4c94ea26e32fe5bccb7aa7d9f390ab5c1221ff895bc7ea8b652" dependencies = [ "equivalent", - "hashbrown 0.14.2", + "hashbrown 0.15.2", "rayon", "serde", ] [[package]] -name = "indexmap-nostd" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e04e2fd2b8188ea827b32ef11de88377086d690286ab35747ef7f9bf3ccb590" - -[[package]] -name = "inferno" -version = "0.11.17" +name = "infer" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c50453ec3a6555fad17b1cd1a80d16af5bc7cb35094f64e429fd46549018c6a3" -dependencies = [ - "ahash 0.8.6", - "clap", - "crossbeam-channel", - "crossbeam-utils", - "dashmap", - "env_logger", - "indexmap 2.0.2", - "is-terminal", - "itoa", - "log", - "num-format", - "once_cell", - "quick-xml 0.26.0", - "rgb", - "str_stack", -] +checksum = "a588916bfdfd92e71cacef98a63d9b1f0d74d6599980d11894290e7ddefffcf7" [[package]] name = "inotify" -version = "0.9.6" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8069d3ec154eb856955c1c0fbffefbf5f3c40a104ec912d4797314c1801abff" +checksum = "f37dccff2791ab604f9babef0ba14fbe0be30bd368dc541e2b08d07c8aa908f3" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.9.1", "inotify-sys", "libc", ] @@ -1291,24 +1337,6 @@ dependencies = [ "libc", ] -[[package]] -name = "inout" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" -dependencies = [ - "generic-array", -] - -[[package]] -name = "instant" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" -dependencies = [ - "cfg-if", -] - [[package]] name = "is-docker" version = "0.2.0" @@ -1318,17 +1346,6 @@ dependencies = [ "once_cell", ] -[[package]] -name = "is-terminal" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" -dependencies = [ - "hermit-abi", - "rustix", - "windows-sys", -] - [[package]] name = "is-wsl" version = "0.4.0" @@ -1339,34 +1356,44 @@ dependencies = [ "once_cell", ] +[[package]] +name = "is_terminal_polyfill" +version = "1.70.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" + [[package]] name = "itoa" -version = "1.0.9" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" +checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674" [[package]] name = "jobserver" -version = "0.1.27" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c37f63953c4c63420ed5fd3d6d398c719489b9f872b9fa683262f8edd363c7d" +checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" dependencies = [ "libc", ] [[package]] -name = "jpeg-decoder" -version = "0.3.0" +name = "js-sys" +version = "0.3.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc0000e42512c92e31c2252315bda326620a4e034105e900c98ec492fa077b3e" +checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" +dependencies = [ + "once_cell", + "wasm-bindgen", +] [[package]] -name = "js-sys" -version = "0.3.64" +name = "kamadak-exif" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" +checksum = "1130d80c7374efad55a117d715a3af9368f0fa7a2c54573afc15a188cd984837" dependencies = [ - "wasm-bindgen", + "mutate_once", ] [[package]] @@ -1390,57 +1417,117 @@ dependencies = [ ] [[package]] -name = "kurbo" -version = "0.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd85a5776cd9500c2e2059c8c76c3b01528566b7fcbaf8098b55a33fc298849b" +name = "krilla" +version = "0.4.0" +source = "git+https://github.com/LaurenzV/krilla?rev=747be0d#747be0db9abc14e97b1036e0ced5a069080705b6" dependencies = [ - "arrayvec", + "base64", + "bumpalo", + "comemo", + "flate2", + "float-cmp 0.10.0", + "gif", + "hayro-write", + "image-webp", + "imagesize", + "once_cell", + "pdf-writer", + "png", + "rayon", + "rustc-hash", + "rustybuzz", + "siphasher", + "skrifa", + "smallvec", + "subsetter", + "tiny-skia-path", + "xmp-writer", + "yoke 0.8.0", + "zune-jpeg", ] [[package]] -name = "lazy_static" -version = "1.4.0" +name = "krilla-svg" +version = "0.1.0" +source = "git+https://github.com/LaurenzV/krilla?rev=747be0d#747be0db9abc14e97b1036e0ced5a069080705b6" +dependencies = [ + "flate2", + "fontdb", + "krilla", + "png", + "resvg", + "tiny-skia", + "usvg", +] + +[[package]] +name = "kurbo" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +checksum = "1077d333efea6170d9ccb96d3c3026f300ca0773da4938cc4c811daa6df68b0c" +dependencies = [ + "arrayvec", + "smallvec", +] [[package]] name = "libc" -version = "0.2.149" +version = "0.2.169" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a08173bc88b7955d1b3145aa561539096c421ac8debde8cbc3612ec635fee29b" +checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a" [[package]] name = "libdeflate-sys" -version = "0.14.0" +version = "1.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "012437ac39c1e7d7ba12af3aceceb5c93149779aa17c2b1c483f33954957ddc8" +checksum = "413b667c8a795fcbe6287a75a8ce92b1dae928172c716fe95044cb2ec7877941" dependencies = [ "cc", ] [[package]] name = "libdeflater" -version = "0.14.0" +version = "1.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58b30f982ddb14aae2a24a7ed7b3d512d687c2483493f95de7a6d167942a19c3" +checksum = "d78376c917eec0550b9c56c858de50e1b7ebf303116487562e624e63ce51453a" dependencies = [ "libdeflate-sys", ] +[[package]] +name = "libfuzzer-sys" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf78f52d400cf2d84a3a973a78a592b4adc535739e0a5597a0da6f0c357adc75" +dependencies = [ + "arbitrary", + "cc", +] + [[package]] name = "libm" -version = "0.2.8" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" +checksum = "8355be11b20d696c8f18f6cc018c4e372165b1fa8126cef092399c9951984ffa" [[package]] -name = "line-wrap" -version = "0.1.1" +name = "libredox" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" +dependencies = [ + "bitflags 2.9.1", + "libc", + "redox_syscall", +] + +[[package]] +name = "libz-rs-sys" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f30344350a2a51da54c1d53be93fade8a237e545dbcc4bdbe635413f2117cab9" +checksum = "172a788537a2221661b480fee8dc5f96c580eb34fa88764d3205dc356c7e4221" dependencies = [ - "safemem", + "zlib-rs", ] [[package]] @@ -1451,15 +1538,15 @@ checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" [[package]] name = "linux-raw-sys" -version = "0.4.10" +version = "0.4.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da2479e8c062e40bf0066ffa0bc823de0a9368974af99c9f6df941d2c231e03f" +checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" [[package]] name = "lipsum" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c5e9ef2d2ad6fe67a59ace27c203c8d3a71d195532ee82e3bbe0d5f9a9ca541" +checksum = "636860251af8963cc40f6b4baadee105f02e21b28131d76eba8e40ce84ab8064" dependencies = [ "rand", "rand_chacha", @@ -1467,25 +1554,34 @@ dependencies = [ [[package]] name = "litemap" -version = "0.7.1" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77a1a2647d5b7134127971a6de0d533c49de2159167e7f259c427195f87168a1" +checksum = "4ee93343901ab17bd981295f2cf0026d4ad018c7c31ba84549a4ddbb47a45104" +dependencies = [ + "serde", +] [[package]] name = "lock_api" -version = "0.4.11" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" +checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" dependencies = [ "autocfg", "scopeguard", ] +[[package]] +name = "lockfree-object-pool" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9374ef4228402d4b7e403e5838cb880d9ee663314b0a900d5a6aabf0c213552e" + [[package]] name = "log" -version = "0.4.20" +version = "0.4.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" +checksum = "04cbf5b083de1c7e0222a7a51dbfdba1cbe1c6ab0b15e29fff3f6c077fd9cd9f" [[package]] name = "lzma-sys" @@ -1500,58 +1596,93 @@ dependencies = [ [[package]] name = "memchr" -version = "2.6.4" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "memmap2" -version = "0.8.0" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a5a03cefb0d953ec0be133036f14e109412fa594edc2f77227249db66cc3ed" +checksum = "fd3f7eed9d3848f8b98834af67102b720745c4ec028fcd0aa0239277e7de374f" dependencies = [ "libc", ] [[package]] -name = "memoffset" -version = "0.9.0" +name = "minimal-lexical" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" -dependencies = [ - "autocfg", -] +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.7.1" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" +checksum = "8e3e04debbb59698c15bacbb6d93584a8c0ca9cc3213cb423d31f760d8843ce5" dependencies = [ - "adler", + "adler2", "simd-adler32", ] [[package]] name = "mio" -version = "0.8.9" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dce281c5e46beae905d4de1870d8b1509a9142b62eedf18b443b011ca8343d0" +checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd" dependencies = [ "libc", "log", - "wasi", - "windows-sys", + "wasi 0.11.0+wasi-snapshot-preview1", + "windows-sys 0.52.0", ] [[package]] -name = "notify" -version = "6.1.1" +name = "multi-stash" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6205bd8bb1e454ad2e27422015fb5e4f2bcc7e08fa8f27058670d208324a4d2d" -dependencies = [ - "bitflags 2.4.1", - "crossbeam-channel", +checksum = "685a9ac4b61f4e728e1d2c6a7844609c16527aeb5e6c865915c08e619c16410f" + +[[package]] +name = "mutate_once" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16cf681a23b4d0a43fc35024c176437f9dcd818db34e0f42ab456a0ee5ad497b" + +[[package]] +name = "native-tls" +version = "0.2.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dab59f8e050d5df8e4dd87d9206fb6f65a483e20ac9fda365ade4fab353196c" +dependencies = [ + "libc", + "log", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework", + "security-framework-sys", + "tempfile", +] + +[[package]] +name = "nom" +version = "7.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +dependencies = [ + "memchr", + "minimal-lexical", +] + +[[package]] +name = "notify" +version = "8.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2fee8403b3d66ac7b26aee6e40a897d85dc5ce26f44da36b8b73e987cc52e943" +dependencies = [ + "bitflags 2.9.1", "filetime", "fsevent-sys", "inotify", @@ -1559,67 +1690,47 @@ dependencies = [ "libc", "log", "mio", + "notify-types", "walkdir", - "windows-sys", + "windows-sys 0.59.0", ] [[package]] -name = "nu-ansi-term" -version = "0.46.0" +name = "notify-types" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" -dependencies = [ - "overload", - "winapi", -] +checksum = "5e0826a989adedc2a244799e823aece04662b66609d96af8dff7ac6df9a8925d" [[package]] name = "num-bigint" -version = "0.4.4" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" +checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" dependencies = [ - "autocfg", "num-integer", "num-traits", ] [[package]] -name = "num-format" -version = "0.4.4" +name = "num-conv" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a652d9771a63711fd3c3deb670acfbe5c30a4072e664d7a3bf5a9e1056ac72c3" -dependencies = [ - "arrayvec", - "itoa", -] +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" [[package]] name = "num-integer" -version = "0.1.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" -dependencies = [ - "autocfg", - "num-traits", -] - -[[package]] -name = "num-rational" -version = "0.4.1" +version = "0.1.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" dependencies = [ - "autocfg", - "num-integer", "num-traits", ] [[package]] name = "num-traits" -version = "0.2.17" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", ] @@ -1632,15 +1743,15 @@ checksum = "e25be21376a772d15f97ae789845340a9651d3c4246ff5ebb6a2b35f9c37bd31" [[package]] name = "once_cell" -version = "1.18.0" +version = "1.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" +checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" [[package]] name = "open" -version = "5.0.0" +version = "5.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfabf1927dce4d6fdf563d63328a0a506101ced3ec780ca2135747336c98cef8" +checksum = "e2483562e62ea94312f3576a7aca397306df7990b8d89033e18766744377ef95" dependencies = [ "is-wsl", "libc", @@ -1648,40 +1759,88 @@ dependencies = [ ] [[package]] -name = "option-ext" -version = "0.2.0" +name = "openssl" +version = "0.10.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" +checksum = "fedfea7d58a1f73118430a55da6a286e7b044961736ce96a16a17068ea25e5da" +dependencies = [ + "bitflags 2.9.1", + "cfg-if", + "foreign-types", + "libc", + "once_cell", + "openssl-macros", + "openssl-sys", +] [[package]] -name = "overload" +name = "openssl-macros" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" +checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "openssl-probe" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" + +[[package]] +name = "openssl-src" +version = "300.4.1+3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "faa4eac4138c62414b5622d1b31c5c304f34b406b013c079c2bbc652fdd6678c" +dependencies = [ + "cc", +] + +[[package]] +name = "openssl-sys" +version = "0.9.107" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8288979acd84749c744a9014b4382d42b8f7b2592847b5afb2ed29e5d16ede07" +dependencies = [ + "cc", + "libc", + "openssl-src", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "option-ext" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" [[package]] name = "oxipng" -version = "8.0.0" -source = "git+https://github.com/typst/oxipng?rev=b8ec65b#b8ec65b3ca42dde33c85149b6e402e891527f802" +version = "9.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa3202b10a7ffac89508bb091fe420048c47926b37c5ff84d78dc8af7044fa86" dependencies = [ "bitvec", "crossbeam-channel", "filetime", - "indexmap 2.0.2", + "indexmap 2.7.1", "libdeflater", "log", "rayon", "rgb", "rustc-hash", - "rustc_version", "zopfli", ] [[package]] name = "palette" -version = "0.7.3" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2e2f34147767aa758aa649415b50a69eeb46a67f9dc7db8011eeb3d84b351dc" +checksum = "4cbf71184cc5ecc2e4e1baccdb21026c20e5fc3dcf63028a086131b3ab00b6e6" dependencies = [ "approx", "fast-srgb8", @@ -1691,80 +1850,110 @@ dependencies = [ [[package]] name = "palette_derive" -version = "0.7.3" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7db010ec5ff3d4385e4f133916faacd9dad0f6a09394c92d825b3aed310fa0a" +checksum = "f5030daf005bface118c096f510ffb781fc28f9ab6a32ab224d8631be6851d30" dependencies = [ + "by_address", "proc-macro2", "quote", - "syn 2.0.38", + "syn", +] + +[[package]] +name = "parking_lot" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" +dependencies = [ + "lock_api", + "parking_lot_core", ] [[package]] name = "parking_lot_core" -version = "0.9.9" +version = "0.9.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" +checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.4.1", + "redox_syscall", "smallvec", "windows-targets", ] [[package]] -name = "password-hash" -version = "0.4.2" +name = "paste" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + +[[package]] +name = "pathdiff" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df94ce210e5bc13cb6651479fa48d14f601d9858cfe0467f43ae157023b938d3" + +[[package]] +name = "pdf-writer" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7676374caaee8a325c9e7a2ae557f216c5563a171d6997b0ef8a65af35147700" +checksum = "3ea27c5015ab81753fc61e49f8cde74999346605ee148bb20008ef3d3150e0dc" dependencies = [ - "base64ct", - "rand_core", - "subtle", + "bitflags 2.9.1", + "itoa", + "memchr", + "ryu", ] [[package]] -name = "paste" -version = "1.0.14" +name = "percent-encoding" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] -name = "pathdiff" -version = "0.2.1" +name = "phf" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8835116a5c179084a830efb3adc117ab007512b535bc1a21c991d3b32a6b44dd" +checksum = "1fd6780a80ae0c52cc120a26a1a42c1ae51b247a253e4e06113d23d2c2edd078" +dependencies = [ + "phf_macros", + "phf_shared", +] [[package]] -name = "pbkdf2" -version = "0.11.0" +name = "phf_generator" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" +checksum = "3c80231409c20246a13fddb31776fb942c38553c51e871f8cbd687a4cfb5843d" dependencies = [ - "digest", - "hmac", - "password-hash", - "sha2", + "phf_shared", + "rand", ] [[package]] -name = "pdf-writer" -version = "0.9.2" +name = "phf_macros" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "644b654f2de28457bf1e25a4905a76a563d1128a33ce60cf042f721f6818feaf" +checksum = "f84ac04429c13a7ff43785d75ad27569f2951ce0ffd30a3321230db2fc727216" dependencies = [ - "bitflags 1.3.2", - "itoa", - "memchr", - "ryu", + "phf_generator", + "phf_shared", + "proc-macro2", + "quote", + "syn", ] [[package]] -name = "percent-encoding" -version = "2.3.0" +name = "phf_shared" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" +checksum = "67eabc2ef2a60eb7faa00097bd1ffdb5bd28e62bf39990626a582201b7a754e5" +dependencies = [ + "siphasher", +] [[package]] name = "pico-args" @@ -1772,46 +1961,39 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5be167a7af36ee22fe3115051bc51f6e6c7054c9348e28deb4f49bd6f705a315" -[[package]] -name = "pin-project-lite" -version = "0.2.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" - [[package]] name = "pixglyph" -version = "0.2.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f67591f21f6668e63c1cd85adab066ac8a92bc7b962668dd8042197a6e4b8f8f" +checksum = "3c1106193bc18a4b840eb075ff6664c8a0b0270f0531bb12a7e9c803e53b55c5" dependencies = [ "ttf-parser", ] [[package]] name = "pkg-config" -version = "0.3.27" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" +checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" [[package]] name = "plist" -version = "1.5.1" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a4a0cfc5fb21a09dc6af4bf834cf10d4a32fccd9e2ea468c4b1751a097487aa" +checksum = "42cf17e9a1800f5f396bc67d193dc9411b59012a5876445ef450d449881e1016" dependencies = [ "base64", - "indexmap 1.9.3", - "line-wrap", - "quick-xml 0.30.0", + "indexmap 2.7.1", + "quick-xml 0.32.0", "serde", "time", ] [[package]] name = "png" -version = "0.17.10" +version = "0.17.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd75bf2d8dd3702b9707cdbc56a5b9ef42cec752eb8b3bafc01234558442aa64" +checksum = "82151a2fc869e011c153adc57cf2789ccb8d9906ce52c0b39a6b5697749d7526" dependencies = [ "bitflags 1.3.2", "crc32fast", @@ -1820,14 +2002,21 @@ dependencies = [ "miniz_oxide", ] +[[package]] +name = "portable-atomic" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "280dc24453071f1b63954171985a0b0d30058d287960968b9b2aca264c8d4ee6" + [[package]] name = "postcard" -version = "1.0.8" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a55c51ee6c0db07e68448e336cf8ea4131a620edefebf9893e759b2d793420f8" +checksum = "170a2601f67cc9dba8edd8c4870b15f71a6a2dc196daec8c83f72b59dff628a8" dependencies = [ "cobs", - "embedded-io", + "embedded-io 0.4.0", + "embedded-io 0.6.1", "serde", ] @@ -1839,93 +2028,85 @@ checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" [[package]] name = "ppv-lite86" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" - -[[package]] -name = "proc-macro2" -version = "1.0.69" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" +checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" dependencies = [ - "unicode-ident", + "zerocopy", ] [[package]] -name = "psm" -version = "0.1.21" +name = "proc-macro-hack" +version = "0.5.20+deprecated" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5787f7cda34e3033a72192c018bc5883100330f362ef279a8cbccfce8bb4e874" -dependencies = [ - "cc", -] +checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" [[package]] -name = "ptr_meta" -version = "0.1.4" +name = "proc-macro2" +version = "1.0.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0738ccf7ea06b608c10564b31debd4f5bc5e197fc8bfe088f68ae5ce81e7a4f1" +checksum = "60946a68e5f9d28b0dc1c21bb8a97ee7d018a8b322fa57838ba31cc878e22d99" dependencies = [ - "ptr_meta_derive", + "unicode-ident", ] [[package]] -name = "ptr_meta_derive" -version = "0.1.4" +name = "psm" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16b845dbfca988fa33db069c0e230574d15a3088f147a87b64c7589eb662c9ac" +checksum = "200b9ff220857e53e184257720a14553b2f4aa02577d2ed9842d45d4b9654810" dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", + "cc", ] [[package]] name = "pulldown-cmark" -version = "0.9.3" +version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77a1a2f1f0a7ecff9c31abbe177637be0e97a0aef46cf8738ece09327985d998" +checksum = "57206b407293d2bcd3af849ce869d52068623f19e1b5ff8e8778e3309439682b" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.9.1", "getopts", "memchr", "unicase", ] [[package]] -name = "quick-xml" -version = "0.26.0" +name = "qcms" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f50b1c63b38611e7d4d7f68b82d3ad0cc71a2ad2e7f61fc10f1328d917c93cd" -dependencies = [ - "memchr", -] +checksum = "edecfcd5d755a5e5d98e24cf43113e7cdaec5a070edd0f6b250c03a573da30fa" + +[[package]] +name = "quick-error" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3" [[package]] name = "quick-xml" -version = "0.28.2" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ce5e73202a820a31f8a0ee32ada5e21029c81fd9e3ebf668a40832e4219d9d1" +checksum = "1d3a6e5838b60e0e8fa7a43f22ade549a37d61f8bdbe636d0d7816191de969c2" dependencies = [ "memchr", - "serde", ] [[package]] name = "quick-xml" -version = "0.30.0" +version = "0.38.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eff6510e86862b57b210fd8cbe8ed3f0d7d600b9c2863cd4549a2e033c66e956" +checksum = "42a232e7487fc2ef313d96dde7948e7a3c05101870d8985e4fd8d26aedd27b89" dependencies = [ "memchr", + "serde", ] [[package]] name = "quote" -version = "1.0.33" +version = "1.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" +checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc" dependencies = [ "proc-macro2", ] @@ -1963,9 +2144,9 @@ checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" [[package]] name = "rayon" -version = "1.8.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c27db03db7734835b3f53954b534c91069375ce6ccaa2e065441e07d9b6cdb1" +checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" dependencies = [ "either", "rayon-core", @@ -1973,285 +2154,186 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.12.0" +version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ce3fb6ad83f861aac485e76e1985cd109d9a3713802152be56c3b1f0e0658ed" +checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" dependencies = [ "crossbeam-deque", "crossbeam-utils", ] [[package]] -name = "rctree" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b42e27ef78c35d3998403c1d26f3efd9e135d3e5121b0a4845cc5cc27547f4f" - -[[package]] -name = "redox_syscall" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" -dependencies = [ - "bitflags 1.3.2", -] - -[[package]] -name = "redox_syscall" -version = "0.3.5" +name = "read-fonts" +version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" +checksum = "192735ef611aac958468e670cb98432c925426f3cb71521fda202130f7388d91" dependencies = [ - "bitflags 1.3.2", + "bytemuck", + "font-types", ] [[package]] name = "redox_syscall" -version = "0.4.1" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +checksum = "03a862b389f93e68874fbf580b9de08dd02facb9a788ebadaf4a3fd33cf58834" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.9.1", ] [[package]] name = "redox_users" -version = "0.4.3" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" +checksum = "dd6f9d3d47bdd2ad6945c5015a226ec6155d0bcdfd8f7cd29f86b71f8de99d2b" dependencies = [ - "getrandom", - "redox_syscall 0.2.16", - "thiserror", + "getrandom 0.2.15", + "libredox", + "thiserror 2.0.11", ] [[package]] name = "regex" -version = "1.10.2" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" dependencies = [ "aho-corasick", "memchr", "regex-automata", - "regex-syntax 0.8.2", + "regex-syntax", ] [[package]] name = "regex-automata" -version = "0.4.3" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" +checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.2", + "regex-syntax", ] [[package]] name = "regex-syntax" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" - -[[package]] -name = "regex-syntax" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" - -[[package]] -name = "rend" -version = "0.4.1" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2571463863a6bd50c32f94402933f03457a3fbaf697a707c5be741e459f08fd" -dependencies = [ - "bytecheck", -] +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "resvg" -version = "0.36.0" +version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc7980f653f9a7db31acff916a262c3b78c562919263edea29bf41a056e20497" +checksum = "dd43d1c474e9dadf09a8fdf22d713ba668b499b5117b9b9079500224e26b5b29" dependencies = [ "gif", - "jpeg-decoder", + "image-webp", "log", "pico-args", - "png", "rgb", "svgtypes", "tiny-skia", "usvg", + "zune-jpeg", ] [[package]] name = "rgb" -version = "0.8.37" +version = "0.8.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05aaa8004b64fd573fc9d002f4e632d51ad4f026c2b5ba95fcb6c2f32c2c47d8" +checksum = "57397d16646700483b67d2dd6511d79318f9d057fdbd21a4066aeac8b41d310a" dependencies = [ "bytemuck", ] [[package]] -name = "ring" -version = "0.17.5" +name = "roff" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb0205304757e5d899b9c2e448b867ffd03ae7f988002e47cd24954391394d0b" -dependencies = [ - "cc", - "getrandom", - "libc", - "spin", - "untrusted", - "windows-sys", -] +checksum = "88f8660c1ff60292143c98d08fc6e2f654d722db50410e3f3797d40baaf9d8f3" [[package]] -name = "rkyv" -version = "0.7.42" +name = "roxmltree" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0200c8230b013893c0b2d6213d6ec64ed2b9be2e0e016682b7224ff82cff5c58" -dependencies = [ - "bitvec", - "bytecheck", - "hashbrown 0.12.3", - "ptr_meta", - "rend", - "rkyv_derive", - "seahash", - "tinyvec", - "uuid", -] +checksum = "6c20b6793b5c2fa6553b250154b78d6d0db37e72700ae35fad9387a46f487c97" [[package]] -name = "rkyv_derive" -version = "0.7.42" +name = "rust_decimal" +version = "1.36.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2e06b915b5c230a17d7a736d1e2e63ee753c256a8614ef3f5147b13a4f5541d" +checksum = "b082d80e3e3cc52b2ed634388d436fe1f4de6af5786cc2de9ba9737527bdf555" dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", + "arrayvec", + "num-traits", ] [[package]] -name = "roff" -version = "0.2.1" +name = "rustc-hash" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b833d8d034ea094b1ea68aa6d5c740e0d04bad9d16568d08ba6f76823a114316" +checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" [[package]] -name = "roxmltree" -version = "0.18.1" +name = "rustix" +version = "0.38.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "862340e351ce1b271a378ec53f304a5558f7db87f3769dc655a8f6ecbb68b302" +checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" dependencies = [ - "xmlparser", + "bitflags 2.9.1", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.59.0", ] [[package]] -name = "rustc-hash" -version = "1.1.0" +name = "rustversion" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" +checksum = "f7c45b9784283f1b2e7fb61b42047c2fd678ef0960d4f6f1eba131594cc369d4" [[package]] -name = "rustc_version" -version = "0.4.0" +name = "rustybuzz" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +checksum = "fd3c7c96f8a08ee34eff8857b11b49b07d71d1c3f4e88f8a88d4c9e9f90b1702" dependencies = [ - "semver", + "bitflags 2.9.1", + "bytemuck", + "core_maths", + "log", + "smallvec", + "ttf-parser", + "unicode-bidi-mirroring", + "unicode-ccc", + "unicode-properties", + "unicode-script", ] [[package]] -name = "rustix" -version = "0.38.21" +name = "ryu" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b426b0506e5d50a7d8dafcf2e81471400deb602392c7dd110815afb4eaf02a3" -dependencies = [ - "bitflags 2.4.1", - "errno", - "libc", - "linux-raw-sys", - "windows-sys", -] +checksum = "6ea1a2d0a644769cc99faa24c3ad26b379b786fe7c36fd3c546254801650e6dd" [[package]] -name = "rustls" -version = "0.21.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "446e14c5cda4f3f30fe71863c34ec70f5ac79d6087097ad0bb433e1be5edf04c" -dependencies = [ - "log", - "ring", - "rustls-webpki", - "sct", -] - -[[package]] -name = "rustls-pemfile" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d3987094b1d07b653b7dfdc3f70ce9a1da9c51ac18c1b06b662e4f9a0e9f4b2" -dependencies = [ - "base64", -] - -[[package]] -name = "rustls-webpki" -version = "0.101.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" -dependencies = [ - "ring", - "untrusted", -] - -[[package]] -name = "rustversion" -version = "1.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" - -[[package]] -name = "rustybuzz" -version = "0.10.0" +name = "same-file" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71cd15fef9112a1f94ac64b58d1e4628192631ad6af4dc69997f995459c874e7" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" dependencies = [ - "bitflags 1.3.2", - "bytemuck", - "smallvec", - "ttf-parser", - "unicode-bidi-mirroring", - "unicode-ccc", - "unicode-properties", - "unicode-script", + "winapi-util", ] [[package]] -name = "ryu" -version = "1.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" - -[[package]] -name = "safemem" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef703b7cb59335eae2eb93ceb664c0eb7ea6bf567079d843e09420219668e072" - -[[package]] -name = "same-file" -version = "1.0.6" +name = "schannel" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +checksum = "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d" dependencies = [ - "winapi-util", + "windows-sys 0.59.0", ] [[package]] @@ -2261,73 +2343,82 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] -name = "sct" -version = "0.7.1" +name = "security-framework" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" +checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "ring", - "untrusted", + "bitflags 2.9.1", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", ] [[package]] -name = "seahash" -version = "4.1.0" +name = "security-framework-sys" +version = "2.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b" +checksum = "49db231d56a190491cb4aeda9527f1ad45345af50b0851622a7adb8c03b01c32" +dependencies = [ + "core-foundation-sys", + "libc", +] [[package]] name = "self-replace" -version = "1.3.5" -source = "git+https://github.com/typst/self-replace#2e6d5e4808bba73b713fd85cf5616b7d846143c2" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03ec815b5eab420ab893f63393878d89c90fdd94c0bcc44c07abb8ad95552fb7" dependencies = [ - "fastrand 1.9.0", + "fastrand", "tempfile", - "windows-sys", + "windows-sys 0.52.0", ] [[package]] name = "semver" -version = "1.0.20" +version = "1.0.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" +checksum = "f79dfe2d285b0488816f30e700a7438c5a73d816b5b7d3ac72fbc48b0d185e03" [[package]] name = "serde" -version = "1.0.190" +version = "1.0.217" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91d3c334ca1ee894a2c6f6ad698fe8c435b76d504b13d436f0685d648d6d96f7" +checksum = "02fc4265df13d6fa1d00ecff087228cc0a2b5f3c0e87e258d8b94a156e984c70" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.190" +version = "1.0.217" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67c5609f394e5c2bd7fc51efda478004ea80ef42fee983d5c67a65e34f32c0e3" +checksum = "5a9bf7cf98d04a2b28aead066b7496853d4779c9cc183c440dbac457641e19a0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn", ] [[package]] name = "serde_json" -version = "1.0.108" +version = "1.0.138" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" +checksum = "d434192e7da787e94a6ea7e9670b26a036d0ca41e0b7efb2676dd32bae872949" dependencies = [ "itoa", + "memchr", "ryu", "serde", ] [[package]] name = "serde_spanned" -version = "0.6.4" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12022b835073e5b11e90a14f86838ceb1c8fb0325b72416845c487ac0fa95e80" +checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1" dependencies = [ "serde", ] @@ -2346,11 +2437,11 @@ dependencies = [ [[package]] name = "serde_yaml" -version = "0.9.27" +version = "0.9.34+deprecated" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3cc7a1570e38322cfe4154732e5110f887ea57e22b76f4bfd32b5bdd3368666c" +checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" dependencies = [ - "indexmap 2.0.2", + "indexmap 2.7.1", "itoa", "ryu", "serde", @@ -2358,34 +2449,24 @@ dependencies = [ ] [[package]] -name = "sha1" -version = "0.10.6" +name = "shell-escape" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest", -] +checksum = "45bb67a18fa91266cc7807181f62f9178a6873bfad7dc788c42e6430db40184f" [[package]] -name = "sha2" -version = "0.10.8" +name = "shlex" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest", -] +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" [[package]] -name = "sharded-slab" -version = "0.1.7" +name = "sigpipe" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" +checksum = "5584bfb3e0d348139d8210285e39f6d2f8a1902ac06de343e06357d1d763d8e6" dependencies = [ - "lazy_static", + "libc", ] [[package]] @@ -2394,41 +2475,51 @@ version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" -[[package]] -name = "simdutf8" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f27f6278552951f1f2b8cf9da965d10969b2efdea95a6ec47987ab46edfe263a" - [[package]] name = "simplecss" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a11be7c62927d9427e9f40f3444d5499d868648e2edbc4e2116de69e7ec0e89d" +checksum = "7a9c6883ca9c3c7c90e888de77b7a5c849c779d25d74a1269b0218b14e8b136c" dependencies = [ "log", ] [[package]] name = "siphasher" -version = "0.3.11" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" +checksum = "56199f7ddabf13fe5074ce809e7d3f42b42ae711800501b5b16ea82ad029c39d" + +[[package]] +name = "skrifa" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6d632b5a73f566303dbeabd344dc3e716fd4ddc9a70d6fc8ea8e6f06617da97" +dependencies = [ + "bytemuck", + "read-fonts", +] + +[[package]] +name = "slab" +version = "0.4.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04dc19736151f35336d325007ac991178d504a119863a2fcb3758cdb5e52c50d" [[package]] name = "slotmap" -version = "1.0.6" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1e08e261d0e8f5c43123b7adf3e4ca1690d655377ac93a03b2c9d3e98de1342" +checksum = "dbff4acf519f630b3a3ddcfaea6c06b42174d9a44bc70c620e9ed1649d58b82a" dependencies = [ "version_check", ] [[package]] name = "smallvec" -version = "1.11.1" +version = "1.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "942b4a808e05215192e39f4ab80813e599068285906cc91aa64f923db842bd5a" +checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" [[package]] name = "spin" @@ -2444,89 +2535,77 @@ checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" [[package]] name = "stacker" -version = "0.1.15" +version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c886bd4480155fd3ef527d45e9ac8dd7118a898a46530b7b94c3e21866259fce" +checksum = "799c883d55abdb5e98af1a7b3f23b9b6de8ecada0ecac058672d7635eb48ca7b" dependencies = [ "cc", "cfg-if", "libc", "psm", - "winapi", + "windows-sys 0.59.0", ] -[[package]] -name = "str_stack" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9091b6114800a5f2141aee1d1b9d6ca3592ac062dc5decb3764ec5895a47b4eb" - [[package]] name = "strict-num" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6637bab7722d379c8b41ba849228d680cc12d0a45ba1fa2b48f2a30577a06731" dependencies = [ - "float-cmp", + "float-cmp 0.9.0", +] + +[[package]] +name = "string-interner" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a3275464d7a9f2d4cac57c89c2ef96a8524dba2864c8d6f82e3980baf136f9b" +dependencies = [ + "hashbrown 0.15.2", + "serde", ] [[package]] name = "strsim" -version = "0.10.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "strum" -version = "0.24.1" +version = "0.27.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f" +checksum = "af23d6f6c1a224baef9d3f61e287d2761385a5b88fdab4eb4c6f11aeb54c4bcf" dependencies = [ "strum_macros", ] [[package]] name = "strum_macros" -version = "0.24.3" +version = "0.27.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59" +checksum = "7695ce3845ea4b33927c055a39dc438a45b059f7c1b3d91d38d10355fb8cbca7" dependencies = [ "heck", "proc-macro2", "quote", - "rustversion", - "syn 1.0.109", + "syn", ] [[package]] name = "subsetter" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09eab8a83bff89ba2200bd4c59be45c7c787f988431b936099a5a266c957f2f9" - -[[package]] -name = "subtle" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" - -[[package]] -name = "svg2pdf" -version = "0.9.0" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "363c5346967da04bf3ebb3d8bafa7f52c53c810167047904df1960eac3fc08b7" +checksum = "35725d9d2d056905865f8a36146e45be43691b15fc5d973bd7f79dd438288544" dependencies = [ - "image", - "miniz_oxide", - "pdf-writer", - "usvg", + "rustc-hash", ] [[package]] name = "svgtypes" -version = "0.12.0" +version = "0.15.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71499ff2d42f59d26edb21369a308ede691421f79ebc0f001e2b1fd3a7c9e52" +checksum = "68c7541fff44b35860c1a7a47a7cadf3e4a304c457b58f9870d9706ece028afc" dependencies = [ "kurbo", "siphasher", @@ -2534,20 +2613,9 @@ dependencies = [ [[package]] name = "syn" -version = "1.0.109" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "syn" -version = "2.0.38" +version = "2.0.98" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e96b79aaa137db8f61e26363a0c9b47d8b4ec75da28b7d1d614c2303e232408b" +checksum = "36147f1a48ae0ec2b5b3bc5b537d267457555a10dc06f3dbc8cb11ba3006d3b1" dependencies = [ "proc-macro2", "quote", @@ -2556,21 +2624,20 @@ dependencies = [ [[package]] name = "synstructure" -version = "0.13.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "285ba80e733fac80aa4270fbcdf83772a79b80aa35c97075320abfee4a915b06" +checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", - "unicode-xid", + "syn", ] [[package]] name = "syntect" -version = "5.1.0" +version = "5.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e02b4b303bf8d08bfeb0445cba5068a3d306b6baece1d5582171a9bf49188f91" +checksum = "874dcfa363995604333cf947ae9f751ca3af4522c60886774c4963943b4746b1" dependencies = [ "bincode", "bitflags 1.3.2", @@ -2579,10 +2646,11 @@ dependencies = [ "fnv", "once_cell", "plist", - "regex-syntax 0.7.5", + "regex-syntax", "serde", + "serde_derive", "serde_json", - "thiserror", + "thiserror 1.0.69", "walkdir", "yaml-rust", ] @@ -2595,9 +2663,9 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "tar" -version = "0.4.40" +version = "0.4.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b16afcea1f22891c49a00c751c7b63b2233284064f11a200fc624137c51e2ddb" +checksum = "c65998313f8e17d0d553d28f91a0df93e4dbbbf770279c7bc21ca0f09ea1a1f6" dependencies = [ "filetime", "libc", @@ -2606,64 +2674,92 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.8.1" +version = "3.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ef1adac450ad7f4b3c28589471ade84f25f731a7a0fe30d71dfa9f60fd808e5" +checksum = "38c246215d7d24f48ae091a2902398798e05d978b24315d6efbc00ede9a8bb91" dependencies = [ "cfg-if", - "fastrand 2.0.1", - "redox_syscall 0.4.1", + "fastrand", + "getrandom 0.3.1", + "once_cell", "rustix", - "windows-sys", + "windows-sys 0.59.0", ] [[package]] name = "termcolor" -version = "1.3.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6093bad37da69aab9d123a8091e4be0aa4a03e4d601ec641c327398315f62b64" +checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" dependencies = [ "winapi-util", ] +[[package]] +name = "terminal_size" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5352447f921fda68cf61b4101566c0bdb5104eff6804d0678e5227580ab6a4e9" +dependencies = [ + "rustix", + "windows-sys 0.59.0", +] + +[[package]] +name = "thin-vec" +version = "0.2.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a38c90d48152c236a3ab59271da4f4ae63d678c5d7ad6b7714d7cb9760be5e4b" + +[[package]] +name = "thiserror" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +dependencies = [ + "thiserror-impl 1.0.69", +] + [[package]] name = "thiserror" -version = "1.0.50" +version = "2.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9a7210f5c9a7156bb50aa36aed4c95afb51df0df00713949448cf9e97d382d2" +checksum = "d452f284b73e6d76dd36758a0c8684b1d5be31f92b89d07fd5822175732206fc" dependencies = [ - "thiserror-impl", + "thiserror-impl 2.0.11", ] [[package]] name = "thiserror-impl" -version = "1.0.50" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn", ] [[package]] -name = "thread_local" -version = "1.1.7" +name = "thiserror-impl" +version = "2.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152" +checksum = "26afc1baea8a989337eeb52b6e72a039780ce45c3edfcc9c5b9d112feeb173c2" dependencies = [ - "cfg-if", - "once_cell", + "proc-macro2", + "quote", + "syn", ] [[package]] name = "time" -version = "0.3.30" +version = "0.3.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4a34ab300f2dee6e562c10a046fc05e358b29f9bf92277f30c3c8d82275f6f5" +checksum = "35e7868883861bd0e56d9ac6efcaaca0d6d5d82a2a7ec8209ff492c07cf37b21" dependencies = [ "deranged", "itoa", + "num-conv", "powerfmt", "serde", "time-core", @@ -2678,18 +2774,19 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.15" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ad70d68dba9e1f8aceda7aa6711965dfec1cac869f311a51bd08b3a2ccbce20" +checksum = "2834e6017e3e5e4b9834939793b282bc03b37a3336245fa820e35e233e2a85de" dependencies = [ + "num-conv", "time-core", ] [[package]] name = "tiny-skia" -version = "0.11.2" +version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b72a92a05db376db09fe6d50b7948d106011761c05a6a45e23e17ee9b556222" +checksum = "83d13394d44dae3207b52a326c0c85a8bf87f1541f23b0d143811088497b09ab" dependencies = [ "arrayref", "arrayvec", @@ -2702,31 +2799,53 @@ dependencies = [ [[package]] name = "tiny-skia-path" -version = "0.11.2" +version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ac3865b9708fc7e1961a65c3a4fa55e984272f33092d3c859929f887fceb647" +checksum = "9c9e7fc0c2e86a30b117d0462aa261b72b7a99b7ebd7deb3a14ceda95c5bdc93" dependencies = [ "arrayref", "bytemuck", "strict-num", ] +[[package]] +name = "tiny_http" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "389915df6413a2e74fb181895f933386023c71110878cd0825588928e64cdc82" +dependencies = [ + "ascii", + "chunked_transfer", + "httpdate", + "log", +] + [[package]] name = "tinystr" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5d0e245e80bdc9b4e5356fc45a72184abbc3861992603f515270e9340f5a219" +checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" dependencies = [ "displaydoc", "serde", - "zerovec", + "zerovec 0.10.4", +] + +[[package]] +name = "tinystr" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d4f6d1145dcb577acf783d4e601bc1d76a13337bb54e6233add580b07344c8b" +dependencies = [ + "displaydoc", + "zerovec 0.11.4", ] [[package]] name = "tinyvec" -version = "1.6.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +checksum = "022db8904dfa342efe721985167e9fcd16c29b226db4397ed752a761cfce81e8" dependencies = [ "tinyvec_macros", ] @@ -2739,9 +2858,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "toml" -version = "0.8.6" +version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ff9e3abce27ee2c9a37f9ad37238c1bdd4e789c84ba37df76aa4d528f5072cc" +checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e" dependencies = [ "serde", "serde_spanned", @@ -2751,20 +2870,20 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.5" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" +checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" dependencies = [ "serde", ] [[package]] name = "toml_edit" -version = "0.20.7" +version = "0.22.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70f427fce4d84c72b5b732388bf4a9f4531b53f74e2887e3ecb2481f68f66d81" +checksum = "02a8b472d1a3d7c18e2d61a489aee3453fd9031c33e4f55bd533f4a7adca1bee" dependencies = [ - "indexmap 2.0.2", + "indexmap 2.7.1", "serde", "serde_spanned", "toml_datetime", @@ -2772,361 +2891,543 @@ dependencies = [ ] [[package]] -name = "tracing" -version = "0.1.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" -dependencies = [ - "pin-project-lite", - "tracing-attributes", - "tracing-core", -] - -[[package]] -name = "tracing-attributes" -version = "0.1.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.38", -] - -[[package]] -name = "tracing-core" -version = "0.1.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" -dependencies = [ - "once_cell", - "valuable", -] - -[[package]] -name = "tracing-error" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d686ec1c0f384b1277f097b2f279a2ecc11afe8c133c1aabf036a27cb4cd206e" -dependencies = [ - "tracing", - "tracing-subscriber", -] - -[[package]] -name = "tracing-flame" -version = "0.2.0" +name = "ttf-parser" +version = "0.25.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bae117ee14789185e129aaee5d93750abe67fdc5a9a62650452bfe4e122a3a9" +checksum = "d2df906b07856748fa3f6e0ad0cbaa047052d4a7dd609e231c4f72cee8c36f31" dependencies = [ - "lazy_static", - "tracing", - "tracing-subscriber", + "core_maths", ] [[package]] -name = "tracing-log" -version = "0.1.4" +name = "two-face" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f751112709b4e791d8ce53e32c4ed2d353565a795ce84da2285393f41557bdf2" +checksum = "384eda438ddf62e2c6f39a174452d952d9d9df5a8ad5ade22198609f8dcaf852" dependencies = [ - "log", "once_cell", - "tracing-core", -] - -[[package]] -name = "tracing-subscriber" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30a651bc37f915e81f087d86e62a18eec5f79550c7faff886f7090b4ea757c77" -dependencies = [ - "nu-ansi-term", - "sharded-slab", - "smallvec", - "thread_local", - "tracing-core", - "tracing-log", + "serde", + "syntect", ] -[[package]] -name = "ttf-parser" -version = "0.19.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49d64318d8311fc2668e48b63969f4343e0a85c4a109aa8460d6672e364b8bd1" - [[package]] name = "typed-arena" version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6af6ae20167a9ece4bcb41af5b80f8a1f1df981f6391189ce00fd257af04126a" -[[package]] -name = "typenum" -version = "1.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" - [[package]] name = "typst" -version = "0.9.0" +version = "0.13.1" dependencies = [ - "base64", - "bitflags 2.4.1", - "bytemuck", "comemo", "ecow", - "flate2", - "fontdb", - "image", - "indexmap 2.0.2", - "kurbo", - "log", - "miniz_oxide", - "once_cell", - "palette", - "pdf-writer", - "pixglyph", - "regex", - "resvg", - "roxmltree", - "rustybuzz", - "serde", - "siphasher", - "stacker", - "subsetter", - "svg2pdf", - "time", - "tiny-skia", - "toml", - "tracing", - "ttf-parser", + "rustc-hash", + "typst-eval", + "typst-html", + "typst-layout", + "typst-library", "typst-macros", + "typst-realize", "typst-syntax", - "unicode-ident", - "unicode-math-class", - "unicode-properties", - "unicode-segmentation", - "unscanny", - "usvg", - "wasmi", - "xmlparser", - "xmlwriter", - "xmp-writer", + "typst-timing", + "typst-utils", ] +[[package]] +name = "typst-assets" +version = "0.13.1" +source = "git+https://github.com/typst/typst-assets?rev=fbf00f9#fbf00f9539fdb0825bef4d39fb57d5986c51b756" + [[package]] name = "typst-cli" -version = "0.9.0" +version = "0.13.1" dependencies = [ "chrono", "clap", "clap_complete", "clap_mangen", "codespan-reporting", + "color-print", "comemo", "dirs", "ecow", - "env_proxy", - "filetime", - "flate2", - "fontdb", - "inferno", + "fs_extra", "notify", - "once_cell", "open", + "parking_lot", "pathdiff", - "rustls", - "rustls-pemfile", + "rayon", + "rustc-hash", "same-file", "self-replace", "semver", "serde", "serde_json", - "serde_yaml 0.9.27", - "siphasher", + "serde_yaml 0.9.34+deprecated", + "shell-escape", + "sigpipe", "tar", "tempfile", - "tracing", - "tracing-error", - "tracing-flame", - "tracing-subscriber", + "tiny_http", + "toml", "typst", - "typst-library", + "typst-eval", + "typst-html", + "typst-kit", + "typst-macros", + "typst-pdf", + "typst-render", + "typst-svg", + "typst-timing", "ureq", "xz2", "zip", ] +[[package]] +name = "typst-dev-assets" +version = "0.13.1" +source = "git+https://github.com/typst/typst-dev-assets?rev=ed6b8b0#ed6b8b0e035097486c44a328bf331fad0bee96f6" + [[package]] name = "typst-docs" -version = "0.9.0" +version = "0.13.1" dependencies = [ - "comemo", + "clap", + "codex", "ecow", "heck", - "include_dir", - "once_cell", "pulldown-cmark", + "rustc-hash", "serde", - "serde_yaml 0.9.27", + "serde_json", + "serde_yaml 0.9.34+deprecated", "syntect", "typed-arena", "typst", - "typst-library", - "unicode_names2", + "typst-assets", + "typst-dev-assets", + "typst-render", + "typst-utils", + "unicode-math-class", "unscanny", "yaml-front-matter", ] +[[package]] +name = "typst-eval" +version = "0.13.1" +dependencies = [ + "comemo", + "ecow", + "indexmap 2.7.1", + "rustc-hash", + "stacker", + "toml", + "typst-library", + "typst-macros", + "typst-syntax", + "typst-timing", + "typst-utils", + "unicode-segmentation", +] + +[[package]] +name = "typst-fuzz" +version = "0.13.1" +dependencies = [ + "comemo", + "libfuzzer-sys", + "typst", + "typst-assets", + "typst-render", + "typst-syntax", +] + +[[package]] +name = "typst-html" +version = "0.13.1" +dependencies = [ + "bumpalo", + "comemo", + "ecow", + "palette", + "rustc-hash", + "time", + "typst-assets", + "typst-library", + "typst-macros", + "typst-svg", + "typst-syntax", + "typst-timing", + "typst-utils", +] + [[package]] name = "typst-ide" -version = "0.9.0" +version = "0.13.1" dependencies = [ "comemo", "ecow", - "if_chain", - "log", + "once_cell", + "pathdiff", + "rustc-hash", "serde", "typst", + "typst-assets", + "typst-dev-assets", + "typst-eval", "unscanny", ] +[[package]] +name = "typst-kit" +version = "0.13.1" +dependencies = [ + "dirs", + "ecow", + "env_proxy", + "fastrand", + "flate2", + "fontdb", + "native-tls", + "once_cell", + "openssl", + "serde", + "serde_json", + "tar", + "typst-assets", + "typst-library", + "typst-syntax", + "typst-timing", + "typst-utils", + "ureq", +] + +[[package]] +name = "typst-layout" +version = "0.13.1" +dependencies = [ + "az", + "bumpalo", + "codex", + "comemo", + "ecow", + "hypher", + "icu_properties", + "icu_provider", + "icu_provider_adapters", + "icu_provider_blob", + "icu_segmenter", + "kurbo", + "memchr", + "rustc-hash", + "rustybuzz", + "smallvec", + "ttf-parser", + "typst-assets", + "typst-library", + "typst-macros", + "typst-syntax", + "typst-timing", + "typst-utils", + "unicode-bidi", + "unicode-math-class", + "unicode-script", + "unicode-segmentation", +] + [[package]] name = "typst-library" -version = "0.9.0" +version = "0.13.1" dependencies = [ "az", + "bitflags 2.9.1", + "bumpalo", "chinese-number", "ciborium", + "codex", "comemo", "csv", "ecow", + "flate2", + "fontdb", + "glidesort", "hayagriva", - "hypher", + "hayro-syntax", "icu_properties", "icu_provider", - "icu_provider_adapters", "icu_provider_blob", - "icu_segmenter", - "indexmap 2.0.2", + "image", + "indexmap 2.7.1", + "kamadak-exif", "kurbo", "lipsum", - "log", - "once_cell", + "memchr", + "palette", + "phf", + "png", + "qcms", + "rayon", + "regex", + "regex-syntax", "roxmltree", + "rust_decimal", + "rustc-hash", "rustybuzz", + "serde", "serde_json", - "serde_yaml 0.9.27", + "serde_yaml 0.9.34+deprecated", + "siphasher", "smallvec", "syntect", "time", "toml", - "tracing", "ttf-parser", + "two-face", "typed-arena", - "typst", - "unicode-bidi", + "typst-assets", + "typst-dev-assets", + "typst-macros", + "typst-syntax", + "typst-timing", + "typst-utils", "unicode-math-class", - "unicode-script", + "unicode-normalization", "unicode-segmentation", + "unscanny", + "usvg", + "utf8_iter", + "wasmi", + "xmlwriter", +] + +[[package]] +name = "typst-macros" +version = "0.13.1" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "typst-pdf" +version = "0.13.1" +dependencies = [ + "bytemuck", + "comemo", + "ecow", + "image", + "infer", + "krilla", + "krilla-svg", + "rustc-hash", + "serde", + "typst-assets", + "typst-library", + "typst-macros", + "typst-syntax", + "typst-timing", + "typst-utils", +] + +[[package]] +name = "typst-realize" +version = "0.13.1" +dependencies = [ + "arrayvec", + "bumpalo", + "comemo", + "ecow", + "regex", + "typst-library", + "typst-macros", + "typst-syntax", + "typst-timing", + "typst-utils", +] + +[[package]] +name = "typst-render" +version = "0.13.1" +dependencies = [ + "bytemuck", + "comemo", + "hayro", + "image", + "pixglyph", + "resvg", + "tiny-skia", + "ttf-parser", + "typst-assets", + "typst-library", + "typst-macros", + "typst-timing", ] [[package]] -name = "typst-macros" -version = "0.9.0" +name = "typst-svg" +version = "0.13.1" dependencies = [ - "heck", - "proc-macro2", - "quote", - "syn 2.0.38", + "base64", + "comemo", + "ecow", + "flate2", + "hayro", + "image", + "rustc-hash", + "ttf-parser", + "typst-assets", + "typst-library", + "typst-macros", + "typst-timing", + "typst-utils", + "xmlparser", + "xmlwriter", ] [[package]] name = "typst-syntax" -version = "0.9.0" +version = "0.13.1" dependencies = [ - "comemo", "ecow", - "once_cell", + "rustc-hash", "serde", - "tracing", + "toml", + "typst-timing", + "typst-utils", "unicode-ident", "unicode-math-class", + "unicode-script", "unicode-segmentation", "unscanny", ] [[package]] name = "typst-tests" -version = "0.9.0" +version = "0.13.1" dependencies = [ "clap", "comemo", "ecow", - "iai", - "once_cell", "oxipng", + "parking_lot", "rayon", + "regex", + "rustc-hash", "tiny-skia", - "ttf-parser", "typst", + "typst-assets", + "typst-dev-assets", + "typst-html", "typst-library", + "typst-pdf", + "typst-render", + "typst-svg", + "typst-syntax", "unscanny", "walkdir", ] +[[package]] +name = "typst-timing" +version = "0.13.1" +dependencies = [ + "parking_lot", + "serde", + "serde_json", + "web-sys", +] + +[[package]] +name = "typst-utils" +version = "0.13.1" +dependencies = [ + "once_cell", + "portable-atomic", + "rayon", + "rustc-hash", + "siphasher", + "thin-vec", + "unicode-math-class", +] + [[package]] name = "unic-langid" -version = "0.9.1" +version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "398f9ad7239db44fd0f80fe068d12ff22d78354080332a5077dc6f52f14dcf2f" +checksum = "a28ba52c9b05311f4f6e62d5d9d46f094bd6e84cb8df7b3ef952748d752a7d05" dependencies = [ "unic-langid-impl", + "unic-langid-macros", ] [[package]] name = "unic-langid-impl" -version = "0.9.1" +version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e35bfd2f2b8796545b55d7d3fd3e89a0613f68a0d1c8bc28cb7ff96b411a35ff" +checksum = "dce1bf08044d4b7a94028c93786f8566047edc11110595914de93362559bc658" dependencies = [ "serde", - "tinystr", + "tinystr 0.8.1", ] [[package]] -name = "unicase" -version = "2.7.0" +name = "unic-langid-macros" +version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89" +checksum = "d5957eb82e346d7add14182a3315a7e298f04e1ba4baac36f7f0dbfedba5fc25" dependencies = [ - "version_check", + "proc-macro-hack", + "tinystr 0.8.1", + "unic-langid-impl", + "unic-langid-macros-impl", +] + +[[package]] +name = "unic-langid-macros-impl" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1249a628de3ad34b821ecb1001355bca3940bcb2f88558f1a8bd82e977f75b5" +dependencies = [ + "proc-macro-hack", + "quote", + "syn", + "unic-langid-impl", ] +[[package]] +name = "unicase" +version = "2.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75b844d17643ee918803943289730bec8aac480150456169e647ed0b576ba539" + [[package]] name = "unicode-bidi" -version = "0.3.13" +version = "0.3.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" +checksum = "5c1cb5db39152898a79168971543b1cb5020dff7fe43c8dc468b0885f5e29df5" [[package]] name = "unicode-bidi-mirroring" -version = "0.1.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56d12260fb92d52f9008be7e4bca09f584780eb2266dc8fecc6a192bec561694" +checksum = "5dfa6e8c60bb66d49db113e0125ee8711b7647b5579dc7f5f19c42357ed039fe" [[package]] name = "unicode-ccc" -version = "0.1.2" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc2520efa644f8268dce4dcd3050eaa7fc044fca03961e9998ac7e2e92b77cf1" +checksum = "ce61d488bcdc9bc8b5d1772c404828b17fc481c0a582b5581e95fb233aef503e" [[package]] name = "unicode-ident" -version = "1.0.12" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +checksum = "a210d160f08b701c8721ba1c726c11662f877ea6b7094007e1ca9a1041945034" [[package]] name = "unicode-math-class" @@ -3136,30 +3437,30 @@ checksum = "7d246cf599d5fae3c8d56e04b20eb519adb89a8af8d0b0fbcded369aa3647d65" [[package]] name = "unicode-normalization" -version = "0.1.22" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" +checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" dependencies = [ "tinyvec", ] [[package]] name = "unicode-properties" -version = "0.1.0" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7f91c8b21fbbaa18853c3d0801c78f4fc94cdb976699bb03e832e75f7fd22f0" +checksum = "e70f2a8b45122e719eb623c01822704c4e0907e7e426a05927e1a1cfff5b75d0" [[package]] name = "unicode-script" -version = "0.5.5" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d817255e1bed6dfd4ca47258685d14d2bdcfbc64fdc9e3819bd5848057b8ecc" +checksum = "9fb421b350c9aff471779e262955939f565ec18b86c15364e6bdf0d662ca7c1f" [[package]] name = "unicode-segmentation" -version = "1.10.1" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" +checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" [[package]] name = "unicode-vo" @@ -3169,27 +3470,15 @@ checksum = "b1d386ff53b415b7fe27b50bb44679e2cc4660272694b7b6f3326d8480823a94" [[package]] name = "unicode-width" -version = "0.1.11" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" - -[[package]] -name = "unicode-xid" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" - -[[package]] -name = "unicode_names2" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "446c96c6dd42604779487f0a981060717156648c1706aa1f464677f03c6cc059" +checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" [[package]] name = "unsafe-libyaml" -version = "0.2.9" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f28467d3e1d3c6586d8f25fa243f544f5800fec42d97032474e17222c2b75cfa" +checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861" [[package]] name = "unscanny" @@ -3197,35 +3486,27 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e9df2af067a7953e9c3831320f35c1cc0600c30d44d9f7a12b01db1cd88d6b47" -[[package]] -name = "untrusted" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" - [[package]] name = "ureq" -version = "2.8.0" +version = "2.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5ccd538d4a604753ebc2f17cd9946e89b77bf87f6a8e2309667c6f2e87855e3" +checksum = "02d1a66277ed75f640d608235660df48c8e3c19f3b4edb6a263315626cc3c01d" dependencies = [ "base64", "flate2", "log", + "native-tls", "once_cell", - "rustls", - "rustls-webpki", "serde", "serde_json", "url", - "webpki-roots", ] [[package]] name = "url" -version = "2.4.1" +version = "2.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5" +checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" dependencies = [ "form_urlencoded", "idna", @@ -3235,100 +3516,66 @@ dependencies = [ [[package]] name = "usvg" -version = "0.36.0" +version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c51daa774fe9ee5efcf7b4fec13019b8119cda764d9a8b5b06df02bb1445c656" +checksum = "2ac8e0e3e4696253dc06167990b3fe9a2668ab66270adf949a464db4088cb354" dependencies = [ "base64", - "log", - "pico-args", - "usvg-parser", - "usvg-text-layout", - "usvg-tree", - "xmlwriter", -] - -[[package]] -name = "usvg-parser" -version = "0.36.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45c88a5ffaa338f0e978ecf3d4e00d8f9f493e29bed0752e1a808a1db16afc40" -dependencies = [ "data-url", "flate2", + "fontdb", "imagesize", "kurbo", "log", + "pico-args", "roxmltree", + "rustybuzz", "simplecss", "siphasher", + "strict-num", "svgtypes", - "usvg-tree", -] - -[[package]] -name = "usvg-text-layout" -version = "0.36.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d2374378cb7a3fb8f33894e0fdb8625e1bbc4f25312db8d91f862130b541593" -dependencies = [ - "fontdb", - "kurbo", - "log", - "rustybuzz", + "tiny-skia-path", "unicode-bidi", "unicode-script", "unicode-vo", - "usvg-tree", + "xmlwriter", ] [[package]] -name = "usvg-tree" -version = "0.36.0" +name = "utf16_iter" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6cacb0c5edeaf3e80e5afcf5b0d4004cc1d36318befc9a7c6606507e5d0f4062" -dependencies = [ - "rctree", - "strict-num", - "svgtypes", - "tiny-skia-path", -] +checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" [[package]] name = "utf8_iter" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64a8922555b9500e3d865caed19330172cd67cbf82203f1a3311d8c305cc9f33" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" [[package]] name = "utf8parse" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" - -[[package]] -name = "uuid" -version = "1.5.0" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88ad59a7560b41a70d191093a945f0b87bc1deeda46fb237479708a1d6b6cdfc" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] -name = "valuable" -version = "0.1.0" +name = "vcpkg" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" [[package]] name = "version_check" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "walkdir" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" dependencies = [ "same-file", "winapi-util", @@ -3340,36 +3587,46 @@ version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +[[package]] +name = "wasi" +version = "0.13.3+wasi-0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26816d2e1a4a36a2940b96c5296ce403917633dff8f3440e9b236ed6f6bacad2" +dependencies = [ + "wit-bindgen-rt", +] + [[package]] name = "wasm-bindgen" -version = "0.2.87" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" +checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" dependencies = [ "cfg-if", + "once_cell", + "rustversion", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.87" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" +checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" dependencies = [ "bumpalo", "log", - "once_cell", "proc-macro2", "quote", - "syn 2.0.38", + "syn", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.87" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" +checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3377,133 +3634,142 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.87" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" +checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.87" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" +checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" +dependencies = [ + "unicode-ident", +] [[package]] name = "wasmi" -version = "0.31.0" +version = "0.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f341edb80021141d4ae6468cbeefc50798716a347d4085c3811900049ea8945" +checksum = "a19af97fcb96045dd1d6b4d23e2b4abdbbe81723dbc5c9f016eb52145b320063" dependencies = [ + "arrayvec", + "multi-stash", "smallvec", "spin", - "wasmi_arena", + "wasmi_collections", "wasmi_core", - "wasmparser-nostd", + "wasmi_ir", + "wasmparser", ] [[package]] -name = "wasmi_arena" -version = "0.4.0" +name = "wasmi_collections" +version = "0.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "401c1f35e413fac1846d4843745589d9ec678977ab35a384db8ae7830525d468" +checksum = "e80d6b275b1c922021939d561574bf376613493ae2b61c6963b15db0e8813562" +dependencies = [ + "string-interner", +] [[package]] name = "wasmi_core" -version = "0.13.0" +version = "0.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcf1a7db34bff95b85c261002720c00c3a6168256dcb93041d3fa2054d19856a" +checksum = "3a8c51482cc32d31c2c7ff211cd2bedd73c5bd057ba16a2ed0110e7a96097c33" dependencies = [ "downcast-rs", "libm", - "num-traits", - "paste", ] [[package]] -name = "wasmparser-nostd" -version = "0.100.1" +name = "wasmi_ir" +version = "0.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9157cab83003221bfd385833ab587a039f5d6fa7304854042ba358a3b09e0724" +checksum = "6e431a14c186db59212a88516788bd68ed51f87aa1e08d1df742522867b5289a" dependencies = [ - "indexmap-nostd", + "wasmi_core", ] [[package]] -name = "webpki-roots" -version = "0.25.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14247bb57be4f377dfb94c72830b8ce8fc6beac03cf4bf7b9732eadd414123fc" - -[[package]] -name = "weezl" -version = "0.1.7" +name = "wasmparser" +version = "0.221.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9193164d4de03a926d909d3bc7c30543cecb35400c02114792c2cae20d5e2dbb" +checksum = "9845c470a2e10b61dd42c385839cdd6496363ed63b5c9e420b5488b77bd22083" +dependencies = [ + "bitflags 2.9.1", + "indexmap 2.7.1", +] [[package]] -name = "winapi" -version = "0.3.9" +name = "web-sys" +version = "0.3.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +checksum = "33b6dd2ef9186f1f2072e409e99cd22a975331a6b3591b12c764e0e55c60d5d2" dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", + "js-sys", + "wasm-bindgen", ] [[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" +name = "weezl" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" +checksum = "53a85b86a771b1c87058196170769dd264f66c0782acf1ae6cc51bfd64b39082" [[package]] name = "winapi-util" -version = "0.1.6" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" +checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "winapi", + "windows-sys 0.59.0", ] [[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" +name = "windows-core" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" +dependencies = [ + "windows-targets", +] [[package]] -name = "windows-core" -version = "0.51.1" +name = "windows-sys" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1f8cf84f35d2db49a46868f947758c7a1138116f7fac3bc844f43ade1292e64" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ "windows-targets", ] [[package]] name = "windows-sys" -version = "0.48.0" +version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" dependencies = [ "windows-targets", ] [[package]] name = "windows-targets" -version = "0.48.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ "windows_aarch64_gnullvm", "windows_aarch64_msvc", "windows_i686_gnu", + "windows_i686_gnullvm", "windows_i686_msvc", "windows_x86_64_gnu", "windows_x86_64_gnullvm", @@ -3512,60 +3778,81 @@ dependencies = [ [[package]] name = "windows_aarch64_gnullvm" -version = "0.48.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" -version = "0.48.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" -version = "0.48.5" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" -version = "0.48.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" -version = "0.48.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" -version = "0.48.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" -version = "0.48.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" -version = "0.5.18" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "176b6138793677221d420fd2f0aeeced263f197688b36484660da767bca2fa32" +checksum = "86e376c75f4f43f44db463cf729e0d3acbf954d13e22c51e26e4c264b4ab545f" dependencies = [ "memchr", ] +[[package]] +name = "wit-bindgen-rt" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3268f3d866458b787f390cf61f4bbb563b922d091359f9608842999eaee3943c" +dependencies = [ + "bitflags 2.9.1", +] + +[[package]] +name = "write16" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" + [[package]] name = "writeable" -version = "0.5.3" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0af0c3d13faebf8dda0b5256fa7096a2d5ccb662f7b9f54a40fe201077ab1c2" +checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" [[package]] name = "wyz" @@ -3578,11 +3865,13 @@ dependencies = [ [[package]] name = "xattr" -version = "1.0.1" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4686009f71ff3e5c4dbcf1a282d0a44db3f021ba69350cd42086b3e5f1c6985" +checksum = "e105d177a3871454f754b33bb0ee637ecaaac997446375fd3e5d43a2ed00c909" dependencies = [ "libc", + "linux-raw-sys", + "rustix", ] [[package]] @@ -3599,9 +3888,9 @@ checksum = "ec7a2a501ed189703dba8b08142f057e887dfc4b2cc4db2d343ac6376ba3e0b9" [[package]] name = "xmp-writer" -version = "0.2.0" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4543ba138f64a94b19e1e9c66c165bca7e03d470e1c066cb76ea279d9d0e1989" +checksum = "ce9e2f4a404d9ebffc0a9832cf4f50907220ba3d7fffa9099261a5cab52f2dd7" [[package]] name = "xz2" @@ -3633,149 +3922,183 @@ dependencies = [ [[package]] name = "yoke" -version = "0.7.2" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40" +dependencies = [ + "serde", + "stable_deref_trait", + "yoke-derive 0.7.5", + "zerofrom", +] + +[[package]] +name = "yoke" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61e38c508604d6bbbd292dadb3c02559aa7fff6b654a078a36217cad871636e4" +checksum = "5f41bb01b8226ef4bfd589436a297c53d118f65921786300e427be8d487695cc" dependencies = [ "serde", "stable_deref_trait", - "yoke-derive", + "yoke-derive 0.8.0", "zerofrom", ] [[package]] name = "yoke-derive" -version = "0.7.2" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] + +[[package]] +name = "yoke-derive" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5e19fb6ed40002bab5403ffa37e53e0e56f914a4450c8765f533018db1db35f" +checksum = "38da3c9736e16c5d3c8c597a9aaa5d1fa565d0532ae05e27c24aa62fb32c0ab6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn", "synstructure", ] [[package]] name = "zerocopy" -version = "0.7.20" +version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd66a62464e3ffd4e37bd09950c2b9dd6c4f8767380fabba0d523f9a775bc85a" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" dependencies = [ + "byteorder", "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.7.20" +version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "255c4596d41e6916ced49cfafea18727b24d67878fa180ddfd69b9df34fd1726" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn", ] [[package]] name = "zerofrom" -version = "0.1.3" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "655b0814c5c0b19ade497851070c640773304939a6c0fd5f5fb43da0696d05b7" +checksum = "cff3ee08c995dee1859d998dea82f7374f2826091dd9cd47def953cae446cd2e" dependencies = [ "zerofrom-derive", ] [[package]] name = "zerofrom-derive" -version = "0.1.3" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6a647510471d372f2e6c2e6b7219e44d8c574d24fdc11c610a61455782f18c3" +checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn", "synstructure", ] +[[package]] +name = "zerotrie" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb594dd55d87335c5f60177cee24f19457a5ec10a065e0a3014722ad252d0a1f" +dependencies = [ + "displaydoc", + "litemap", + "serde", + "zerovec 0.10.4", +] + [[package]] name = "zerovec" -version = "0.10.0" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1194130c5b155bf8ae50ab16c86ab758cd695cf9ad176d2f870b744cbdbb572e" +checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" dependencies = [ "serde", - "yoke", + "yoke 0.7.5", "zerofrom", "zerovec-derive", ] +[[package]] +name = "zerovec" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7aa2bd55086f1ab526693ecbe444205da57e25f4489879da80635a46d90e73b" +dependencies = [ + "zerofrom", +] + [[package]] name = "zerovec-derive" -version = "0.10.0" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acabf549809064225ff8878baedc4ce3732ac3b07e7c7ce6e5c2ccdbc485c324" +checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn", ] [[package]] name = "zip" -version = "0.6.6" +version = "4.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "760394e246e4c28189f19d488c058bf16f564016aefac5d32bb1f3b51d5e9261" +checksum = "9aed4ac33e8eb078c89e6cbb1d5c4c7703ec6d299fc3e7c3695af8f8b423468b" dependencies = [ - "aes", - "byteorder", - "bzip2", - "constant_time_eq", + "arbitrary", "crc32fast", - "crossbeam-utils", "flate2", - "hmac", - "pbkdf2", - "sha1", - "time", - "zstd", + "indexmap 2.7.1", + "memchr", + "zopfli", ] +[[package]] +name = "zlib-rs" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "626bd9fa9734751fc50d6060752170984d7053f5a39061f524cda68023d4db8a" + [[package]] name = "zopfli" -version = "0.7.4" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e0650ae6a051326d798eb099b632f1afb0d323d25ee4ec82ffb0779512084d5" +checksum = "e5019f391bac5cf252e93bbcc53d039ffd62c7bfb7c150414d61369afe57e946" dependencies = [ + "bumpalo", "crc32fast", + "lockfree-object-pool", "log", + "once_cell", "simd-adler32", - "typed-arena", -] - -[[package]] -name = "zstd" -version = "0.11.2+zstd.1.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4" -dependencies = [ - "zstd-safe", ] [[package]] -name = "zstd-safe" -version = "5.0.2+zstd.1.5.2" +name = "zune-core" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d2a5585e04f9eea4b2a3d1eca508c4dee9592a89ef6f450c11719da0726f4db" -dependencies = [ - "libc", - "zstd-sys", -] +checksum = "3f423a2c17029964870cfaabb1f13dfab7d092a62a29a89264f4d36990ca414a" [[package]] -name = "zstd-sys" -version = "2.0.9+zstd.1.5.5" +name = "zune-jpeg" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e16efa8a874a0481a574084d34cc26fdb3b99627480f785888deb6386506656" +checksum = "99a5bab8d7dedf81405c4bb1f2b83ea057643d9cb28778cea9eecddeedd2e028" dependencies = [ - "cc", - "pkg-config", + "zune-core", ] diff --git a/Cargo.toml b/Cargo.toml index 8e1cf57c9563..6bbad0cea6a4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,17 +1,151 @@ [workspace] -members = ["crates/*", "tests"] +members = ["crates/*", "docs", "tests", "tests/fuzz"] default-members = ["crates/typst-cli"] resolver = "2" [workspace.package] -version = "0.9.0" -rust-version = "1.70" # also change in ci.yml +version = "0.13.1" +rust-version = "1.88" # also change in ci.yml authors = ["The Typst Project Developers"] -edition = "2021" +edition = "2024" homepage = "https://typst.app" repository = "https://github.com/typst/typst" -readme = "README.md" license = "Apache-2.0" +categories = ["compilers"] +keywords = ["typst"] +readme = "README.md" + +[workspace.dependencies] +typst = { path = "crates/typst", version = "0.13.1" } +typst-cli = { path = "crates/typst-cli", version = "0.13.1" } +typst-eval = { path = "crates/typst-eval", version = "0.13.1" } +typst-html = { path = "crates/typst-html", version = "0.13.1" } +typst-ide = { path = "crates/typst-ide", version = "0.13.1" } +typst-kit = { path = "crates/typst-kit", version = "0.13.1" } +typst-layout = { path = "crates/typst-layout", version = "0.13.1" } +typst-library = { path = "crates/typst-library", version = "0.13.1" } +typst-macros = { path = "crates/typst-macros", version = "0.13.1" } +typst-pdf = { path = "crates/typst-pdf", version = "0.13.1" } +typst-realize = { path = "crates/typst-realize", version = "0.13.1" } +typst-render = { path = "crates/typst-render", version = "0.13.1" } +typst-svg = { path = "crates/typst-svg", version = "0.13.1" } +typst-syntax = { path = "crates/typst-syntax", version = "0.13.1" } +typst-timing = { path = "crates/typst-timing", version = "0.13.1" } +typst-utils = { path = "crates/typst-utils", version = "0.13.1" } +typst-assets = { git = "https://github.com/typst/typst-assets", rev = "fbf00f9" } +typst-dev-assets = { git = "https://github.com/typst/typst-dev-assets", rev = "ed6b8b0" } +arrayvec = "0.7.4" +az = "1.2" +base64 = "0.22" +bitflags = { version = "2", features = ["serde"] } +bumpalo = { version = "3.15.4", features = ["boxed", "collections"] } +bytemuck = "1" +chinese-number = { version = "0.7.2", default-features = false, features = ["number-to-chinese"] } +chrono = { version = "0.4.24", default-features = false, features = ["clock", "std"] } +ciborium = "0.2.1" +clap = { version = "4.4", features = ["derive", "env", "wrap_help"] } +clap_complete = "4.2.1" +clap_mangen = "0.2.10" +codespan-reporting = "0.11" +codex = { git = "https://github.com/typst/codex", rev = "775d828" } +color-print = "0.3.6" +comemo = "0.5.0" +csv = "1" +ctrlc = "3.4.1" +dirs = "6" +ecow = { version = "0.2", features = ["serde"] } +env_proxy = "0.4" +fastrand = "2.3" +flate2 = "1" +fontdb = { version = "0.23", default-features = false } +fs_extra = "1.3" +rustc-hash = "2.1" +glidesort = "0.1.2" +hayagriva = { git = "https://github.com/typst/hayagriva", rev = "03ae2acf" } +hayro-syntax = "0.2.0" +hayro = "0.2.0" +heck = "0.5" +hypher = "0.1.4" +icu_properties = { version = "1.4", features = ["serde"] } +icu_provider = { version = "1.4", features = ["sync"] } +icu_provider_adapters = "1.4" +icu_provider_blob = "1.4" +icu_segmenter = { version = "1.4", features = ["serde"] } +image = { version = "0.25.5", default-features = false, features = ["png", "jpeg", "gif", "webp"] } +indexmap = { version = "2", features = ["serde"] } +infer = { version = "0.19.0", default-features = false } +kamadak-exif = "0.6" +krilla = { git = "https://github.com/LaurenzV/krilla", rev = "747be0d", default-features = false, features = ["raster-images", "comemo", "rayon", "pdf"] } +krilla-svg = { git = "https://github.com/LaurenzV/krilla", rev = "747be0d" } +kurbo = "0.11" +libfuzzer-sys = "0.4" +lipsum = "0.9" +memchr = "2" +native-tls = "0.2" +notify = "8" +once_cell = "1" +open = "5.0.1" +openssl = "0.10.72" +oxipng = { version = "9.0", default-features = false, features = ["filetime", "parallel", "zopfli"] } +palette = { version = "0.7.3", default-features = false, features = ["approx", "libm"] } +parking_lot = "0.12.1" +pathdiff = "0.2" +phf = { version = "0.11", features = ["macros"] } +pixglyph = "0.6" +png = "0.17" +portable-atomic = "1.6" +proc-macro2 = "1" +pulldown-cmark = "0.9" +qcms = "0.3.0" +quote = "1" +rayon = "1.7.0" +regex = "1" +regex-syntax = "0.8" +resvg = { version = "0.45", default-features = false, features = ["raster-images"] } +roxmltree = "0.20" +rust_decimal = { version = "1.36.0", default-features = false, features = ["maths"] } +rustybuzz = "0.20" +same-file = "1" +self-replace = "1.3.7" +semver = "1" +serde = { version = "1.0.184", features = ["derive"] } +serde_json = "1" +serde_yaml = "0.9" +shell-escape = "0.1.5" +sigpipe = "0.1" +siphasher = "1" +smallvec = { version = "1.11.1", features = ["union", "const_generics", "const_new"] } +stacker = "0.1.15" +syn = { version = "2", features = ["full", "extra-traits"] } +syntect = { version = "5", default-features = false, features = ["parsing", "regex-fancy", "plist-load", "yaml-load"] } +tar = "0.4" +tempfile = "3.7.0" +thin-vec = "0.2.13" +time = { version = "0.3.20", features = ["formatting", "macros", "parsing"] } +tiny_http = "0.12" +tiny-skia = "0.11" +toml = { version = "0.8", default-features = false, features = ["parse", "display"] } +ttf-parser = "0.25.0" +two-face = { version = "0.4.3", default-features = false, features = ["syntect-fancy"] } +typed-arena = "2" +unicode-bidi = "0.3.18" +unicode-ident = "1.0" +unicode-math-class = "0.1" +unicode-script = "0.5" +unicode-normalization = "0.1.24" +unicode-segmentation = "1" +unscanny = "0.1" +ureq = { version = "2", default-features = false, features = ["native-tls", "gzip", "json"] } +usvg = { version = "0.45", default-features = false, features = ["text"] } +utf8_iter = "1.0.4" +walkdir = "2" +wasmi = "0.40.0" +web-sys = "0.3" +xmlparser = "0.13.5" +xmlwriter = "0.1.0" +xz2 = { version = "0.1", features = ["static"] } +yaml-front-matter = "0.1" +zip = { version = "4.3", default-features = false, features = ["deflate"] } [profile.dev.package."*"] opt-level = 2 @@ -22,3 +156,12 @@ codegen-units = 1 [profile.release.package."typst-cli"] strip = true + +[workspace.lints.clippy] +blocks_in_conditions = "allow" +comparison_chain = "allow" +iter_over_hash_type = "warn" +manual_range_contains = "allow" +mutable_key_type = "allow" +uninlined_format_args = "warn" +wildcard_in_or_patterns = "allow" diff --git a/Dockerfile b/Dockerfile index 4ff04218442b..f118b61d8e90 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,42 @@ -FROM rust:alpine AS build +FROM --platform=$BUILDPLATFORM tonistiigi/xx AS xx +FROM --platform=$BUILDPLATFORM rust:alpine AS build + +COPY --from=xx / / + +RUN apk add --no-cache clang lld COPY . /app WORKDIR /app -ENV CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse -RUN apk add --update musl-dev \ - && cargo build -p typst-cli --release +RUN --mount=type=cache,target=/root/.cargo/git/db \ + --mount=type=cache,target=/root/.cargo/registry/cache \ + --mount=type=cache,target=/root/.cargo/registry/index \ + CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse \ + cargo fetch + +ARG TARGETPLATFORM + +RUN xx-apk add --no-cache musl-dev openssl-dev openssl-libs-static +RUN --mount=type=cache,target=/root/.cargo/git/db \ + --mount=type=cache,target=/root/.cargo/registry/cache \ + --mount=type=cache,target=/root/.cargo/registry/index \ + OPENSSL_NO_PKG_CONFIG=1 OPENSSL_STATIC=1 \ + OPENSSL_DIR=$(xx-info is-cross && echo /$(xx-info)/usr/ || echo /usr) \ + xx-cargo build -p typst-cli --release && \ + cp target/$(xx-cargo --print-target-triple)/release/typst target/release/typst && \ + xx-verify target/release/typst FROM alpine:latest -WORKDIR /root/ +ARG CREATED +ARG REVISION +LABEL org.opencontainers.image.authors="The Typst Project Developers " +LABEL org.opencontainers.image.created=${CREATED} +LABEL org.opencontainers.image.description="A markup-based typesetting system" +LABEL org.opencontainers.image.documentation="https://typst.app/docs" +LABEL org.opencontainers.image.licenses="Apache-2.0" +LABEL org.opencontainers.image.revision=${REVISION} +LABEL org.opencontainers.image.source="https://github.com/typst/typst" +LABEL org.opencontainers.image.title="Typst Docker image" +LABEL org.opencontainers.image.url="https://typst.app" +LABEL org.opencontainers.image.vendor="Typst" + COPY --from=build /app/target/release/typst /bin +ENTRYPOINT [ "/bin/typst" ] diff --git a/NOTICE b/NOTICE index 18ed0c621ba0..4b40cba18f67 100644 --- a/NOTICE +++ b/NOTICE @@ -1,163 +1,20 @@ Licenses for third party components used by this project can be found below. -================================================================================ -The Creative Commons Zero v1.0 Universal License applies to: -* The ICC profiles found in `crates/typst/icc/*` - -CC0 1.0 Universal - -Statement of Purpose - -The laws of most jurisdictions throughout the world automatically confer -exclusive Copyright and Related Rights (defined below) upon the creator and -subsequent owner(s) (each and all, an "owner") of an original work of -authorship and/or a database (each, a "Work"). - -Certain owners wish to permanently relinquish those rights to a Work for the -purpose of contributing to a commons of creative, cultural and scientific -works ("Commons") that the public can reliably and without fear of later -claims of infringement build upon, modify, incorporate in other works, reuse -and redistribute as freely as possible in any form whatsoever and for any -purposes, including without limitation commercial purposes. These owners may -contribute to the Commons to promote the ideal of a free culture and the -further production of creative, cultural and scientific works, or to gain -reputation or greater distribution for their Work in part through the use and -efforts of others. - -For these and/or other purposes and motivations, and without any expectation -of additional consideration or compensation, the person associating CC0 with a -Work (the "Affirmer"), to the extent that he or she is an owner of Copyright -and Related Rights in the Work, voluntarily elects to apply CC0 to the Work -and publicly distribute the Work under its terms, with knowledge of his or her -Copyright and Related Rights in the Work and the meaning and intended legal -effect of CC0 on those rights. - -1. Copyright and Related Rights. A Work made available under CC0 may be -protected by copyright and related or neighboring rights ("Copyright and -Related Rights"). Copyright and Related Rights include, but are not limited -to, the following: - - i. the right to reproduce, adapt, distribute, perform, display, communicate, - and translate a Work; - - ii. moral rights retained by the original author(s) and/or performer(s); - - iii. publicity and privacy rights pertaining to a person's image or likeness - depicted in a Work; - - iv. rights protecting against unfair competition in regards to a Work, - subject to the limitations in paragraph 4(a), below; - - v. rights protecting the extraction, dissemination, use and reuse of data in - a Work; - - vi. database rights (such as those arising under Directive 96/9/EC of the - European Parliament and of the Council of 11 March 1996 on the legal - protection of databases, and under any national implementation thereof, - including any amended or successor version of such directive); and - - vii. other similar, equivalent or corresponding rights throughout the world - based on applicable law or treaty, and any national implementations thereof. - -2. Waiver. To the greatest extent permitted by, but not in contravention of, -applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and -unconditionally waives, abandons, and surrenders all of Affirmer's Copyright -and Related Rights and associated claims and causes of action, whether now -known or unknown (including existing as well as future claims and causes of -action), in the Work (i) in all territories worldwide, (ii) for the maximum -duration provided by applicable law or treaty (including future time -extensions), (iii) in any current or future medium and for any number of -copies, and (iv) for any purpose whatsoever, including without limitation -commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes -the Waiver for the benefit of each member of the public at large and to the -detriment of Affirmer's heirs and successors, fully intending that such Waiver -shall not be subject to revocation, rescission, cancellation, termination, or -any other legal or equitable action to disrupt the quiet enjoyment of the Work -by the public as contemplated by Affirmer's express Statement of Purpose. - -3. Public License Fallback. Should any part of the Waiver for any reason be -judged legally invalid or ineffective under applicable law, then the Waiver -shall be preserved to the maximum extent permitted taking into account -Affirmer's express Statement of Purpose. In addition, to the extent the Waiver -is so judged Affirmer hereby grants to each affected person a royalty-free, -non transferable, non sublicensable, non exclusive, irrevocable and -unconditional license to exercise Affirmer's Copyright and Related Rights in -the Work (i) in all territories worldwide, (ii) for the maximum duration -provided by applicable law or treaty (including future time extensions), (iii) -in any current or future medium and for any number of copies, and (iv) for any -purpose whatsoever, including without limitation commercial, advertising or -promotional purposes (the "License"). The License shall be deemed effective as -of the date CC0 was applied by Affirmer to the Work. Should any part of the -License for any reason be judged legally invalid or ineffective under -applicable law, such partial invalidity or ineffectiveness shall not -invalidate the remainder of the License, and in such case Affirmer hereby -affirms that he or she will not (i) exercise any of his or her remaining -Copyright and Related Rights in the Work or (ii) assert any associated claims -and causes of action with respect to the Work, in either case contrary to -Affirmer's express Statement of Purpose. - -4. Limitations and Disclaimers. - - a. No trademark or patent rights held by Affirmer are waived, abandoned, - surrendered, licensed or otherwise affected by this document. - - b. Affirmer offers the Work as-is and makes no representations or warranties - of any kind concerning the Work, express, implied, statutory or otherwise, - including without limitation warranties of title, merchantability, fitness - for a particular purpose, non infringement, or the absence of latent or - other defects, accuracy, or the present or absence of errors, whether or not - discoverable, all to the greatest extent permissible under applicable law. - - c. Affirmer disclaims responsibility for clearing rights of other persons - that may apply to the Work or any use thereof, including without limitation - any person's Copyright and Related Rights in the Work. Further, Affirmer - disclaims responsibility for obtaining any necessary consents, permissions - or other rights required for any use of the Work. - - d. Affirmer understands and acknowledges that Creative Commons is not a - party to this document and has no duty or obligation with respect to this - CC0 or use of the Work. - -For more information, please see -http://creativecommons.org/publicdomain/zero/1.0/ - -================================================================================ -The 0BSD License applies to: - -* The S-Expression sublime-syntax in `assets/files/SExpressions.sublime-syntax` - which is adapted from the S-Expression syntax definition in the Sublime Text - package `S-Expressions` (https://github.com/whitequark/Sublime-S-Expressions) - -BSD Zero Clause License (0BSD) - -Permission to use, copy, modify, and/or distribute this software for -any purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN -AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT -OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -================================================================================ - ================================================================================ The MIT License applies to: -* The tmTheme in `assets/files/halcyon.tmTheme` - Copyright (c) 2018 Brittany Chiang - in the Sublime Text package `Halcyon` (https://github.com/bchiang7/Halcyon) - -* The default color set defined in `crates/typst/src/geom/color.rs` which is - adapted from the colors.css project +* The default color set defined in `crates/typst/src/visualize/color.rs` which + is adapted from the colors.css project (https://clrs.cc/) -* The `RemoteReader` defined in `crates/typst-cli/src/download.rs` which is - closely modelled after the `DownloadTracker` from rustup +* The `RemoteReader` defined in `crates/typst-kit/src/download.rs` which is + closely modelled after the `DownloadTracker` from rustup (https://github.com/rust-lang/rustup/blob/master/src/cli/download_tracker.rs) +* The `SyntaxSet` defined in `crates/typst-syntax/src/set.rs` which is + based on the `TokenSet` from rust-analyzer + (https://github.com/rust-lang/rust-analyzer/blob/master/crates/parser/src/token_set.rs) + The MIT License (MIT) Permission is hereby granted, free of charge, to any person obtaining a copy @@ -181,7 +38,7 @@ THE SOFTWARE. ================================================================================ Alpha multiplication and source-over blending in -`crates/typst/src/export/render.rs` are ported from Skia code which can be found +`crates/typst-render/src/text.rs` are ported from Skia code which can be found here: https://skia.googlesource.com/skia/+/refs/heads/main/include/core/SkColorPriv.h @@ -213,1063 +70,3 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ================================================================================ - -================================================================================ -Syntaxes in `crates/typst-library/assets/syntect.bin` are generated from syntax -definitions which can be found here: -https://github.com/sharkdp/bat/tree/master/assets/syntaxes - -The syntax definitions are used under their respective licenses. -================================================================================ - -================================================================================ -The SIL Open Font License Version 1.1 applies to: - -* IBM Plex fonts in assets/fonts/IBMPlex*.ttf - Copyright © 2017 IBM Corp. with Reserved Font Name "Plex" - (https://github.com/IBM/plex) - -* Noto fonts in assets/fonts/Noto*.ttf - Copyright 2018 The Noto Project Authors - (https://github.com/googlei18n/noto-fonts) - -* PT Sans fonts in assets/fonts/PTSans*.ttf - Copyright (c) 2010, ParaType Ltd. (http://www.paratype.com/public), - with Reserved Font Names "PT Sans" and "ParaType". - -* Fira Math fonts in assets/fonts/FiraMath*.otf - Copyright (C) 2018--2021 by Xiangdong Zeng - (https://github.com/firamath/firamath) - -* Inria fonts in assets/fonts/Inria*.ttf - Copyright 2017 The Inria Sans Project Authors - (https://github.com/BlackFoundryCom/InriaFonts) - -* Linux Libertine fonts in assets/fonts/LinLibertine*.ttf - Copyright (c) 2003–2012, Philipp H. Poll - (www.linuxlibertine.org | gillian at linuxlibertine.org), - with Reserved Font Name "Linux Libertine" and "Biolinum". - ------------------------------------------------------------ -SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 ------------------------------------------------------------ - -PREAMBLE -The goals of the Open Font License (OFL) are to stimulate worldwide -development of collaborative font projects, to support the font creation -efforts of academic and linguistic communities, and to provide a free and -open framework in which fonts may be shared and improved in partnership -with others. - -The OFL allows the licensed fonts to be used, studied, modified and -redistributed freely as long as they are not sold by themselves. The -fonts, including any derivative works, can be bundled, embedded, -redistributed and/or sold with any software provided that any reserved -names are not used by derivative works. The fonts and derivatives, -however, cannot be released under any other type of license. The -requirement for fonts to remain under this license does not apply -to any document created using the fonts or their derivatives. - -DEFINITIONS -"Font Software" refers to the set of files released by the Copyright -Holder(s) under this license and clearly marked as such. This may -include source files, build scripts and documentation. - -"Reserved Font Name" refers to any names specified as such after the -copyright statement(s). - -"Original Version" refers to the collection of Font Software components as -distributed by the Copyright Holder(s). - -"Modified Version" refers to any derivative made by adding to, deleting, -or substituting -- in part or in whole -- any of the components of the -Original Version, by changing formats or by porting the Font Software to a -new environment. - -"Author" refers to any designer, engineer, programmer, technical -writer or other person who contributed to the Font Software. - -PERMISSION & CONDITIONS -Permission is hereby granted, free of charge, to any person obtaining -a copy of the Font Software, to use, study, copy, merge, embed, modify, -redistribute, and sell modified and unmodified copies of the Font -Software, subject to the following conditions: - -1) Neither the Font Software nor any of its individual components, -in Original or Modified Versions, may be sold by itself. - -2) Original or Modified Versions of the Font Software may be bundled, -redistributed and/or sold with any software, provided that each copy -contains the above copyright notice and this license. These can be -included either as stand-alone text files, human-readable headers or -in the appropriate machine-readable metadata fields within text or -binary files as long as those fields can be easily viewed by the user. - -3) No Modified Version of the Font Software may use the Reserved Font -Name(s) unless explicit written permission is granted by the corresponding -Copyright Holder. This restriction only applies to the primary font name as -presented to the users. - -4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font -Software shall not be used to promote, endorse or advertise any -Modified Version, except to acknowledge the contribution(s) of the -Copyright Holder(s) and the Author(s) or with their explicit written -permission. - -5) The Font Software, modified or unmodified, in part or in whole, -must be distributed entirely under this license, and must not be -distributed under any other license. The requirement for fonts to -remain under this license does not apply to any document created -using the Font Software. - -TERMINATION -This license becomes null and void if any of the above conditions are -not met. - -DISCLAIMER -THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE -COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL -DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM -OTHER DEALINGS IN THE FONT SOFTWARE. -================================================================================ - -================================================================================ -The Apache License Version 2.0 applies to: - -* Roboto fonts in assets/fonts/Roboto*.ttf - (https://github.com/googlefonts/roboto) - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS -================================================================================ - -================================================================================ -The Ubuntu Font License Version 1.0 applies to: - -* Ubuntu fonts in assets/fonts/Ubuntu*.ttf - (https://design.ubuntu.com/font/) - -------------------------------- -UBUNTU FONT LICENCE Version 1.0 -------------------------------- - -PREAMBLE -This licence allows the licensed fonts to be used, studied, modified and -redistributed freely. The fonts, including any derivative works, can be -bundled, embedded, and redistributed provided the terms of this licence -are met. The fonts and derivatives, however, cannot be released under -any other licence. The requirement for fonts to remain under this -licence does not require any document created using the fonts or their -derivatives to be published under this licence, as long as the primary -purpose of the document is not to be a vehicle for the distribution of -the fonts. - -DEFINITIONS -"Font Software" refers to the set of files released by the Copyright -Holder(s) under this licence and clearly marked as such. This may -include source files, build scripts and documentation. - -"Original Version" refers to the collection of Font Software components -as received under this licence. - -"Modified Version" refers to any derivative made by adding to, deleting, -or substituting -- in part or in whole -- any of the components of the -Original Version, by changing formats or by porting the Font Software to -a new environment. - -"Copyright Holder(s)" refers to all individuals and companies who have a -copyright ownership of the Font Software. - -"Substantially Changed" refers to Modified Versions which can be easily -identified as dissimilar to the Font Software by users of the Font -Software comparing the Original Version with the Modified Version. - -To "Propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification and with or without charging -a redistribution fee), making available to the public, and in some -countries other activities as well. - -PERMISSION & CONDITIONS -This licence does not grant any rights under trademark law and all such -rights are reserved. - -Permission is hereby granted, free of charge, to any person obtaining a -copy of the Font Software, to propagate the Font Software, subject to -the below conditions: - -1) Each copy of the Font Software must contain the above copyright -notice and this licence. These can be included either as stand-alone -text files, human-readable headers or in the appropriate machine- -readable metadata fields within text or binary files as long as those -fields can be easily viewed by the user. - -2) The font name complies with the following: -(a) The Original Version must retain its name, unmodified. -(b) Modified Versions which are Substantially Changed must be renamed to -avoid use of the name of the Original Version or similar names entirely. -(c) Modified Versions which are not Substantially Changed must be -renamed to both (i) retain the name of the Original Version and (ii) add -additional naming elements to distinguish the Modified Version from the -Original Version. The name of such Modified Versions must be the name of -the Original Version, with "derivative X" where X represents the name of -the new work, appended to that name. - -3) The name(s) of the Copyright Holder(s) and any contributor to the -Font Software shall not be used to promote, endorse or advertise any -Modified Version, except (i) as required by this licence, (ii) to -acknowledge the contribution(s) of the Copyright Holder(s) or (iii) with -their explicit written permission. - -4) The Font Software, modified or unmodified, in part or in whole, must -be distributed entirely under this licence, and must not be distributed -under any other licence. The requirement for fonts to remain under this -licence does not affect any document created using the Font Software, -except any version of the Font Software extracted from a document -created using the Font Software may only be distributed under this -licence. - -TERMINATION -This licence becomes null and void if any of the above conditions are -not met. - -DISCLAIMER -THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF -COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE -COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL -DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER -DEALINGS IN THE FONT SOFTWARE. - -================================================================================ - -================================================================================ -The GUST Font License Version 1.0 applies to: - -* Latin Modern fonts in assets/fonts/LatinModern*.otf - (http://www.gust.org.pl/projects/e-foundry/lm-math) - -* NewComputerModern fonts in assets/fonts/NewCM*.otf - -% This is version 1.0, dated 22 June 2009, of the GUST Font License. -% (GUST is the Polish TeX Users Group, http://www.gust.org.pl) -% -% For the most recent version of this license see -% http://www.gust.org.pl/fonts/licenses/GUST-FONT-LICENSE.txt -% or -% http://tug.org/fonts/licenses/GUST-FONT-LICENSE.txt -% -% This work may be distributed and/or modified under the conditions -% of the LaTeX Project Public License, either version 1.3c of this -% license or (at your option) any later version. -% -% Please also observe the following clause: -% 1) it is requested, but not legally required, that derived works be -% distributed only after changing the names of the fonts comprising this -% work and given in an accompanying "manifest", and that the -% files comprising the Work, as listed in the manifest, also be given -% new names. Any exceptions to this request are also given in the -% manifest. -% -% We recommend the manifest be given in a separate file named -% MANIFEST-.txt, where is some unique identification -% of the font family. If a separate "readme" file accompanies the Work, -% we recommend a name of the form README-.txt. -% -% The latest version of the LaTeX Project Public License is in -% http://www.latex-project.org/lppl.txt and version 1.3c or later -% is part of all distributions of LaTeX version 2006/05/20 or later. -================================================================================ - -================================================================================ -The Creative Commons Attribution 4.0 International License applies to: - -* Twitter Color Emoji font in assets/fonts/TwitterColorEmoji.ttf - Copyright 2016 Brad Erickson - Copyright 2016 Twitter, Inc. - (https://github.com/eosrei/twemoji-color-font) - -* SVG icons in tools/test-helper/images - These are slightly modified versions of emojis from the Twemoji emoji set. - Copyright 2020 Twitter, Inc and other contributors - (https://github.com/twitter/twemoji) - -* Monkey emoji in assets/files/monkey.svg - Copyright 2018 Vincent Le Moign, Streamline Emoji Project - Via Wikimedia Commons - (https://commons.wikimedia.org/wiki/File:440-monkey.svg) - Partially minified using SVGO - -Attribution 4.0 International - -======================================================================= - -Creative Commons Corporation ("Creative Commons") is not a law firm and -does not provide legal services or legal advice. Distribution of -Creative Commons public licenses does not create a lawyer-client or -other relationship. Creative Commons makes its licenses and related -information available on an "as-is" basis. Creative Commons gives no -warranties regarding its licenses, any material licensed under their -terms and conditions, or any related information. Creative Commons -disclaims all liability for damages resulting from their use to the -fullest extent possible. - -Using Creative Commons Public Licenses - -Creative Commons public licenses provide a standard set of terms and -conditions that creators and other rights holders may use to share -original works of authorship and other material subject to copyright -and certain other rights specified in the public license below. The -following considerations are for informational purposes only, are not -exhaustive, and do not form part of our licenses. - - Considerations for licensors: Our public licenses are - intended for use by those authorized to give the public - permission to use material in ways otherwise restricted by - copyright and certain other rights. Our licenses are - irrevocable. Licensors should read and understand the terms - and conditions of the license they choose before applying it. - Licensors should also secure all rights necessary before - applying our licenses so that the public can reuse the - material as expected. Licensors should clearly mark any - material not subject to the license. This includes other CC- - licensed material, or material used under an exception or - limitation to copyright. More considerations for licensors: - wiki.creativecommons.org/Considerations_for_licensors - - Considerations for the public: By using one of our public - licenses, a licensor grants the public permission to use the - licensed material under specified terms and conditions. If - the licensor's permission is not necessary for any reason--for - example, because of any applicable exception or limitation to - copyright--then that use is not regulated by the license. Our - licenses grant only permissions under copyright and certain - other rights that a licensor has authority to grant. Use of - the licensed material may still be restricted for other - reasons, including because others have copyright or other - rights in the material. A licensor may make special requests, - such as asking that all changes be marked or described. - Although not required by our licenses, you are encouraged to - respect those requests where reasonable. More_considerations - for the public: - wiki.creativecommons.org/Considerations_for_licensees - -======================================================================= - -Creative Commons Attribution 4.0 International Public License - -By exercising the Licensed Rights (defined below), You accept and agree -to be bound by the terms and conditions of this Creative Commons -Attribution 4.0 International Public License ("Public License"). To the -extent this Public License may be interpreted as a contract, You are -granted the Licensed Rights in consideration of Your acceptance of -these terms and conditions, and the Licensor grants You such rights in -consideration of benefits the Licensor receives from making the -Licensed Material available under these terms and conditions. - - -Section 1 -- Definitions. - - a. Adapted Material means material subject to Copyright and Similar - Rights that is derived from or based upon the Licensed Material - and in which the Licensed Material is translated, altered, - arranged, transformed, or otherwise modified in a manner requiring - permission under the Copyright and Similar Rights held by the - Licensor. For purposes of this Public License, where the Licensed - Material is a musical work, performance, or sound recording, - Adapted Material is always produced where the Licensed Material is - synched in timed relation with a moving image. - - b. Adapter's License means the license You apply to Your Copyright - and Similar Rights in Your contributions to Adapted Material in - accordance with the terms and conditions of this Public License. - - c. Copyright and Similar Rights means copyright and/or similar rights - closely related to copyright including, without limitation, - performance, broadcast, sound recording, and Sui Generis Database - Rights, without regard to how the rights are labeled or - categorized. For purposes of this Public License, the rights - specified in Section 2(b)(1)-(2) are not Copyright and Similar - Rights. - - d. Effective Technological Measures means those measures that, in the - absence of proper authority, may not be circumvented under laws - fulfilling obligations under Article 11 of the WIPO Copyright - Treaty adopted on December 20, 1996, and/or similar international - agreements. - - e. Exceptions and Limitations means fair use, fair dealing, and/or - any other exception or limitation to Copyright and Similar Rights - that applies to Your use of the Licensed Material. - - f. Licensed Material means the artistic or literary work, database, - or other material to which the Licensor applied this Public - License. - - g. Licensed Rights means the rights granted to You subject to the - terms and conditions of this Public License, which are limited to - all Copyright and Similar Rights that apply to Your use of the - Licensed Material and that the Licensor has authority to license. - - h. Licensor means the individual(s) or entity(ies) granting rights - under this Public License. - - i. Share means to provide material to the public by any means or - process that requires permission under the Licensed Rights, such - as reproduction, public display, public performance, distribution, - dissemination, communication, or importation, and to make material - available to the public including in ways that members of the - public may access the material from a place and at a time - individually chosen by them. - - j. Sui Generis Database Rights means rights other than copyright - resulting from Directive 96/9/EC of the European Parliament and of - the Council of 11 March 1996 on the legal protection of databases, - as amended and/or succeeded, as well as other essentially - equivalent rights anywhere in the world. - - k. You means the individual or entity exercising the Licensed Rights - under this Public License. Your has a corresponding meaning. - - -Section 2 -- Scope. - - a. License grant. - - 1. Subject to the terms and conditions of this Public License, - the Licensor hereby grants You a worldwide, royalty-free, - non-sublicensable, non-exclusive, irrevocable license to - exercise the Licensed Rights in the Licensed Material to: - - a. reproduce and Share the Licensed Material, in whole or - in part; and - - b. produce, reproduce, and Share Adapted Material. - - 2. Exceptions and Limitations. For the avoidance of doubt, where - Exceptions and Limitations apply to Your use, this Public - License does not apply, and You do not need to comply with - its terms and conditions. - - 3. Term. The term of this Public License is specified in Section - 6(a). - - 4. Media and formats; technical modifications allowed. The - Licensor authorizes You to exercise the Licensed Rights in - all media and formats whether now known or hereafter created, - and to make technical modifications necessary to do so. The - Licensor waives and/or agrees not to assert any right or - authority to forbid You from making technical modifications - necessary to exercise the Licensed Rights, including - technical modifications necessary to circumvent Effective - Technological Measures. For purposes of this Public License, - simply making modifications authorized by this Section 2(a) - (4) never produces Adapted Material. - - 5. Downstream recipients. - - a. Offer from the Licensor -- Licensed Material. Every - recipient of the Licensed Material automatically - receives an offer from the Licensor to exercise the - Licensed Rights under the terms and conditions of this - Public License. - - b. No downstream restrictions. You may not offer or impose - any additional or different terms or conditions on, or - apply any Effective Technological Measures to, the - Licensed Material if doing so restricts exercise of the - Licensed Rights by any recipient of the Licensed - Material. - - 6. No endorsement. Nothing in this Public License constitutes or - may be construed as permission to assert or imply that You - are, or that Your use of the Licensed Material is, connected - with, or sponsored, endorsed, or granted official status by, - the Licensor or others designated to receive attribution as - provided in Section 3(a)(1)(A)(i). - - b. Other rights. - - 1. Moral rights, such as the right of integrity, are not - licensed under this Public License, nor are publicity, - privacy, and/or other similar personality rights; however, to - the extent possible, the Licensor waives and/or agrees not to - assert any such rights held by the Licensor to the limited - extent necessary to allow You to exercise the Licensed - Rights, but not otherwise. - - 2. Patent and trademark rights are not licensed under this - Public License. - - 3. To the extent possible, the Licensor waives any right to - collect royalties from You for the exercise of the Licensed - Rights, whether directly or through a collecting society - under any voluntary or waivable statutory or compulsory - licensing scheme. In all other cases the Licensor expressly - reserves any right to collect such royalties. - - -Section 3 -- License Conditions. - -Your exercise of the Licensed Rights is expressly made subject to the -following conditions. - - a. Attribution. - - 1. If You Share the Licensed Material (including in modified - form), You must: - - a. retain the following if it is supplied by the Licensor - with the Licensed Material: - - i. identification of the creator(s) of the Licensed - Material and any others designated to receive - attribution, in any reasonable manner requested by - the Licensor (including by pseudonym if - designated); - - ii. a copyright notice; - - iii. a notice that refers to this Public License; - - iv. a notice that refers to the disclaimer of - warranties; - - v. a URI or hyperlink to the Licensed Material to the - extent reasonably practicable; - - b. indicate if You modified the Licensed Material and - retain an indication of any previous modifications; and - - c. indicate the Licensed Material is licensed under this - Public License, and include the text of, or the URI or - hyperlink to, this Public License. - - 2. You may satisfy the conditions in Section 3(a)(1) in any - reasonable manner based on the medium, means, and context in - which You Share the Licensed Material. For example, it may be - reasonable to satisfy the conditions by providing a URI or - hyperlink to a resource that includes the required - information. - - 3. If requested by the Licensor, You must remove any of the - information required by Section 3(a)(1)(A) to the extent - reasonably practicable. - - 4. If You Share Adapted Material You produce, the Adapter's - License You apply must not prevent recipients of the Adapted - Material from complying with this Public License. - - -Section 4 -- Sui Generis Database Rights. - -Where the Licensed Rights include Sui Generis Database Rights that -apply to Your use of the Licensed Material: - - a. for the avoidance of doubt, Section 2(a)(1) grants You the right - to extract, reuse, reproduce, and Share all or a substantial - portion of the contents of the database; - - b. if You include all or a substantial portion of the database - contents in a database in which You have Sui Generis Database - Rights, then the database in which You have Sui Generis Database - Rights (but not its individual contents) is Adapted Material; and - - c. You must comply with the conditions in Section 3(a) if You Share - all or a substantial portion of the contents of the database. - -For the avoidance of doubt, this Section 4 supplements and does not -replace Your obligations under this Public License where the Licensed -Rights include other Copyright and Similar Rights. - - -Section 5 -- Disclaimer of Warranties and Limitation of Liability. - - a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE - EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS - AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF - ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, - IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, - WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR - PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, - ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT - KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT - ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. - - b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE - TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, - NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, - INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, - COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR - USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN - ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR - DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR - IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. - - c. The disclaimer of warranties and limitation of liability provided - above shall be interpreted in a manner that, to the extent - possible, most closely approximates an absolute disclaimer and - waiver of all liability. - - -Section 6 -- Term and Termination. - - a. This Public License applies for the term of the Copyright and - Similar Rights licensed here. However, if You fail to comply with - this Public License, then Your rights under this Public License - terminate automatically. - - b. Where Your right to use the Licensed Material has terminated under - Section 6(a), it reinstates: - - 1. automatically as of the date the violation is cured, provided - it is cured within 30 days of Your discovery of the - violation; or - - 2. upon express reinstatement by the Licensor. - - For the avoidance of doubt, this Section 6(b) does not affect any - right the Licensor may have to seek remedies for Your violations - of this Public License. - - c. For the avoidance of doubt, the Licensor may also offer the - Licensed Material under separate terms or conditions or stop - distributing the Licensed Material at any time; however, doing so - will not terminate this Public License. - - d. Sections 1, 5, 6, 7, and 8 survive termination of this Public - License. - - -Section 7 -- Other Terms and Conditions. - - a. The Licensor shall not be bound by any additional or different - terms or conditions communicated by You unless expressly agreed. - - b. Any arrangements, understandings, or agreements regarding the - Licensed Material not stated herein are separate from and - independent of the terms and conditions of this Public License. - - -Section 8 -- Interpretation. - - a. For the avoidance of doubt, this Public License does not, and - shall not be interpreted to, reduce, limit, restrict, or impose - conditions on any use of the Licensed Material that could lawfully - be made without permission under this Public License. - - b. To the extent possible, if any provision of this Public License is - deemed unenforceable, it shall be automatically reformed to the - minimum extent necessary to make it enforceable. If the provision - cannot be reformed, it shall be severed from this Public License - without affecting the enforceability of the remaining terms and - conditions. - - c. No term or condition of this Public License will be waived and no - failure to comply consented to unless expressly agreed to by the - Licensor. - - d. Nothing in this Public License constitutes or may be interpreted - as a limitation upon, or waiver of, any privileges and immunities - that apply to the Licensor or You, including from the legal - processes of any jurisdiction or authority. - - -======================================================================= - -Creative Commons is not a party to its public licenses. -Notwithstanding, Creative Commons may elect to apply one of its public -licenses to material it publishes and in those instances will be -considered the "Licensor." Except for the limited purpose of indicating -that material is shared under a Creative Commons public license or as -otherwise permitted by the Creative Commons policies published at -creativecommons.org/policies, Creative Commons does not authorize the -use of the trademark "Creative Commons" or any other trademark or logo -of Creative Commons without its prior written consent including, -without limitation, in connection with any unauthorized modifications -to any of its public licenses or any other arrangements, -understandings, or agreements concerning use of licensed material. For -the avoidance of doubt, this paragraph does not form part of the public -licenses. - -Creative Commons may be contacted at creativecommons.org. -================================================================================ - -================================================================================ -The terms below apply to: - -* DejaVu fonts in assets/fonts/DejaVu*.ttf - (https://github.com/dejavu-fonts/dejavu-fonts) - -Fonts are (c) Bitstream (see below). DejaVu changes are in public domain. -Glyphs imported from Arev fonts are (c) Tavmjong Bah (see below) - - -Bitstream Vera Fonts Copyright ------------------------------- - -Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved. Bitstream Vera is -a trademark of Bitstream, Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of the fonts accompanying this license ("Fonts") and associated -documentation files (the "Font Software"), to reproduce and distribute the -Font Software, including without limitation the rights to use, copy, merge, -publish, distribute, and/or sell copies of the Font Software, and to permit -persons to whom the Font Software is furnished to do so, subject to the -following conditions: - -The above copyright and trademark notices and this permission notice shall -be included in all copies of one or more of the Font Software typefaces. - -The Font Software may be modified, altered, or added to, and in particular -the designs of glyphs or characters in the Fonts may be modified and -additional glyphs or characters may be added to the Fonts, only if the fonts -are renamed to names not containing either the words "Bitstream" or the word -"Vera". - -This License becomes null and void to the extent applicable to Fonts or Font -Software that has been modified and is distributed under the "Bitstream -Vera" names. - -The Font Software may be sold as part of a larger software package but no -copy of one or more of the Font Software typefaces may be sold by itself. - -THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, -TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL BITSTREAM OR THE GNOME -FOUNDATION BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING -ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF -THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE -FONT SOFTWARE. - -Except as contained in this notice, the names of Gnome, the Gnome -Foundation, and Bitstream Inc., shall not be used in advertising or -otherwise to promote the sale, use or other dealings in this Font Software -without prior written authorization from the Gnome Foundation or Bitstream -Inc., respectively. For further information, contact: fonts at gnome dot -org. - -Arev Fonts Copyright ------------------------------- - -Copyright (c) 2006 by Tavmjong Bah. All Rights Reserved. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of the fonts accompanying this license ("Fonts") and -associated documentation files (the "Font Software"), to reproduce -and distribute the modifications to the Bitstream Vera Font Software, -including without limitation the rights to use, copy, merge, publish, -distribute, and/or sell copies of the Font Software, and to permit -persons to whom the Font Software is furnished to do so, subject to -the following conditions: - -The above copyright and trademark notices and this permission notice -shall be included in all copies of one or more of the Font Software -typefaces. - -The Font Software may be modified, altered, or added to, and in -particular the designs of glyphs or characters in the Fonts may be -modified and additional glyphs or characters may be added to the -Fonts, only if the fonts are renamed to names not containing either -the words "Tavmjong Bah" or the word "Arev". - -This License becomes null and void to the extent applicable to Fonts -or Font Software that has been modified and is distributed under the -"Tavmjong Bah Arev" names. - -The Font Software may be sold as part of a larger software package but -no copy of one or more of the Font Software typefaces may be sold by -itself. - -THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL -TAVMJONG BAH BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL -DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM -OTHER DEALINGS IN THE FONT SOFTWARE. - -Except as contained in this notice, the name of Tavmjong Bah shall not -be used in advertising or otherwise to promote the sale, use or other -dealings in this Font Software without prior written authorization -from Tavmjong Bah. For further information, contact: tavmjong @ free -. fr. - -TeX Gyre DJV Math ------------------ -Fonts are (c) Bitstream (see below). DejaVu changes are in public domain. - -Math extensions done by B. Jackowski, P. Strzelczyk and P. Pianowski -(on behalf of TeX users groups) are in public domain. - -Letters imported from Euler Fraktur from AMSfonts are (c) American -Mathematical Society (see below). -Bitstream Vera Fonts Copyright -Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved. Bitstream Vera -is a trademark of Bitstream, Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of the fonts accompanying this license (“Fonts”) and associated -documentation -files (the “Font Software”), to reproduce and distribute the Font Software, -including without limitation the rights to use, copy, merge, publish, -distribute, -and/or sell copies of the Font Software, and to permit persons to whom -the Font Software is furnished to do so, subject to the following -conditions: - -The above copyright and trademark notices and this permission notice -shall be -included in all copies of one or more of the Font Software typefaces. - -The Font Software may be modified, altered, or added to, and in particular -the designs of glyphs or characters in the Fonts may be modified and -additional -glyphs or characters may be added to the Fonts, only if the fonts are -renamed -to names not containing either the words “Bitstream” or the word “Vera”. - -This License becomes null and void to the extent applicable to Fonts or -Font Software -that has been modified and is distributed under the “Bitstream Vera” -names. - -The Font Software may be sold as part of a larger software package but -no copy -of one or more of the Font Software typefaces may be sold by itself. - -THE FONT SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, -TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL BITSTREAM OR THE GNOME -FOUNDATION -BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, -SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN -ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR -INABILITY TO USE -THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE. -Except as contained in this notice, the names of GNOME, the GNOME -Foundation, -and Bitstream Inc., shall not be used in advertising or otherwise to promote -the sale, use or other dealings in this Font Software without prior written -authorization from the GNOME Foundation or Bitstream Inc., respectively. -For further information, contact: fonts at gnome dot org. - -AMSFonts (v. 2.2) copyright - -The PostScript Type 1 implementation of the AMSFonts produced by and -previously distributed by Blue Sky Research and Y&Y, Inc. are now freely -available for general use. This has been accomplished through the -cooperation -of a consortium of scientific publishers with Blue Sky Research and Y&Y. -Members of this consortium include: - -Elsevier Science IBM Corporation Society for Industrial and Applied -Mathematics (SIAM) Springer-Verlag American Mathematical Society (AMS) - -In order to assure the authenticity of these fonts, copyright will be -held by -the American Mathematical Society. This is not meant to restrict in any way -the legitimate use of the fonts, such as (but not limited to) electronic -distribution of documents containing these fonts, inclusion of these fonts -into other public domain or commercial font collections or computer -applications, use of the outline data to create derivative fonts and/or -faces, etc. However, the AMS does require that the AMS copyright notice be -removed from any derivative versions of the fonts which have been altered in -any way. In addition, to ensure the fidelity of TeX documents using Computer -Modern fonts, Professor Donald Knuth, creator of the Computer Modern faces, -has requested that any alterations which yield different font metrics be -given a different name. - -$Id$ -================================================================================ diff --git a/README.md b/README.md index 016d821a99f2..675c7bdca0f5 100644 --- a/README.md +++ b/README.md @@ -4,20 +4,20 @@

- Documentation - + Documentation - Typst App - + Typst App - Discord Server - + Discord Server - Apache-2 License - + Apache-2 License - Jobs at Typst - + Jobs at Typst

Typst is a new markup-based typesetting system that is designed to be as powerful @@ -32,15 +32,14 @@ as LaTeX while being much easier to learn and use. Typst has: This repository contains the Typst compiler and its CLI, which is everything you need to compile Typst documents locally. For the best writing experience, -consider signing up to our [collaborative online editor][app] for free. It is -currently in public beta. +consider signing up to our [collaborative online editor][app] for free. ## Example A [gentle introduction][tutorial] to Typst is available in our documentation. However, if you want to see the power of Typst encapsulated in one image, here it is:

- Example + Example

@@ -57,7 +56,7 @@ Let's dissect what's going on: markup like this, see the [syntax] reference for a full list. - [Mathematical equations][math] are enclosed in dollar signs. By adding extra - spaces around the contents of a equation, we can put it into a separate block. + spaces around the contents of an equation, we can put it into a separate block. Multi-letter identifiers are interpreted as Typst definitions and functions unless put into quotes. This way, we don't need backslashes for things like `floor` and `sqrt`. And `phi.alt` applies the `alt` modifier to the `phi` to @@ -114,20 +113,25 @@ Typst's CLI is available from different sources: - You can install Typst through different package managers. Note that the versions in the package managers might lag behind the latest release. - - Linux: View [Typst on Repology][repology] + - Linux: + - View [Typst on Repology][repology] + - View [Typst's Snap][snap] - macOS: `brew install typst` - Windows: `winget install --id Typst.Typst` -- If you have a [Rust][rust] toolchain installed, you can also install the - latest development version with - `cargo install --git https://github.com/typst/typst`. Note that this will - be a "nightly" version that may be broken or not yet properly documented. +- If you have a [Rust][rust] toolchain installed, you can install + - the latest released Typst version with + `cargo install --locked typst-cli` + - a development version with + `cargo install --git https://github.com/typst/typst --locked typst-cli` -- Nix users can use the `typst` package with `nix-shell -p typst` or build and - run the bleeding edge version with `nix run github:typst/typst -- --version`. +- Nix users can + - use the `typst` package with `nix-shell -p typst` + - build and run a development version with + `nix run github:typst/typst -- --version`. - Docker users can run a prebuilt image with - `docker run -it ghcr.io/typst/typst:latest`. + `docker run ghcr.io/typst/typst:latest --help`. ## Usage Once you have installed Typst, you can use it like this: @@ -169,27 +173,29 @@ typst help typst help watch ``` -If you prefer an integrated IDE-like experience with autocompletion and instant -preview, you can also check out the [Typst web app][app], which is currently in -public beta. +If you prefer an integrated IDE-like experience with autocompletion and instant +preview, you can also check out our [free web app][app]. Alternatively, there is +a community-created language server called +[Tinymist](https://myriad-dreamin.github.io/tinymist/) which is integrated into +various editor extensions. ## Community -The main place where the community gathers is our [Discord server][discord]. -Feel free to join there to ask questions, help out others, share cool things -you created with Typst, or just to chat. +The main places where the community gathers are our [Forum][forum] and our +[Discord server][discord]. The Forum is a great place to ask questions, help +others, and share cool things you created with Typst. The Discord server is more +suitable for quicker questions, discussions about contributing, or just to chat. +We'd be happy to see you there! -Aside from that there are a few places where you can find things built by -the community: - -- The official [package list](https://typst.app/docs/packages) -- The [Awesome Typst](https://github.com/qjcg/awesome-typst) repository +[Typst Universe][universe] is where the community shares templates and packages. +If you want to share your own creations, you can submit them to our +[package repository][packages]. If you had a bad experience in our community, please [reach out to us][contact]. ## Contributing -We would love to see contributions from the community. If you experience bugs, -feel free to open an issue. If you would like to implement a new feature or bug -fix, please follow the steps outlined in the [contribution guide][contributing]. +We love to see contributions from the community. If you experience bugs, feel +free to open an issue. If you would like to implement a new feature or bug fix, +please follow the steps outlined in the [contribution guide][contributing]. To build Typst yourself, first ensure that you have the [latest stable Rust][rust] installed. Then, clone this repository and build the @@ -237,9 +243,31 @@ instant preview. To achieve these goals, we follow three core design principles: Luckily we have [`comemo`], a system for incremental compilation which does most of the hard work in the background. +## Acknowledgements + +We'd like to thank everyone who is supporting Typst's development, be it via +[GitHub sponsors] or elsewhere. In particular, special thanks[^1] go to: + +- [Posit](https://posit.co/blog/posit-and-typst/) for financing a full-time + compiler engineer +- [NLnet](https://nlnet.nl/) for supporting work on Typst via multiple grants + through the [NGI Zero Core](https://nlnet.nl/core) fund: + - Work on [HTML export](https://nlnet.nl/project/Typst-HTML/) + - Work on [PDF accessibility](https://nlnet.nl/project/Typst-Accessibility/) +- [Science & Startups](https://www.science-startups.berlin/) for having financed + Typst development from January through June 2023 via the Berlin Startup + Scholarship +- [Zerodha](https://zerodha.tech/blog/1-5-million-pdfs-in-25-minutes/) for their + generous one-time sponsorship + +[^1]: This list only includes contributions for our open-source work that exceed + or are expected to exceed €10K. + [docs]: https://typst.app/docs/ [app]: https://typst.app/ [discord]: https://discord.gg/2uDybryKPe +[forum]: https://forum.typst.app/ +[universe]: https://typst.app/universe/ [tutorial]: https://typst.app/docs/tutorial/ [show]: https://typst.app/docs/reference/styling/#show-rules [math]: https://typst.app/docs/reference/math/ @@ -253,3 +281,5 @@ instant preview. To achieve these goals, we follow three core design principles: [contributing]: https://github.com/typst/typst/blob/main/CONTRIBUTING.md [packages]: https://github.com/typst/packages/ [`comemo`]: https://github.com/typst/comemo/ +[snap]: https://snapcraft.io/typst +[GitHub sponsors]: https://github.com/sponsors/typst/ diff --git a/assets/files/1-writing-app.png b/assets/files/1-writing-app.png deleted file mode 100644 index 8e0d8836117c..000000000000 Binary files a/assets/files/1-writing-app.png and /dev/null differ diff --git a/assets/files/1-writing-upload.png b/assets/files/1-writing-upload.png deleted file mode 100644 index 51d6bee4cc25..000000000000 Binary files a/assets/files/1-writing-upload.png and /dev/null differ diff --git a/assets/files/2-formatting-autocomplete.png b/assets/files/2-formatting-autocomplete.png deleted file mode 100644 index e66a552058df..000000000000 Binary files a/assets/files/2-formatting-autocomplete.png and /dev/null differ diff --git a/assets/files/3-advanced-paper.png b/assets/files/3-advanced-paper.png deleted file mode 100644 index a8710a186ca0..000000000000 Binary files a/assets/files/3-advanced-paper.png and /dev/null differ diff --git a/assets/files/3-advanced-team-settings.png b/assets/files/3-advanced-team-settings.png deleted file mode 100644 index ce29269ba998..000000000000 Binary files a/assets/files/3-advanced-team-settings.png and /dev/null differ diff --git a/assets/files/SExpressions.sublime-syntax b/assets/files/SExpressions.sublime-syntax deleted file mode 100644 index 31c830a40fea..000000000000 --- a/assets/files/SExpressions.sublime-syntax +++ /dev/null @@ -1,73 +0,0 @@ -%YAML 1.2 ---- -name: S Expressions -file_extensions: ["sexp"] -scope: source.sexpr - -contexts: - main: - - match: '(;+).*$' - scope: comment.line.sexpr - captures: - 1: punctuation.definition.comment.sexpr - - match: '#;' - scope: punctuation.definition.comment.sexpr - push: comment - - match: '#\|' - scope: punctuation.definition.comment.sexpr - push: block_comment - - - match: '"' - scope: punctuation.definition.string.begin.sexpr - push: string_unquote - - match: '\d+\.\d+' - scope: constant.numeric.float.sexpr - - match: '\d+' - scope: constant.numeric.integer.sexpr - - match: '\w+' - scope: constant.other.sexpr - - match: '\(' - scope: punctuation.section.parens.begin.sexpr - push: main_rparen - - match: '\)' - scope: invalid.illegal.stray-paren-end - - string_unquote: - - meta_scope: string.quoted.double.sexpr - - match: '""' - scope: constant.character.escape.sexpr - - match: '"' - scope: punctuation.definition.string.end.sexpr - pop: true - - main_rparen: - - match: '\)' - scope: punctuation.section.parens.end.sexpr - pop: true - - include: main - - comment: - - meta_scope: comment.block.sexpr - - match: '\(' - set: comment_rparen - - comment_lparen: - - meta_scope: comment.block.sexpr - - match: '\(' - push: comment_rparen - - match: '\)' - scope: invalid.illegal.stray-paren-end - - comment_rparen: - - meta_scope: comment.block.sexpr - - match: '\)' - pop: true - - include: comment - - block_comment: - - meta_scope: comment.block.sexpr - - match: '#\|' - push: block_comment - - match: '\|#' - scope: punctuation.definition.comment.sexpr - pop: true diff --git a/assets/files/bad.bib b/assets/files/bad.bib deleted file mode 100644 index 41b4d63dfbe1..000000000000 --- a/assets/files/bad.bib +++ /dev/null @@ -1,6 +0,0 @@ -@article{arrgh, - title = {An‐arrgh‐chy: The Law and Economics of Pirate Organization}, - author = {Leeson, Peter T.}, - crossref = {polecon}, - date = {19XXX-XX-XX}, -} diff --git a/assets/files/bad.csv b/assets/files/bad.csv deleted file mode 100644 index 2c2696e964c1..000000000000 --- a/assets/files/bad.csv +++ /dev/null @@ -1,4 +0,0 @@ -A,B -1,2 -3,4,5 -6,7 diff --git a/assets/files/bad.json b/assets/files/bad.json deleted file mode 100644 index cd5d0366b7ed..000000000000 --- a/assets/files/bad.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "valid": true, - "invalid": True -} diff --git a/assets/files/bad.svg b/assets/files/bad.svg deleted file mode 100644 index b7828a619a71..000000000000 --- a/assets/files/bad.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - diff --git a/assets/files/bad.toml b/assets/files/bad.toml deleted file mode 100644 index ac326d8fa8c2..000000000000 --- a/assets/files/bad.toml +++ /dev/null @@ -1 +0,0 @@ -"only a string" diff --git a/assets/files/bad.txt b/assets/files/bad.txt deleted file mode 100644 index bb50896be440..000000000000 Binary files a/assets/files/bad.txt and /dev/null differ diff --git a/assets/files/bad.xml b/assets/files/bad.xml deleted file mode 100644 index 7fa6a6ede3f8..000000000000 --- a/assets/files/bad.xml +++ /dev/null @@ -1,3 +0,0 @@ - - 1 - diff --git a/assets/files/bad.yaml b/assets/files/bad.yaml deleted file mode 100644 index 8910432eeb53..000000000000 --- a/assets/files/bad.yaml +++ /dev/null @@ -1 +0,0 @@ -this_will_break: [) diff --git a/assets/files/chinese.svg b/assets/files/chinese.svg deleted file mode 100644 index b643e033a6fa..000000000000 --- a/assets/files/chinese.svg +++ /dev/null @@ -1,4 +0,0 @@ - - 此文本为中文。 - The text above is in Chinese. - diff --git a/assets/files/cylinder.svg b/assets/files/cylinder.svg deleted file mode 100644 index 32f691cb1e6f..000000000000 --- a/assets/files/cylinder.svg +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - diff --git a/assets/files/data.csv b/assets/files/data.csv deleted file mode 100644 index 3fce663fa931..000000000000 --- a/assets/files/data.csv +++ /dev/null @@ -1,3 +0,0 @@ -0..2,small -3..5,medium -6..,big diff --git a/assets/files/data.html b/assets/files/data.html deleted file mode 100644 index a4d1903eaa06..000000000000 --- a/assets/files/data.html +++ /dev/null @@ -1,10 +0,0 @@ - - - - - Example document - - -

Hello, world!

- - diff --git a/assets/files/data.xml b/assets/files/data.xml deleted file mode 100644 index 9ae409eeec3c..000000000000 --- a/assets/files/data.xml +++ /dev/null @@ -1,7 +0,0 @@ - - 1 - - World - World - - diff --git a/assets/files/details.toml b/assets/files/details.toml deleted file mode 100644 index 56cf166d8fa7..000000000000 --- a/assets/files/details.toml +++ /dev/null @@ -1,3 +0,0 @@ -title = "Secret project" -version = 2 -authors = ["Mr Robert", "Miss Enola"] diff --git a/assets/files/diagram.svg b/assets/files/diagram.svg deleted file mode 100644 index dc42e068dfee..000000000000 --- a/assets/files/diagram.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - -Height -Height -Height -Height -Without family -With non-existing family -Time - -Curve - diff --git a/assets/files/docs.svg b/assets/files/docs.svg deleted file mode 100644 index 3b3588963897..000000000000 --- a/assets/files/docs.svg +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/assets/files/example.xml b/assets/files/example.xml deleted file mode 100644 index 1e5d19c944ef..000000000000 --- a/assets/files/example.xml +++ /dev/null @@ -1,22 +0,0 @@ - - -
- 2022 Budget approved - John Doe - 2022-12-19 - -

The 2022 budget has been approved by the Senate.

-

The budget is $1.2 trillion.

-

It is expected to be signed by the President next week.

-
-
-
- Tigers win the World Series - Jane Doe - 2022-12-20 - -

The Tigers have won the World Series.

-

They beat the Giants 4 to 3.

-
-
-
diff --git a/assets/files/glacier.jpg b/assets/files/glacier.jpg deleted file mode 100644 index a1d1c51170ae..000000000000 Binary files a/assets/files/glacier.jpg and /dev/null differ diff --git a/assets/files/graph.png b/assets/files/graph.png deleted file mode 100644 index 069b0cbc2f20..000000000000 Binary files a/assets/files/graph.png and /dev/null differ diff --git a/assets/files/halcyon.tmTheme b/assets/files/halcyon.tmTheme deleted file mode 100644 index 36f2d66a1b76..000000000000 --- a/assets/files/halcyon.tmTheme +++ /dev/null @@ -1,865 +0,0 @@ - - - - - author - Brittany Chiang - colorSpaceName - sRGB - name - ayu - semanticClass - halcyon - settings - - - settings - - background - #1d2433 - foreground - #a2aabc - caret - #FFCC66 - findHighlight - #8695b7 - findHighlightForeground - #d7dce2 - guide - #2f3b54 - activeGuide - #2f3b54 - stackGuide - #2f3b54 - gutter - #1d2433 - gutterForeground - #8695b755 - inactiveBackground - #1d2433 - inactiveSelection - #2f3b54 - invisibles - #6679a4 - lineHighlight - #2f3b54 - popupCss - - html, body { - background-color: #1d2433; - font-size: 12px; - color: #a2aabc; - padding: 0; - } - body { - padding: 5px; - } - div { - padding-bottom: -3px; - } - b, strong { - font-weight: normal; - } - a { - color: rgba(92, 207, 230, .7); - line-height: 16px; - } - .type { - color: #ef6b73; - } - .name { - color: #ffd580; - } - .param { - color: #FFD580; - } - .current { - text-decoration: underline; - } - - selection - #2f3b54 - selectionBorder - #a2aabc35 - shadow - #00000010 - - - - name - Comments - scope - comment, punctuation.definition.comment - settings - - fontStyle - italic - foreground - #8695b799 - - - - name - Variable - scope - variable - settings - - foreground - #a2aabc - - - - name - Keyword - scope - keyword, keyword.operator - settings - - foreground - #FFAE57 - - - - name - Storage - scope - storage.type, storage.modifier - settings - - foreground - #c3a6ff - - - - name - Operator, Misc - scope - constant.other.color, meta.tag, punctuation.separator.inheritance.php, punctuation.section.embedded, keyword.other.substitution - settings - - foreground - #5ccfe6 - - - - name - Tag - scope - entity.name.tag, meta.tag.sgml - settings - - foreground - #5ccfe6 - - - - name - Git Gutter Deleted - scope - markup.deleted.git_gutter - settings - - foreground - #ef6b73 - - - - name - Function, Special Method, Block Level - scope - entity.name, entity.name.class, entity.other.inherited-class, variable.function, support.function, keyword.other.special-method, meta.block-level - settings - - foreground - #FFD580 - - - - name - Other Variable, String Link - scope - support.other.variable, string.other.link - settings - - foreground - #ef6b73 - - - - name - Number, Constant, Function Argument, Tag Attribute, Embedded - scope - constant.numeric, constant.language, constant.character, keyword.other.unit - settings - - foreground - #c3a6ff - - - - name - Number, Constant, Function Argument, Tag Attribute, Embedded - scope - support.constant, meta.jsx.js, punctuation.section, string.unquoted.label - settings - - foreground - #a2aabc - - - - name - String, Symbols, Inherited Class, Markup Heading - scope - string, keyword.other.template, constant.other.symbol, constant.other.key, entity.other.inherited-class, markup.heading, markup.inserted.git_gutter, meta.group.braces.curly - settings - - fontStyle - normal - foreground - #bae67e - - - - name - Class, Support - scope - entity.name.type.class, support.type, support.class, support.orther.namespace.use.php, meta.use.php, support.other.namespace.php, markup.changed.git_gutter - settings - - foreground - #5ccfe6 - - - - name - Sub-methods - scope - entity.name.module.js, variable.import.parameter.js, variable.other.class.js - settings - - foreground - #5ccfe6 - - - - name - Language methods - scope - variable.language - settings - - fontStyle - italic - foreground - #5ccfe6 - - - - name - Invalid - scope - invalid, invalid.illegal - settings - - foreground - #ef6b73 - - - - name - Deprecated - scope - invalid.deprecated - settings - - background - #FFAE57 - foreground - #d7dce2 - - - - name - Html punctuations tags - scope - punctuation.definition.tag.end, punctuation.definition.tag.begin, punctuation.definition.tag, meta.group.braces.curly.js, meta.property-value, meta.jsx.js - settings - - foreground - #a2aabc - - - - name - Attributes - scope - entity.other.attribute-name, meta.attribute-with-value.style, constant.other.color.rgb-value, meta.at-rule.media, support.constant.mathematical-symbols, - punctuation.separator.key-value - settings - - foreground - #FFAE57 - - - - name - Inserted - scope - markup.inserted - settings - - foreground - #bae67e - - - - name - Deleted - scope - markup.deleted - settings - - foreground - #5ccfe6 - - - - name - Changed - scope - markup.changed - settings - - foreground - #FFAE57 - - - - name - Regular Expressions and Escape Characters - scope - string.regexp, constant.character.escape - settings - - foreground - #95E6CB - - - - name - URL - scope - *url*, *link*, *uri* - settings - - fontStyle - underline - - - - name - Search Results Nums - scope - constant.numeric.line-number.find-in-files - match - settings - - foreground - #8695b7 - - - - name - Search Results Lines - scope - entity.name.filename.find-in-files - settings - - foreground - #bae67e - - - - name - Decorators - scope - tag.decorator.js entity.name.tag.js, tag.decorator.js punctuation.definition.tag.js - settings - - fontStyle - italic - foreground - #ffd580 - - - - name - ES7 Bind Operator - scope - constant.other.object.key - settings - - foreground - #5ccfe6 - - - - name - entity.name.method - scope - entity.name.method - settings - - fontStyle - italic - foreground - #ffd580 - - - - name - meta.method.js - scope - entity.name.function, variable.function.constructor - settings - - foreground - #ffd580 - - - - name - Markup - Italic - scope - markup.italic - settings - - fontStyle - italic - foreground - #ef6b73 - - - - name - Markup - Bold - scope - markup.bold - settings - - fontStyle - bold - foreground - #ef6b73 - - - - name - Markup - Underline - scope - markup.underline - settings - - fontStyle - underline - foreground - #c3a6ff - - - - name - Markup - Strike - scope - markup.strike - settings - - fontStyle - strike - foreground - #ffd580 - - - - name - Markup - Quote - scope - markup.quote - settings - - fontStyle - italic - foreground - #80D4FF - - - - name - Markup - Raw Block - scope - markup.raw.block - settings - - foreground - #FFAE57 - - - - name - Markup - Table - scope - markup.table - settings - - background - #1d2433aa - foreground - #5ccfe6 - - - - name - Markdown - Plain - scope - text.html.markdown, punctuation.definition.list_item.markdown - settings - - foreground - #a2aabc - - - - name - Markdown - Markup Raw Inline - scope - text.html.markdown markup.raw.inline - settings - - foreground - #5ccfe6 - - - - name - Markdown - Line Break - scope - text.html.markdown meta.dummy.line-break - settings - - foreground - #8695b7 - - - - name - Markdown - Heading - scope - markdown.heading, markup.heading | markup.heading entity.name, markup.heading.markdown punctuation.definition.heading.markdown - settings - - foreground - #bae67e - - - - name - Markdown - Blockquote - scope - markup.quote, punctuation.definition.blockquote.markdown - settings - - fontStyle - italic - foreground - #80D4FF - - - - name - Markdown - Link - scope - string.other.link.title.markdown - settings - - fontStyle - underline - foreground - #ffd580 - - - - name - Markdown - Raw Block Fenced - scope - markup.raw.block.fenced.markdown - settings - - background - #d7dce210 - foreground - #a2aabc - - - - name - Markdown - Fenced Bode Block - scope - punctuation.definition.fenced.markdown, variable.language.fenced.markdown - settings - - background - #d7dce210 - foreground - #8695b7 - - - - name - Markdown - Fenced Language - scope - variable.language.fenced.markdown - settings - - fontStyle - - foreground - #8695b7 - - - - name - Markdown - Separator - scope - meta.separator - settings - - background - #d7dce210 - fontStyle - bold - foreground - #8695b7 - - - - name - JSON Key - Level 0 - scope - source.json meta.structure.dictionary.json string.quoted.double.json - meta.structure.dictionary.json meta.structure.dictionary.value.json string.quoted.double.json, source.json meta.structure.dictionary.json punctuation.definition.string - meta.structure.dictionary.json meta.structure.dictionary.value.json punctuation.definition.string - settings - - foreground - #5ccfe6 - - - - name - JSON Key - Level 1 - scope - source.json meta meta.structure.dictionary.json string.quoted.double.json - meta meta.structure.dictionary.json meta.structure.dictionary.value.json string.quoted.double.json, source.json meta meta.structure.dictionary.json punctuation.definition.string - meta meta.structure.dictionary.json meta.structure.dictionary.value.json punctuation.definition.string - settings - - foreground - #5ccfe6 - - - - name - JSON Key - Level 2 - scope - source.json meta meta meta meta.structure.dictionary.json string.quoted.double.json - meta meta meta meta.structure.dictionary.json meta.structure.dictionary.value.json string.quoted.double.json, source.json meta meta meta meta.structure.dictionary.json punctuation.definition.string - meta meta meta meta.structure.dictionary.json meta.structure.dictionary.value.json punctuation.definition.string - settings - - foreground - #ffae57 - - - - name - JSON Key - Level 3 - scope - source.json meta meta meta meta meta meta.structure.dictionary.json string.quoted.double.json - meta meta meta meta meta meta.structure.dictionary.json meta.structure.dictionary.value.json string.quoted.double.json, source.json meta meta meta meta meta meta.structure.dictionary.json punctuation.definition.string - meta meta meta meta meta meta.structure.dictionary.json meta.structure.dictionary.value.json punctuation.definition.string - settings - - foreground - #5ccfe6 - - - - name - JSON Key - Level 4 - scope - source.json meta meta meta meta meta meta meta meta.structure.dictionary.json string.quoted.double.json - meta meta meta meta meta meta meta meta.structure.dictionary.json meta.structure.dictionary.value.json string.quoted.double.json, source.json meta meta meta meta meta meta meta meta.structure.dictionary.json punctuation.definition.string - meta meta meta meta meta meta meta meta.structure.dictionary.json meta.structure.dictionary.value.json punctuation.definition.string - settings - - foreground - #ffae57 - - - - name - JSON Key - Level 5 - scope - source.json meta meta meta meta meta meta meta meta meta meta.structure.dictionary.json string.quoted.double.json - meta meta meta meta meta meta meta meta meta meta.structure.dictionary.json meta.structure.dictionary.value.json string.quoted.double.json, source.json meta meta meta meta meta meta meta meta meta meta.structure.dictionary.json punctuation.definition.string - meta meta meta meta meta meta meta meta meta meta.structure.dictionary.json meta.structure.dictionary.value.json punctuation.definition.string - settings - - foreground - #5ccfe6 - - - - name - JSON Key - Level 6 - scope - source.json meta meta meta meta meta meta meta meta meta meta meta meta.structure.dictionary.json string.quoted.double.json - meta meta meta meta meta meta meta meta meta meta meta meta.structure.dictionary.json meta.structure.dictionary.value.json string.quoted.double.json, source.json meta meta meta meta meta meta meta meta meta meta meta meta.structure.dictionary.json punctuation.definition.string - meta meta meta meta meta meta meta meta meta meta meta meta.structure.dictionary.json meta.structure.dictionary.value.json punctuation.definition.string - settings - - foreground - #ffae57 - - - - name - JSON Key - Level 7 - scope - source.json meta meta meta meta meta meta meta meta meta meta meta meta meta meta.structure.dictionary.json string.quoted.double.json - meta meta meta meta meta meta meta meta meta meta meta meta meta meta.structure.dictionary.json meta.structure.dictionary.value.json string.quoted.double.json, source.json meta meta meta meta meta meta meta meta meta meta meta meta meta meta.structure.dictionary.json punctuation.definition.string - meta meta meta meta meta meta meta meta meta meta meta meta meta meta.structure.dictionary.json meta.structure.dictionary.value.json punctuation.definition.string - settings - - foreground - #5ccfe6 - - - - name - JSON Key - Level 8 - scope - source.json meta meta meta meta meta meta meta meta meta meta meta meta meta meta meta meta.structure.dictionary.json string.quoted.double.json - meta meta meta meta meta meta meta meta meta meta meta meta meta meta meta meta.structure.dictionary.json meta.structure.dictionary.value.json string.quoted.double.json, source.json meta meta meta meta meta meta meta meta meta meta meta meta meta meta meta meta.structure.dictionary.json punctuation.definition.string - meta meta meta meta meta meta meta meta meta meta meta meta meta meta meta meta.structure.dictionary.json meta.structure.dictionary.value.json punctuation.definition.string - settings - - foreground - #ffae57 - - - - name - AceJump Label - Blue - scope - acejump.label.blue - settings - - background - #5ccfe6 - foreground - #d7dce2 - - - - name - AceJump Label - Green - scope - acejump.label.green - settings - - background - #bae67e - foreground - #d7dce2 - - - - name - AceJump Label - Orange - scope - acejump.label.orange - settings - - background - #FFAE57 - foreground - #d7dce2 - - - - name - AceJump Label - Purple - scope - acejump.label.purple - settings - - background - #ef6b73 - foreground - #d7dce2 - - - - name - SublimeLinter Warning - scope - sublimelinter.mark.warning - settings - - foreground - #5ccfe6 - - - - name - SublimeLinter Gutter Mark - scope - sublimelinter.gutter-mark - settings - - foreground - #d7dce2 - - - - name - SublimeLinter Error - scope - sublimelinter.mark.error - settings - - foreground - #ef6b73 - - - - name - GitGutter Ignored - scope - markup.ignored.git_gutter - settings - - foreground - #8695b7 - - - - name - GitGutter Untracked - scope - markup.untracked.git_gutter - settings - - foreground - #8695b7 - - - - name - GutterColor - scope - gutter_color - settings - - foreground - #d7dce2 - - - - uuid - 0e709986-46a0-40a0-b3bf-c8dfe525c455 - - diff --git a/assets/files/hello.txt b/assets/files/hello.txt deleted file mode 100644 index af5626b4a114..000000000000 --- a/assets/files/hello.txt +++ /dev/null @@ -1 +0,0 @@ -Hello, world! diff --git a/assets/files/hello.wasm b/assets/files/hello.wasm deleted file mode 100755 index eddd738760ec..000000000000 Binary files a/assets/files/hello.wasm and /dev/null differ diff --git a/assets/files/logo.svg b/assets/files/logo.svg deleted file mode 100644 index 8864aa67800d..000000000000 --- a/assets/files/logo.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/assets/files/molecular.jpg b/assets/files/molecular.jpg deleted file mode 100644 index 888905f8f8fe..000000000000 Binary files a/assets/files/molecular.jpg and /dev/null differ diff --git a/assets/files/monday.json b/assets/files/monday.json deleted file mode 100644 index 10a07d30381f..000000000000 --- a/assets/files/monday.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "temperature": 18.5, - "unit": "C", - "weather": "sunny" -} diff --git a/assets/files/monkey.svg b/assets/files/monkey.svg deleted file mode 100644 index 0e8c11240d41..000000000000 --- a/assets/files/monkey.svg +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/files/pattern.svg b/assets/files/pattern.svg deleted file mode 100644 index 0a46c0b6dd2d..000000000000 --- a/assets/files/pattern.svg +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/assets/files/plugin-oob.wasm b/assets/files/plugin-oob.wasm deleted file mode 100755 index 6afb74362bf7..000000000000 Binary files a/assets/files/plugin-oob.wasm and /dev/null differ diff --git a/assets/files/rhino.png b/assets/files/rhino.png deleted file mode 100644 index f9d47dd392a8..000000000000 Binary files a/assets/files/rhino.png and /dev/null differ diff --git a/assets/files/scifi-authors.yaml b/assets/files/scifi-authors.yaml deleted file mode 100644 index 1cffc760dd5c..000000000000 --- a/assets/files/scifi-authors.yaml +++ /dev/null @@ -1,11 +0,0 @@ -"Arthur C. Clarke": - - title: Against the Fall of Night - published: "1978" - - title: The songs of distant earth - published: "1986" - -"Isaac Asimov": - - title: Quasar, Quasar, Burning Bright - published: "1977" - - title: Far as Human Eye Could See - published: 1987 diff --git a/assets/files/tetrahedron.svg b/assets/files/tetrahedron.svg deleted file mode 100644 index 00d842ce3d87..000000000000 --- a/assets/files/tetrahedron.svg +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - diff --git a/assets/files/tiger.jpg b/assets/files/tiger.jpg deleted file mode 100644 index 74dc5e0b65ad..000000000000 Binary files a/assets/files/tiger.jpg and /dev/null differ diff --git a/assets/files/toml-types.toml b/assets/files/toml-types.toml deleted file mode 100644 index aaed23ee55ca..000000000000 --- a/assets/files/toml-types.toml +++ /dev/null @@ -1,14 +0,0 @@ -string = "wonderful" -integer = 42 -float = 3.14 -boolean = true -date_time = 2023-02-01T15:38:57Z -date_time2 = 2023-02-01T15:38:57 -date = 2023-02-01 -time = 15:38:57 -array = [1, "string", 3.0, false] -inline_table = { first = "amazing", second = "greater" } - -[table] -element = 5 -others = [false, "indeed", 7] diff --git a/assets/files/tuesday.json b/assets/files/tuesday.json deleted file mode 100644 index 3ce8e7406ba9..000000000000 --- a/assets/files/tuesday.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "temperature": 14.5, - "unit": "C", - "weather": "windy" -} diff --git a/assets/files/typing.jpg b/assets/files/typing.jpg deleted file mode 100644 index 1cfe563dba5c..000000000000 Binary files a/assets/files/typing.jpg and /dev/null differ diff --git a/assets/files/works.bib b/assets/files/works.bib deleted file mode 100644 index 391661caa712..000000000000 --- a/assets/files/works.bib +++ /dev/null @@ -1,94 +0,0 @@ -@article{netwok, - title={At-scale impact of the {Net Wok}: A culinarically holistic investigation of distributed dumplings}, - author={Astley, Rick and Morris, Linda}, - journal={Armenian Journal of Proceedings}, - volume={61}, - pages={192--219}, - year={2020}, - publisher={Automattic Inc.} -} - -@www{issue201, - title={Use of ids field creates unstable references}, - author={{cfr42}}, - url={https://github.com/plk/biblatex/issues/201}, - date={2014-02-02/2014-02-07}, - ids={unstable, github} -} - -@article{arrgh, - title={The Pirate Organization}, - author={Leeson, Peter T.}, -} - -@article{quark, - title={The Quark Organization}, - author={Leeson, Peter T.}, -} - -@misc{distress, - title={An Insight into Bibliographical Distress}, - author={Aldrin, Buzz} -} - -@article{glacier-melt, - author = {Regine Hock}, - title ={Glacier melt: a review of processes and their modelling}, - journal = {Progress in Physical Geography: Earth and Environment}, - volume = {29}, - number = {3}, - pages = {362-391}, - year = {2005}, - doi = {10.1191/0309133305pp453ra}, -} - -@book{tolkien54, - maintitle = {The Lord of the Rings}, - title = {The Fellowship of the Ring}, - author = {J. R. R. Tolkien}, - date = {1954-07-29}, - publisher = {Allen & Unwin}, - location = {London}, - volume = {1}, -} - - -@article{sharing, - title = {Do sharing people behave differently? An empirical evaluation of the distinctive mobility patterns of free-floating car-sharing members}, - volume = {42}, - pages = {449--469}, - number = {3}, - journal = {Transportation}, - author = {Kopp, Johanna and Gerike, Regine and Axhausen, Kay W.}, - year = {2015} -} - -@book{restful, - location = {Sebastopol, {CA}, {USA}}, - edition = {1}, - title = {{RESTful} Web Services}, - pagetotal = {448}, - publisher = {O'Reilly Media}, - author = {Richardson, Leonard and Ruby, Sam}, - year = {2008} -} - -@article{mcintosh_anxiety, - title = {Anxiety and Health Problems Related to Air Travel}, - volume = {5}, - issn = {1195-1982}, - pages = {198--204}, - number = {4}, - journal = {Journal of Travel Medicine}, - author = {{McIntosh}, Iain B. and Swanson, Vivien and Power, Kevin G. and Raeside, Fiona and Dempster, Craig}, - year = {2006} -} - -@book{psychology25, - location = {New York, {NY}, {USA}}, - edition = {1}, - title = {The psychology of selling and advertising}, - publisher = {{McGraw}-Hill Book Co.}, - author = {Strong, Edward}, - year = {1925} -} diff --git a/assets/files/works_too.bib b/assets/files/works_too.bib deleted file mode 100644 index 8ccbe5d1b559..000000000000 --- a/assets/files/works_too.bib +++ /dev/null @@ -1,10 +0,0 @@ -@article{keshav2007read, - title = {How to read a paper}, - author = {Keshav, Srinivasan}, - journal = {ACM SIGCOMM Computer Communication Review}, - volume = {37}, - number = {3}, - pages = {83--84}, - year = {2007}, - publisher = {ACM New York, NY, USA} -} diff --git a/assets/files/yaml-types.yaml b/assets/files/yaml-types.yaml deleted file mode 100644 index ad4ddb96f12d..000000000000 --- a/assets/files/yaml-types.yaml +++ /dev/null @@ -1,9 +0,0 @@ -null_key: [null, ~] -"string": text -integer: 5 -float: 1.12 -mapping: { '1': "one", '2': "two"} -seq: [1, 2, 3, 4] -bool: false -true: bool -1: ok diff --git a/assets/files/zoo.csv b/assets/files/zoo.csv deleted file mode 100644 index 42ff06c7ddd0..000000000000 --- a/assets/files/zoo.csv +++ /dev/null @@ -1,4 +0,0 @@ -Name,Species,Weight,Length -Debby,Rhinoceros,1900kg,390cm -Fluffy,Tiger,115kg,310cm -Sleepy,Dolphin,150kg,180cm diff --git a/assets/files/zoo.json b/assets/files/zoo.json deleted file mode 100644 index 3b5a7ffc1fe5..000000000000 --- a/assets/files/zoo.json +++ /dev/null @@ -1,20 +0,0 @@ -[ - { - "name": "Debby", - "species": "Rhinoceros", - "weight": 1900, - "length": 390 - }, - { - "name": "Fluffy", - "species": "Tiger", - "weight": 115, - "length": 310 - }, - { - "name": "Sleepy", - "species": "Dolphin", - "weight": 150, - "length": 180 - } -] diff --git a/assets/fonts/DejaVuSansMono-Bold.ttf b/assets/fonts/DejaVuSansMono-Bold.ttf deleted file mode 100644 index 8184ced8cf85..000000000000 Binary files a/assets/fonts/DejaVuSansMono-Bold.ttf and /dev/null differ diff --git a/assets/fonts/DejaVuSansMono-BoldOblique.ttf b/assets/fonts/DejaVuSansMono-BoldOblique.ttf deleted file mode 100644 index 754dca7325de..000000000000 Binary files a/assets/fonts/DejaVuSansMono-BoldOblique.ttf and /dev/null differ diff --git a/assets/fonts/DejaVuSansMono-Oblique.ttf b/assets/fonts/DejaVuSansMono-Oblique.ttf deleted file mode 100644 index 4c858d401ad7..000000000000 Binary files a/assets/fonts/DejaVuSansMono-Oblique.ttf and /dev/null differ diff --git a/assets/fonts/DejaVuSansMono.ttf b/assets/fonts/DejaVuSansMono.ttf deleted file mode 100644 index f5786022f182..000000000000 Binary files a/assets/fonts/DejaVuSansMono.ttf and /dev/null differ diff --git a/assets/fonts/FiraMath-Regular.otf b/assets/fonts/FiraMath-Regular.otf deleted file mode 100644 index f1f9d40c2c82..000000000000 Binary files a/assets/fonts/FiraMath-Regular.otf and /dev/null differ diff --git a/assets/fonts/IBMPlexSans-Bold.ttf b/assets/fonts/IBMPlexSans-Bold.ttf deleted file mode 100644 index e5389d833ffa..000000000000 Binary files a/assets/fonts/IBMPlexSans-Bold.ttf and /dev/null differ diff --git a/assets/fonts/IBMPlexSans-Light.ttf b/assets/fonts/IBMPlexSans-Light.ttf deleted file mode 100644 index b3d035d5da37..000000000000 Binary files a/assets/fonts/IBMPlexSans-Light.ttf and /dev/null differ diff --git a/assets/fonts/IBMPlexSans-Medium.ttf b/assets/fonts/IBMPlexSans-Medium.ttf deleted file mode 100644 index 9395402b0ae0..000000000000 Binary files a/assets/fonts/IBMPlexSans-Medium.ttf and /dev/null differ diff --git a/assets/fonts/IBMPlexSans-Regular.ttf b/assets/fonts/IBMPlexSans-Regular.ttf deleted file mode 100644 index b5819647e1df..000000000000 Binary files a/assets/fonts/IBMPlexSans-Regular.ttf and /dev/null differ diff --git a/assets/fonts/IBMPlexSansCondensed-Regular.ttf b/assets/fonts/IBMPlexSansCondensed-Regular.ttf deleted file mode 100644 index 6e1e04381a1f..000000000000 Binary files a/assets/fonts/IBMPlexSansCondensed-Regular.ttf and /dev/null differ diff --git a/assets/fonts/IBMPlexSansDevanagari-Regular.ttf b/assets/fonts/IBMPlexSansDevanagari-Regular.ttf deleted file mode 100644 index 5d7c8f0f1694..000000000000 Binary files a/assets/fonts/IBMPlexSansDevanagari-Regular.ttf and /dev/null differ diff --git a/assets/fonts/IBMPlexSerif-Regular.ttf b/assets/fonts/IBMPlexSerif-Regular.ttf deleted file mode 100644 index 7d6dc5c14651..000000000000 Binary files a/assets/fonts/IBMPlexSerif-Regular.ttf and /dev/null differ diff --git a/assets/fonts/InriaSerif-Bold.ttf b/assets/fonts/InriaSerif-Bold.ttf deleted file mode 100644 index d0874eacf3e6..000000000000 Binary files a/assets/fonts/InriaSerif-Bold.ttf and /dev/null differ diff --git a/assets/fonts/InriaSerif-BoldItalic.ttf b/assets/fonts/InriaSerif-BoldItalic.ttf deleted file mode 100644 index 5ed2fc7111eb..000000000000 Binary files a/assets/fonts/InriaSerif-BoldItalic.ttf and /dev/null differ diff --git a/assets/fonts/InriaSerif-Italic.ttf b/assets/fonts/InriaSerif-Italic.ttf deleted file mode 100644 index b1bc8d4af818..000000000000 Binary files a/assets/fonts/InriaSerif-Italic.ttf and /dev/null differ diff --git a/assets/fonts/InriaSerif-Regular.ttf b/assets/fonts/InriaSerif-Regular.ttf deleted file mode 100644 index c61a18b12121..000000000000 Binary files a/assets/fonts/InriaSerif-Regular.ttf and /dev/null differ diff --git a/assets/fonts/LinLibertine_R.ttf b/assets/fonts/LinLibertine_R.ttf deleted file mode 100644 index e1dc2243a231..000000000000 Binary files a/assets/fonts/LinLibertine_R.ttf and /dev/null differ diff --git a/assets/fonts/LinLibertine_RB.ttf b/assets/fonts/LinLibertine_RB.ttf deleted file mode 100644 index 7eaeb0fd84ca..000000000000 Binary files a/assets/fonts/LinLibertine_RB.ttf and /dev/null differ diff --git a/assets/fonts/LinLibertine_RBI.ttf b/assets/fonts/LinLibertine_RBI.ttf deleted file mode 100644 index 3902980f71eb..000000000000 Binary files a/assets/fonts/LinLibertine_RBI.ttf and /dev/null differ diff --git a/assets/fonts/LinLibertine_RI.ttf b/assets/fonts/LinLibertine_RI.ttf deleted file mode 100644 index d0c800cc4e24..000000000000 Binary files a/assets/fonts/LinLibertine_RI.ttf and /dev/null differ diff --git a/assets/fonts/NewCM10-Bold.otf b/assets/fonts/NewCM10-Bold.otf deleted file mode 100644 index 75245c655c4c..000000000000 Binary files a/assets/fonts/NewCM10-Bold.otf and /dev/null differ diff --git a/assets/fonts/NewCM10-BoldItalic.otf b/assets/fonts/NewCM10-BoldItalic.otf deleted file mode 100644 index d1b3d8900e21..000000000000 Binary files a/assets/fonts/NewCM10-BoldItalic.otf and /dev/null differ diff --git a/assets/fonts/NewCM10-Italic.otf b/assets/fonts/NewCM10-Italic.otf deleted file mode 100644 index 623b6e996cb9..000000000000 Binary files a/assets/fonts/NewCM10-Italic.otf and /dev/null differ diff --git a/assets/fonts/NewCM10-Regular.otf b/assets/fonts/NewCM10-Regular.otf deleted file mode 100644 index 8afe6b42b955..000000000000 Binary files a/assets/fonts/NewCM10-Regular.otf and /dev/null differ diff --git a/assets/fonts/NewCMMath-Book.otf b/assets/fonts/NewCMMath-Book.otf deleted file mode 100644 index eeca1dde9872..000000000000 Binary files a/assets/fonts/NewCMMath-Book.otf and /dev/null differ diff --git a/assets/fonts/NewCMMath-Regular.otf b/assets/fonts/NewCMMath-Regular.otf deleted file mode 100644 index 82221fb81144..000000000000 Binary files a/assets/fonts/NewCMMath-Regular.otf and /dev/null differ diff --git a/assets/fonts/NotoColorEmoji.ttf b/assets/fonts/NotoColorEmoji.ttf deleted file mode 100644 index 2c1f104350d5..000000000000 Binary files a/assets/fonts/NotoColorEmoji.ttf and /dev/null differ diff --git a/assets/fonts/NotoSansArabic-Regular.ttf b/assets/fonts/NotoSansArabic-Regular.ttf deleted file mode 100644 index 94eead4c011e..000000000000 Binary files a/assets/fonts/NotoSansArabic-Regular.ttf and /dev/null differ diff --git a/assets/fonts/NotoSansSymbols2-Regular.ttf b/assets/fonts/NotoSansSymbols2-Regular.ttf deleted file mode 100644 index 429a51d56ea7..000000000000 Binary files a/assets/fonts/NotoSansSymbols2-Regular.ttf and /dev/null differ diff --git a/assets/fonts/NotoSansThai-Regular.ttf b/assets/fonts/NotoSansThai-Regular.ttf deleted file mode 100644 index ced12d6658fd..000000000000 Binary files a/assets/fonts/NotoSansThai-Regular.ttf and /dev/null differ diff --git a/assets/fonts/NotoSerifCJKjp-Regular.otf b/assets/fonts/NotoSerifCJKjp-Regular.otf deleted file mode 100644 index 6daac206106f..000000000000 Binary files a/assets/fonts/NotoSerifCJKjp-Regular.otf and /dev/null differ diff --git a/assets/fonts/NotoSerifCJKkr-Regular.otf b/assets/fonts/NotoSerifCJKkr-Regular.otf deleted file mode 100644 index b79606bbbc03..000000000000 Binary files a/assets/fonts/NotoSerifCJKkr-Regular.otf and /dev/null differ diff --git a/assets/fonts/NotoSerifCJKsc-Regular.otf b/assets/fonts/NotoSerifCJKsc-Regular.otf deleted file mode 100644 index 4f8e54046e1e..000000000000 Binary files a/assets/fonts/NotoSerifCJKsc-Regular.otf and /dev/null differ diff --git a/assets/fonts/NotoSerifCJKtc-Regular.otf b/assets/fonts/NotoSerifCJKtc-Regular.otf deleted file mode 100644 index 7f6da6f79b5d..000000000000 Binary files a/assets/fonts/NotoSerifCJKtc-Regular.otf and /dev/null differ diff --git a/assets/fonts/NotoSerifHebrew-Bold.ttf b/assets/fonts/NotoSerifHebrew-Bold.ttf deleted file mode 100644 index e7cbd93aec5d..000000000000 Binary files a/assets/fonts/NotoSerifHebrew-Bold.ttf and /dev/null differ diff --git a/assets/fonts/NotoSerifHebrew-Regular.ttf b/assets/fonts/NotoSerifHebrew-Regular.ttf deleted file mode 100644 index 27893f102cca..000000000000 Binary files a/assets/fonts/NotoSerifHebrew-Regular.ttf and /dev/null differ diff --git a/assets/fonts/PTSans-Regular.ttf b/assets/fonts/PTSans-Regular.ttf deleted file mode 100644 index 5222968fb5f0..000000000000 Binary files a/assets/fonts/PTSans-Regular.ttf and /dev/null differ diff --git a/assets/fonts/Roboto-Regular.ttf b/assets/fonts/Roboto-Regular.ttf deleted file mode 100644 index 500b1045b0c9..000000000000 Binary files a/assets/fonts/Roboto-Regular.ttf and /dev/null differ diff --git a/assets/fonts/TwitterColorEmoji.ttf b/assets/fonts/TwitterColorEmoji.ttf deleted file mode 100644 index a8f829ac5bc7..000000000000 Binary files a/assets/fonts/TwitterColorEmoji.ttf and /dev/null differ diff --git a/assets/fonts/Ubuntu-Regular.ttf b/assets/fonts/Ubuntu-Regular.ttf deleted file mode 100644 index f98a2dab85c9..000000000000 Binary files a/assets/fonts/Ubuntu-Regular.ttf and /dev/null differ diff --git a/crates/typst-cli/Cargo.toml b/crates/typst-cli/Cargo.toml index 250fa8e74665..dcc4af8680fe 100644 --- a/crates/typst-cli/Cargo.toml +++ b/crates/typst-cli/Cargo.toml @@ -3,74 +3,94 @@ name = "typst-cli" description = "The command line interface for Typst." categories = ["compilers", "command-line-utilities"] keywords = ["typst", "cli"] -version.workspace = true -rust-version.workspace = true -authors.workspace = true -edition.workspace = true -homepage.workspace = true -repository.workspace = true -license.workspace = true +version = { workspace = true } +rust-version = { workspace = true } +authors = { workspace = true } +edition = { workspace = true } +homepage = { workspace = true } +repository = { workspace = true } +license = { workspace = true } +readme = { workspace = true } [[bin]] name = "typst" path = "src/main.rs" -test = false -doctest = false -bench = false doc = false [dependencies] -typst = { path = "../typst" } -typst-library = { path = "../typst-library" } -chrono = { version = "0.4.24", default-features = false, features = ["clock", "std"] } -clap = { version = "4.4", features = ["derive", "env"] } -codespan-reporting = "0.11" -comemo = "0.3" -ecow = "0.2" -dirs = "5" -flate2 = "1" -filetime = "0.2" -fontdb = "0.15.0" -inferno = "0.11.15" -notify = "6" -once_cell = "1" -open = "5" -pathdiff = "0.2" -same-file = "1" -# https://github.com/mitsuhiko/self-replace/pull/16 -self-replace = { git = "https://github.com/typst/self-replace", optional = true } -semver = "1" -serde = "1.0.184" -serde_json = "1" -serde_yaml = "0.9" -siphasher = "0.3" -tar = "0.4" -tempfile = "3.7.0" -tracing = "0.1.37" -tracing-error = "0.2" -tracing-flame = "0.2.0" -tracing-subscriber = "0.3.17" -ureq = "2" -rustls = "0.21" -rustls-pemfile = "1" -env_proxy = "0.4" -xz2 = { version = "0.1", optional = true } -zip = { version = "0.6", optional = true } +typst = { workspace = true } +typst-eval = { workspace = true } +typst-html = { workspace = true } +typst-kit = { workspace = true } +typst-macros = { workspace = true } +typst-pdf = { workspace = true } +typst-render = { workspace = true } +typst-svg = { workspace = true } +typst-timing = { workspace = true } +chrono = { workspace = true } +clap = { workspace = true } +clap_complete = { workspace = true } +codespan-reporting = { workspace = true } +color-print = { workspace = true } +comemo = { workspace = true } +dirs = { workspace = true } +ecow = { workspace = true } +fs_extra = { workspace = true } +notify = { workspace = true } +open = { workspace = true } +parking_lot = { workspace = true } +pathdiff = { workspace = true } +rayon = { workspace = true } +rustc-hash = { workspace = true } +same-file = { workspace = true } +self-replace = { workspace = true, optional = true } +semver = { workspace = true } +serde = { workspace = true } +serde_json = { workspace = true } +serde_yaml = { workspace = true } +shell-escape = { workspace = true } +sigpipe = { workspace = true } +tar = { workspace = true } +tempfile = { workspace = true } +tiny_http = { workspace = true, optional = true } +toml = { workspace = true } +ureq = { workspace = true } +xz2 = { workspace = true, optional = true } +zip = { workspace = true, optional = true } [build-dependencies] -clap = { version = "4.4", features = ["derive", "string"] } -clap_complete = "4.2.1" -clap_mangen = "0.2.10" -semver = "1" +chrono = { workspace = true } +clap = { workspace = true, features = ["string"] } +clap_complete = { workspace = true } +clap_mangen = { workspace = true } +color-print = { workspace = true } +semver = { workspace = true } [features] -default = ["embed-fonts"] +default = ["embed-fonts", "http-server"] -# Embeds some fonts into the binary: -# - For text: Linux Libertine, New Computer Modern -# - For math: New Computer Modern Math -# - For code: Deja Vu Sans Mono -embed-fonts = [] +# Embeds some fonts into the binary, see typst-kit +embed-fonts = ["typst-kit/embed-fonts"] -# Permits the CLI to update itself without a package manager -self-update = ["dep:self-replace", "dep:xz2", "dep:zip", "ureq/json"] +# Enables the built-in HTTP server for `typst watch` and HTML export. +http-server = ["dep:tiny_http"] + +# Permits the CLI to update itself without a package manager. +self-update = ["dep:self-replace", "dep:xz2", "dep:zip"] + +# Whether to vendor OpenSSL. Not applicable to Windows and macOS builds. +vendor-openssl = ["typst-kit/vendor-openssl"] + +[lints] +workspace = true + +# The following metadata is used by `cargo-binstall`, and should be synchronized +# with `.github/workflows/release.yml`. +[package.metadata.binstall] +pkg-url = "{ repo }/releases/download/v{ version }/typst-{ target }{ archive-suffix }" +bin-dir = "typst-{ target }/typst{ binary-ext }" +pkg-fmt = "txz" + +[package.metadata.binstall.overrides] +x86_64-pc-windows-msvc = { pkg-fmt = "zip" } +aarch64-pc-windows-msvc = { pkg-fmt = "zip" } diff --git a/crates/typst-cli/build.rs b/crates/typst-cli/build.rs index bd6a563dbc60..23bc2d183aa3 100644 --- a/crates/typst-cli/build.rs +++ b/crates/typst-cli/build.rs @@ -1,10 +1,10 @@ use std::env; -use std::fs::{create_dir_all, File}; +use std::fs::{File, create_dir_all}; use std::path::Path; use std::process::Command; use clap::{CommandFactory, ValueEnum}; -use clap_complete::{generate_to, Shell}; +use clap_complete::{Shell, generate_to}; use clap_mangen::Man; #[path = "src/args.rs"] diff --git a/crates/typst-cli/src/args.rs b/crates/typst-cli/src/args.rs index 2113e03cbbab..f31d26a2e5fe 100644 --- a/crates/typst-cli/src/args.rs +++ b/crates/typst-cli/src/args.rs @@ -1,25 +1,60 @@ use std::fmt::{self, Display, Formatter}; +use std::num::NonZeroUsize; +use std::ops::RangeInclusive; use std::path::PathBuf; +use std::str::FromStr; +use chrono::{DateTime, Utc}; +use clap::builder::{TypedValueParser, ValueParser}; +use clap::{ArgAction, Args, ColorChoice, Parser, Subcommand, ValueEnum, ValueHint}; +use clap_complete::Shell; use semver::Version; -use clap::{ArgAction, Args, Parser, Subcommand, ValueEnum}; +/// The character typically used to separate path components +/// in environment variables. +const ENV_PATH_SEP: char = if cfg!(windows) { ';' } else { ':' }; + +/// The overall structure of the help. +#[rustfmt::skip] +const HELP_TEMPLATE: &str = "\ +Typst {version} + +{usage-heading} {usage} + +{all-args}{after-help}\ +"; + +/// Adds a list of useful links after the normal help. +#[rustfmt::skip] +const AFTER_HELP: &str = color_print::cstr!("\ +Resources: + Tutorial: https://typst.app/docs/tutorial/ + Reference documentation: https://typst.app/docs/reference/ + Templates & Packages: https://typst.app/universe/ + Forum for questions: https://forum.typst.app/ +"); /// The Typst compiler. #[derive(Debug, Clone, Parser)] -#[clap(name = "typst", version = crate::typst_version(), author)] +#[clap( + name = "typst", + version = crate::typst_version(), + author, + help_template = HELP_TEMPLATE, + after_help = AFTER_HELP, + max_term_width = 80, +)] pub struct CliArguments { - /// The command to run + /// The command to run. #[command(subcommand)] pub command: Command, - /// Sets the level of logging verbosity: - /// -v = warning & error, -vv = info, -vvv = debug, -vvvv = trace - #[clap(short, long, action = ArgAction::Count)] - pub verbosity: u8, + /// Whether to use color. When set to `auto` if the terminal to supports it. + #[clap(long, default_value_t = ColorChoice::Auto, default_missing_value = "always")] + pub color: ColorChoice, /// Path to a custom CA certificate to use when making network requests. - #[clap(long = "cert", env = "TYPST_CERT")] + #[clap(long, env = "TYPST_CERT")] pub cert: Option, } @@ -27,157 +62,392 @@ pub struct CliArguments { #[derive(Debug, Clone, Subcommand)] #[command()] pub enum Command { - /// Compiles an input file into a supported output format + /// Compiles an input file into a supported output format. #[command(visible_alias = "c")] Compile(CompileCommand), - /// Watches an input file and recompiles on changes + /// Watches an input file and recompiles on changes. #[command(visible_alias = "w")] - Watch(CompileCommand), + Watch(WatchCommand), + + /// Initializes a new project from a template. + Init(InitCommand), - /// Processes an input file to extract provided metadata + /// Processes an input file to extract provided metadata. Query(QueryCommand), - /// Lists all discovered fonts in system and custom font paths + /// Lists all discovered fonts in system and custom font paths. Fonts(FontsCommand), - /// Self update the Typst CLI - #[cfg_attr(not(feature = "self-update"), doc = " (disabled)")] + /// Self update the Typst CLI. + #[cfg_attr(not(feature = "self-update"), clap(hide = true))] Update(UpdateCommand), + + /// Generates shell completion scripts. + Completions(CompletionsCommand), } -/// Compiles an input file into a supported output format +/// Compiles an input file into a supported output format. #[derive(Debug, Clone, Parser)] pub struct CompileCommand { - /// Shared arguments + /// Arguments for compilation. #[clap(flatten)] - pub common: SharedArgs, - - /// Path to output file (PDF, PNG, or SVG) - pub output: Option, - - /// The format of the output file, inferred from the extension by default - #[arg(long = "format", short = 'f')] - pub format: Option, + pub args: CompileArgs, +} - /// Opens the output file using the default viewer after compilation - #[arg(long = "open")] - pub open: Option>, +/// Compiles an input file into a supported output format. +#[derive(Debug, Clone, Parser)] +pub struct WatchCommand { + /// Arguments for compilation. + #[clap(flatten)] + pub args: CompileArgs, - /// The PPI (pixels per inch) to use for PNG export - #[arg(long = "ppi", default_value_t = 144.0)] - pub ppi: f32, + /// Arguments for the HTTP server. + #[cfg(feature = "http-server")] + #[clap(flatten)] + pub server: ServerArgs, +} - /// Produces a flamegraph of the compilation process - #[arg(long = "flamegraph", value_name = "OUTPUT_SVG")] - pub flamegraph: Option>, +/// Initializes a new project from a template. +#[derive(Debug, Clone, Parser)] +pub struct InitCommand { + /// The template to use, e.g. `@preview/charged-ieee`. + /// + /// You can specify the version by appending e.g. `:0.1.0`. If no version is + /// specified, Typst will default to the latest version. + /// + /// Supports both local and published templates. + pub template: String, + + /// The project directory, defaults to the template's name. + pub dir: Option, + + /// Arguments related to storage of packages in the system. + #[clap(flatten)] + pub package: PackageArgs, } -/// Processes an input file to extract provided metadata +/// Processes an input file to extract provided metadata. #[derive(Debug, Clone, Parser)] pub struct QueryCommand { - /// Shared arguments - #[clap(flatten)] - pub common: SharedArgs, + /// Path to input Typst file. Use `-` to read input from stdin. + #[clap(value_parser = input_value_parser(), value_hint = ValueHint::FilePath)] + pub input: Input, - /// Defines which elements to retrieve + /// Defines which elements to retrieve. pub selector: String, - /// Extracts just one field from all retrieved elements + /// Extracts just one field from all retrieved elements. #[clap(long = "field")] pub field: Option, - /// Expects and retrieves exactly one element + /// Expects and retrieves exactly one element. #[clap(long = "one", default_value = "false")] pub one: bool, - /// The format to serialize in - #[clap(long = "format", default_value = "json")] + /// The format to serialize in. + #[clap(long = "format", default_value_t)] pub format: SerializationFormat, + + /// Whether to pretty-print the serialized output. + /// + /// Only applies to JSON format. + #[clap(long)] + pub pretty: bool, + + /// The target to compile for. + #[clap(long, default_value_t)] + pub target: Target, + + /// World arguments. + #[clap(flatten)] + pub world: WorldArgs, + + /// Processing arguments. + #[clap(flatten)] + pub process: ProcessArgs, } -// Output file format for query command -#[derive(Debug, Copy, Clone, Eq, PartialEq, ValueEnum)] -pub enum SerializationFormat { - Json, - Yaml, +/// Lists all discovered fonts in system and custom font paths. +#[derive(Debug, Clone, Parser)] +pub struct FontsCommand { + /// Common font arguments. + #[clap(flatten)] + pub font: FontArgs, + + /// Also lists style variants of each font family. + #[arg(long)] + pub variants: bool, +} + +/// Update the CLI using a pre-compiled binary from a Typst GitHub release. +#[derive(Debug, Clone, Parser)] +pub struct UpdateCommand { + /// Which version to update to (defaults to latest). + pub version: Option, + + /// Forces a downgrade to an older version (required for downgrading). + #[clap(long, default_value_t = false)] + pub force: bool, + + /// Reverts to the version from before the last update (only possible if + /// `typst update` has previously ran). + #[clap( + long, + default_value_t = false, + conflicts_with = "version", + conflicts_with = "force" + )] + pub revert: bool, + + /// Custom path to the backup file created on update and used by `--revert`, + /// defaults to system-dependent location + #[clap(long = "backup-path", env = "TYPST_UPDATE_BACKUP_PATH", value_name = "FILE")] + pub backup_path: Option, } -/// Common arguments of compile, watch, and query. +/// Generates shell completion scripts. +#[derive(Debug, Clone, Parser)] +pub struct CompletionsCommand { + /// The shell to generate completions for. + #[arg(value_enum)] + pub shell: Shell, +} + +/// Arguments for compilation and watching. #[derive(Debug, Clone, Args)] -pub struct SharedArgs { - /// Path to input Typst file - pub input: PathBuf, +pub struct CompileArgs { + /// Path to input Typst file. Use `-` to read input from stdin. + #[clap(value_parser = input_value_parser(), value_hint = ValueHint::FilePath)] + pub input: Input, + + /// Path to output file (PDF, PNG, SVG, or HTML). Use `-` to write output to + /// stdout. + /// + /// For output formats emitting one file per page (PNG & SVG), a page number + /// template must be present if the source document renders to multiple + /// pages. Use `{p}` for page numbers, `{0p}` for zero padded page numbers + /// and `{t}` for page count. For example, `page-{0p}-of-{t}.png` creates + /// `page-01-of-10.png`, `page-02-of-10.png`, and so on. + #[clap( + required_if_eq("input", "-"), + value_parser = output_value_parser(), + value_hint = ValueHint::FilePath, + )] + pub output: Option, - /// Configures the project root (for absolute paths) + /// The format of the output file, inferred from the extension by default. + #[arg(long = "format", short = 'f')] + pub format: Option, + + /// World arguments. + #[clap(flatten)] + pub world: WorldArgs, + + /// Which pages to export. When unspecified, all pages are exported. + /// + /// Pages to export are separated by commas, and can be either simple page + /// numbers (e.g. '2,5' to export only pages 2 and 5) or page ranges (e.g. + /// '2,3-6,8-' to export page 2, pages 3 to 6 (inclusive), page 8 and any + /// pages after it). + /// + /// Page numbers are one-indexed and correspond to physical page numbers in + /// the document (therefore not being affected by the document's page + /// counter). + #[arg(long = "pages", value_delimiter = ',')] + pub pages: Option>, + + /// One (or multiple comma-separated) PDF standards that Typst will enforce + /// conformance with. + #[arg(long = "pdf-standard", value_delimiter = ',')] + pub pdf_standard: Vec, + + /// The PPI (pixels per inch) to use for PNG export. + #[arg(long = "ppi", default_value_t = 144.0)] + pub ppi: f32, + + /// File path to which a Makefile with the current compilation's + /// dependencies will be written. + #[clap(long = "make-deps", value_name = "PATH")] + pub make_deps: Option, + + /// Processing arguments. + #[clap(flatten)] + pub process: ProcessArgs, + + /// Opens the output file with the default viewer or a specific program + /// after compilation. Ignored if output is stdout. + #[arg(long = "open", value_name = "VIEWER")] + pub open: Option>, + + /// Produces performance timings of the compilation process. (experimental) + /// + /// The resulting JSON file can be loaded into a tracing tool such as + /// https://ui.perfetto.dev. It does not contain any sensitive information + /// apart from file names and line numbers. + #[arg(long = "timings", value_name = "OUTPUT_JSON")] + pub timings: Option>, +} + +/// Arguments for the construction of a world. Shared by compile, watch, and +/// query. +#[derive(Debug, Clone, Args)] +pub struct WorldArgs { + /// Configures the project root (for absolute paths). #[clap(long = "root", env = "TYPST_ROOT", value_name = "DIR")] pub root: Option, - /// Adds additional directories to search for fonts + /// Add a string key-value pair visible through `sys.inputs`. #[clap( - long = "font-path", - env = "TYPST_FONT_PATHS", - value_name = "DIR", + long = "input", + value_name = "key=value", action = ArgAction::Append, + value_parser = ValueParser::new(parse_sys_input_pair), )] - pub font_paths: Vec, + pub inputs: Vec<(String, String)>, - /// The format to emit diagnostics in + /// Common font arguments. + #[clap(flatten)] + pub font: FontArgs, + + /// Arguments related to storage of packages in the system. + #[clap(flatten)] + pub package: PackageArgs, + + /// The document's creation date formatted as a UNIX timestamp. + /// + /// For more information, see . #[clap( - long, - default_value_t = DiagnosticFormat::Human, - value_parser = clap::value_parser!(DiagnosticFormat) + long = "creation-timestamp", + env = "SOURCE_DATE_EPOCH", + value_name = "UNIX_TIMESTAMP", + value_parser = parse_source_date_epoch, )] + pub creation_timestamp: Option>, +} + +/// Arguments for configuration the process of compilation itself. +#[derive(Debug, Clone, Args)] +pub struct ProcessArgs { + /// Number of parallel jobs spawned during compilation. Defaults to number + /// of CPUs. Setting it to 1 disables parallelism. + #[clap(long, short)] + pub jobs: Option, + + /// Enables in-development features that may be changed or removed at any + /// time. + #[arg(long = "features", value_delimiter = ',', env = "TYPST_FEATURES")] + pub features: Vec, + + /// The format to emit diagnostics in. + #[clap(long, default_value_t)] pub diagnostic_format: DiagnosticFormat, } -/// Lists all discovered fonts in system and custom font paths +/// Arguments related to where packages are stored in the system. +#[derive(Debug, Clone, Args)] +pub struct PackageArgs { + /// Custom path to local packages, defaults to system-dependent location. + #[clap(long = "package-path", env = "TYPST_PACKAGE_PATH", value_name = "DIR")] + pub package_path: Option, + + /// Custom path to package cache, defaults to system-dependent location. + #[clap( + long = "package-cache-path", + env = "TYPST_PACKAGE_CACHE_PATH", + value_name = "DIR" + )] + pub package_cache_path: Option, +} + +/// Common arguments to customize available fonts. #[derive(Debug, Clone, Parser)] -pub struct FontsCommand { - /// Adds additional directories to search for fonts +pub struct FontArgs { + /// Adds additional directories that are recursively searched for fonts. + /// + /// If multiple paths are specified, they are separated by the system's path + /// separator (`:` on Unix-like systems and `;` on Windows). #[clap( long = "font-path", env = "TYPST_FONT_PATHS", value_name = "DIR", - action = ArgAction::Append, + value_delimiter = ENV_PATH_SEP, )] pub font_paths: Vec, - /// Also lists style variants of each font family - #[arg(long)] - pub variants: bool, + /// Ensures system fonts won't be searched, unless explicitly included via + /// `--font-path`. + #[arg(long, env = "TYPST_IGNORE_SYSTEM_FONTS")] + pub ignore_system_fonts: bool, } -/// Which format to use for diagnostics. -#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, ValueEnum)] -pub enum DiagnosticFormat { - Human, - Short, +/// Arguments for the HTTP server. +#[cfg(feature = "http-server")] +#[derive(Debug, Clone, Parser)] +pub struct ServerArgs { + /// Disables the built-in HTTP server for HTML export. + #[clap(long)] + pub no_serve: bool, + + /// Disables the injected live reload script for HTML export. The HTML that + /// is written to disk isn't affected either way. + #[clap(long)] + pub no_reload: bool, + + /// The port where HTML is served. + /// + /// Defaults to the first free port in the range 3000-3005. + #[clap(long)] + pub port: Option, +} + +macro_rules! display_possible_values { + ($ty:ty) => { + impl Display for $ty { + fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { + self.to_possible_value() + .expect("no values are skipped") + .get_name() + .fmt(f) + } + } + }; } -impl Display for DiagnosticFormat { +/// An input that is either stdin or a real path. +#[derive(Debug, Clone)] +pub enum Input { + /// Stdin, represented by `-`. + Stdin, + /// A non-empty path. + Path(PathBuf), +} + +impl Display for Input { fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { - self.to_possible_value() - .expect("no values are skipped") - .get_name() - .fmt(f) + match self { + Input::Stdin => f.pad("stdin"), + Input::Path(path) => path.display().fmt(f), + } } } -/// Update the CLI using a pre-compiled binary from a Typst GitHub release. -#[derive(Debug, Clone, Parser)] -pub struct UpdateCommand { - /// Which version to update to (defaults to latest) - pub version: Option, - - /// Forces a downgrade to an older version (required for downgrading) - #[clap(long, default_value_t = false)] - pub force: bool, +/// An output that is either stdout or a real path. +#[derive(Debug, Clone)] +pub enum Output { + /// Stdout, represented by `-`. + Stdout, + /// A non-empty path. + Path(PathBuf), +} - /// Reverts to the version from before the last update (only possible if - /// `typst update` has previously ran) - #[clap(long, default_value_t = false, exclusive = true)] - pub revert: bool, +impl Display for Output { + fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { + match self { + Output::Stdout => f.pad("stdout"), + Output::Path(path) => path.display().fmt(f), + } + } } /// Which format to use for the generated output file. @@ -186,13 +456,190 @@ pub enum OutputFormat { Pdf, Png, Svg, + Html, } -impl Display for OutputFormat { - fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { - self.to_possible_value() - .expect("no values are skipped") - .get_name() - .fmt(f) +display_possible_values!(OutputFormat); + +/// The target to compile for. +#[derive(Debug, Default, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, ValueEnum)] +pub enum Target { + /// PDF and image formats. + #[default] + Paged, + /// HTML. + Html, +} + +display_possible_values!(Target); + +/// Which format to use for diagnostics. +#[derive(Debug, Default, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, ValueEnum)] +pub enum DiagnosticFormat { + #[default] + Human, + Short, +} + +display_possible_values!(DiagnosticFormat); + +/// An in-development feature that may be changed or removed at any time. +#[derive(Debug, Copy, Clone, Eq, PartialEq, ValueEnum)] +pub enum Feature { + Html, +} + +display_possible_values!(Feature); + +/// A PDF standard that Typst can enforce conformance with. +#[derive(Debug, Copy, Clone, Eq, PartialEq, ValueEnum)] +#[allow(non_camel_case_types)] +pub enum PdfStandard { + /// PDF 1.4. + #[value(name = "1.4")] + V_1_4, + /// PDF 1.5. + #[value(name = "1.5")] + V_1_5, + /// PDF 1.5. + #[value(name = "1.6")] + V_1_6, + /// PDF 1.7. + #[value(name = "1.7")] + V_1_7, + /// PDF 2.0. + #[value(name = "2.0")] + V_2_0, + /// PDF/A-1b. + #[value(name = "a-1b")] + A_1b, + /// PDF/A-2b. + #[value(name = "a-2b")] + A_2b, + /// PDF/A-2u. + #[value(name = "a-2u")] + A_2u, + /// PDF/A-3b. + #[value(name = "a-3b")] + A_3b, + /// PDF/A-3u. + #[value(name = "a-3u")] + A_3u, + /// PDF/A-4. + #[value(name = "a-4")] + A_4, + /// PDF/A-4f. + #[value(name = "a-4f")] + A_4f, + /// PDF/A-4e. + #[value(name = "a-4e")] + A_4e, +} + +display_possible_values!(PdfStandard); + +// Output file format for query command +#[derive(Debug, Default, Copy, Clone, Eq, PartialEq, ValueEnum)] +pub enum SerializationFormat { + #[default] + Json, + Yaml, +} + +display_possible_values!(SerializationFormat); + +/// Implements parsing of page ranges (`1-3`, `4`, `5-`, `-2`), used by the +/// `CompileCommand.pages` argument, through the `FromStr` trait instead of a +/// value parser, in order to generate better errors. +/// +/// See also: https://github.com/clap-rs/clap/issues/5065 +#[derive(Debug, Clone)] +pub struct Pages(pub RangeInclusive>); + +impl FromStr for Pages { + type Err = &'static str; + + fn from_str(value: &str) -> Result { + match value.split('-').map(str::trim).collect::>().as_slice() { + [] | [""] => Err("page export range must not be empty"), + [single_page] => { + let page_number = parse_page_number(single_page)?; + Ok(Pages(Some(page_number)..=Some(page_number))) + } + ["", ""] => Err("page export range must have start or end"), + [start, ""] => Ok(Pages(Some(parse_page_number(start)?)..=None)), + ["", end] => Ok(Pages(None..=Some(parse_page_number(end)?))), + [start, end] => { + let start = parse_page_number(start)?; + let end = parse_page_number(end)?; + if start > end { + Err("page export range must end at a page after the start") + } else { + Ok(Pages(Some(start)..=Some(end))) + } + } + [_, _, _, ..] => Err("page export range must have a single hyphen"), + } + } +} + +/// Parses a single page number. +fn parse_page_number(value: &str) -> Result { + if value == "0" { + Err("page numbers start at one") + } else { + NonZeroUsize::from_str(value).map_err(|_| "not a valid page number") } } + +/// The clap value parser used by `SharedArgs.input` +fn input_value_parser() -> impl TypedValueParser { + clap::builder::OsStringValueParser::new().try_map(|value| { + if value.is_empty() { + Err(clap::Error::new(clap::error::ErrorKind::InvalidValue)) + } else if value == "-" { + Ok(Input::Stdin) + } else { + Ok(Input::Path(value.into())) + } + }) +} + +/// The clap value parser used by `CompileCommand.output` +fn output_value_parser() -> impl TypedValueParser { + clap::builder::OsStringValueParser::new().try_map(|value| { + // Empty value also handled by clap for `Option` + if value.is_empty() { + Err(clap::Error::new(clap::error::ErrorKind::InvalidValue)) + } else if value == "-" { + Ok(Output::Stdout) + } else { + Ok(Output::Path(value.into())) + } + }) +} + +/// Parses key/value pairs split by the first equal sign. +/// +/// This function will return an error if the argument contains no equals sign +/// or contains the key (before the equals sign) is empty. +fn parse_sys_input_pair(raw: &str) -> Result<(String, String), String> { + let (key, val) = raw + .split_once('=') + .ok_or("input must be a key and a value separated by an equal sign")?; + let key = key.trim().to_owned(); + if key.is_empty() { + return Err("the key was missing or empty".to_owned()); + } + let val = val.trim().to_owned(); + Ok((key, val)) +} + +/// Parses a UNIX timestamp according to +fn parse_source_date_epoch(raw: &str) -> Result, String> { + let timestamp: i64 = raw + .parse() + .map_err(|err| format!("timestamp must be decimal integer ({err})"))?; + DateTime::from_timestamp(timestamp, 0) + .ok_or_else(|| "timestamp out of range".to_string()) +} diff --git a/crates/typst-cli/src/compile.rs b/crates/typst-cli/src/compile.rs index b5cf0e5468e8..508a08faf5a5 100644 --- a/crates/typst-cli/src/compile.rs +++ b/crates/typst-cli/src/compile.rs @@ -1,252 +1,650 @@ -use std::fs; +use std::ffi::OsStr; +use std::fs::{self, File}; +use std::io::{self, Write}; use std::path::{Path, PathBuf}; -use chrono::{Datelike, Timelike}; +use chrono::{DateTime, Datelike, Timelike, Utc}; use codespan_reporting::diagnostic::{Diagnostic, Label}; -use codespan_reporting::term::{self, termcolor}; -use termcolor::{ColorChoice, StandardStream}; -use typst::diag::{bail, Severity, SourceDiagnostic, StrResult}; -use typst::doc::Document; -use typst::eval::{eco_format, Datetime, Tracer}; -use typst::geom::Color; -use typst::syntax::{FileId, Source, Span}; -use typst::{World, WorldExt}; - -use crate::args::{CompileCommand, DiagnosticFormat, OutputFormat}; +use codespan_reporting::term; +use ecow::eco_format; +use parking_lot::RwLock; +use pathdiff::diff_paths; +use rayon::iter::{IntoParallelRefIterator, ParallelIterator}; +use typst::WorldExt; +use typst::diag::{ + At, Severity, SourceDiagnostic, SourceResult, StrResult, Warned, bail, +}; +use typst::foundations::{Datetime, Smart}; +use typst::layout::{Page, PageRanges, PagedDocument}; +use typst::syntax::{FileId, Lines, Span}; +use typst_html::HtmlDocument; +use typst_pdf::{PdfOptions, PdfStandards, Timestamp}; + +use crate::args::{ + CompileArgs, CompileCommand, DiagnosticFormat, Input, Output, OutputFormat, + PdfStandard, WatchCommand, +}; +#[cfg(feature = "http-server")] +use crate::server::HtmlServer; +use crate::timings::Timer; + use crate::watch::Status; use crate::world::SystemWorld; -use crate::{color_stream, set_failed}; +use crate::{set_failed, terminal}; type CodespanResult = Result; type CodespanError = codespan_reporting::files::Error; -impl CompileCommand { - /// The output path. - pub fn output(&self) -> PathBuf { - self.output.clone().unwrap_or_else(|| { - self.common.input.with_extension( - match self.output_format().unwrap_or(OutputFormat::Pdf) { - OutputFormat::Pdf => "pdf", - OutputFormat::Png => "png", - OutputFormat::Svg => "svg", - }, - ) - }) +/// Execute a compilation command. +pub fn compile(timer: &mut Timer, command: &CompileCommand) -> StrResult<()> { + let mut config = CompileConfig::new(command)?; + let mut world = + SystemWorld::new(&command.args.input, &command.args.world, &command.args.process) + .map_err(|err| eco_format!("{err}"))?; + timer.record(&mut world, |world| compile_once(world, &mut config))? +} + +/// A preprocessed `CompileCommand`. +pub struct CompileConfig { + /// Whether we are watching. + pub watching: bool, + /// Path to input Typst file or stdin. + pub input: Input, + /// Path to output file (PDF, PNG, SVG, or HTML). + pub output: Output, + /// The format of the output file. + pub output_format: OutputFormat, + /// Which pages to export. + pub pages: Option, + /// The document's creation date formatted as a UNIX timestamp, with UTC suffix. + pub creation_timestamp: Option>, + /// The format to emit diagnostics in. + pub diagnostic_format: DiagnosticFormat, + /// Opens the output file with the default viewer or a specific program after + /// compilation. + pub open: Option>, + /// A list of standards the PDF should conform to. + pub pdf_standards: PdfStandards, + /// A path to write a Makefile rule describing the current compilation. + pub make_deps: Option, + /// The PPI (pixels per inch) to use for PNG export. + pub ppi: f32, + /// The export cache for images, used for caching output files in `typst + /// watch` sessions with images. + pub export_cache: ExportCache, + /// Server for `typst watch` to HTML. + #[cfg(feature = "http-server")] + pub server: Option, +} + +impl CompileConfig { + /// Preprocess a `CompileCommand`, producing a compilation config. + pub fn new(command: &CompileCommand) -> StrResult { + Self::new_impl(&command.args, None) + } + + /// Preprocess a `WatchCommand`, producing a compilation config. + pub fn watching(command: &WatchCommand) -> StrResult { + Self::new_impl(&command.args, Some(command)) } - /// The format to use for generated output, either specified by the user or inferred from the extension. - /// - /// Will return `Err` if the format was not specified and could not be inferred. - pub fn output_format(&self) -> StrResult { - Ok(if let Some(specified) = self.format { + /// The shared implementation of [`CompileConfig::new`] and + /// [`CompileConfig::watching`]. + fn new_impl(args: &CompileArgs, watch: Option<&WatchCommand>) -> StrResult { + let input = args.input.clone(); + + let output_format = if let Some(specified) = args.format { specified - } else if let Some(output) = &self.output { + } else if let Some(Output::Path(output)) = &args.output { match output.extension() { Some(ext) if ext.eq_ignore_ascii_case("pdf") => OutputFormat::Pdf, Some(ext) if ext.eq_ignore_ascii_case("png") => OutputFormat::Png, Some(ext) if ext.eq_ignore_ascii_case("svg") => OutputFormat::Svg, - _ => bail!("could not infer output format for path {}.\nconsider providing the format manually with `--format/-f`", output.display()), + Some(ext) if ext.eq_ignore_ascii_case("html") => OutputFormat::Html, + _ => bail!( + "could not infer output format for path {}.\n\ + consider providing the format manually with `--format/-f`", + output.display() + ), } } else { OutputFormat::Pdf + }; + + let output = args.output.clone().unwrap_or_else(|| { + let Input::Path(path) = &input else { + panic!("output must be specified when input is from stdin, as guarded by the CLI"); + }; + Output::Path(path.with_extension( + match output_format { + OutputFormat::Pdf => "pdf", + OutputFormat::Png => "png", + OutputFormat::Svg => "svg", + OutputFormat::Html => "html", + }, + )) + }); + + let pages = args.pages.as_ref().map(|export_ranges| { + PageRanges::new(export_ranges.iter().map(|r| r.0.clone()).collect()) + }); + + let pdf_standards = PdfStandards::new( + &args.pdf_standard.iter().copied().map(Into::into).collect::>(), + )?; + + #[cfg(feature = "http-server")] + let server = match watch { + Some(command) + if output_format == OutputFormat::Html && !command.server.no_serve => + { + Some(HtmlServer::new(&input, &command.server)?) + } + _ => None, + }; + + Ok(Self { + watching: watch.is_some(), + input, + output, + output_format, + pages, + pdf_standards, + creation_timestamp: args.world.creation_timestamp, + make_deps: args.make_deps.clone(), + ppi: args.ppi, + diagnostic_format: args.process.diagnostic_format, + open: args.open.clone(), + export_cache: ExportCache::new(), + #[cfg(feature = "http-server")] + server, }) } } -/// Execute a compilation command. -pub fn compile(mut command: CompileCommand) -> StrResult<()> { - let mut world = SystemWorld::new(&command.common)?; - compile_once(&mut world, &mut command, false)?; - Ok(()) -} - /// Compile a single time. /// /// Returns whether it compiled without errors. -#[tracing::instrument(skip_all)] +#[typst_macros::time(name = "compile once")] pub fn compile_once( world: &mut SystemWorld, - command: &mut CompileCommand, - watching: bool, + config: &mut CompileConfig, ) -> StrResult<()> { - tracing::info!("Starting compilation"); - let start = std::time::Instant::now(); - if watching { - Status::Compiling.print(command).unwrap(); + if config.watching { + Status::Compiling.print(config).unwrap(); } - // Ensure that the main file is present. - world.source(world.main()).map_err(|err| err.to_string())?; - - let mut tracer = Tracer::new(); - let result = typst::compile(world, &mut tracer); - let warnings = tracer.warnings(); + let Warned { output, warnings } = compile_and_export(world, config); - match result { + match output { // Export the PDF / PNG. - Ok(document) => { - export(world, &document, command, watching)?; + Ok(outputs) => { let duration = start.elapsed(); - tracing::info!("Compilation succeeded in {duration:?}"); - if watching { + if config.watching { if warnings.is_empty() { - Status::Success(duration).print(command).unwrap(); + Status::Success(duration).print(config).unwrap(); } else { - Status::PartialSuccess(duration).print(command).unwrap(); + Status::PartialSuccess(duration).print(config).unwrap(); } } - print_diagnostics(world, &[], &warnings, command.common.diagnostic_format) + print_diagnostics(world, &[], &warnings, config.diagnostic_format) .map_err(|err| eco_format!("failed to print diagnostics ({err})"))?; - if let Some(open) = command.open.take() { - open_file(open.as_deref(), &command.output())?; - } + write_make_deps(world, config, outputs)?; + open_output(config)?; } // Print diagnostics. Err(errors) => { set_failed(); - tracing::info!("Compilation failed"); - if watching { - Status::Error.print(command).unwrap(); + if config.watching { + Status::Error.print(config).unwrap(); } - print_diagnostics( - world, - &errors, - &warnings, - command.common.diagnostic_format, - ) - .map_err(|err| eco_format!("failed to print diagnostics ({err})"))?; + print_diagnostics(world, &errors, &warnings, config.diagnostic_format) + .map_err(|err| eco_format!("failed to print diagnostics ({err})"))?; } } Ok(()) } -/// Export into the target format. -fn export( +/// Compile and then export the document. +fn compile_and_export( world: &mut SystemWorld, - document: &Document, - command: &CompileCommand, - watching: bool, -) -> StrResult<()> { - match command.output_format()? { + config: &mut CompileConfig, +) -> Warned>> { + match config.output_format { + OutputFormat::Html => { + let Warned { output, warnings } = typst::compile::(world); + let result = output.and_then(|document| export_html(&document, config)); + Warned { + output: result.map(|()| vec![config.output.clone()]), + warnings, + } + } + _ => { + let Warned { output, warnings } = typst::compile::(world); + let result = output.and_then(|document| export_paged(&document, config)); + Warned { output: result, warnings } + } + } +} + +/// Export to HTML. +fn export_html(document: &HtmlDocument, config: &CompileConfig) -> SourceResult<()> { + let html = typst_html::html(document)?; + let result = config.output.write(html.as_bytes()); + + #[cfg(feature = "http-server")] + if let Some(server) = &config.server { + server.update(html); + } + + result + .map_err(|err| eco_format!("failed to write HTML file ({err})")) + .at(Span::detached()) +} + +/// Export to a paged target format. +fn export_paged( + document: &PagedDocument, + config: &CompileConfig, +) -> SourceResult> { + match config.output_format { + OutputFormat::Pdf => { + export_pdf(document, config).map(|()| vec![config.output.clone()]) + } OutputFormat::Png => { - export_image(world, document, command, watching, ImageExportFormat::Png) + export_image(document, config, ImageExportFormat::Png).at(Span::detached()) } OutputFormat::Svg => { - export_image(world, document, command, watching, ImageExportFormat::Svg) + export_image(document, config, ImageExportFormat::Svg).at(Span::detached()) } - OutputFormat::Pdf => export_pdf(document, command, world), + OutputFormat::Html => unreachable!(), } } /// Export to a PDF. -fn export_pdf( - document: &Document, - command: &CompileCommand, - world: &SystemWorld, -) -> StrResult<()> { - let ident = world.input().to_string_lossy(); - let buffer = typst::export::pdf(document, Some(&ident), now()); - let output = command.output(); - fs::write(output, buffer) - .map_err(|err| eco_format!("failed to write PDF file ({err})"))?; +fn export_pdf(document: &PagedDocument, config: &CompileConfig) -> SourceResult<()> { + // If the timestamp is provided through the CLI, use UTC suffix, + // else, use the current local time and timezone. + let timestamp = match config.creation_timestamp { + Some(timestamp) => convert_datetime(timestamp).map(Timestamp::new_utc), + None => { + let local_datetime = chrono::Local::now(); + convert_datetime(local_datetime).and_then(|datetime| { + Timestamp::new_local( + datetime, + local_datetime.offset().local_minus_utc() / 60, + ) + }) + } + }; + + let options = PdfOptions { + ident: Smart::Auto, + timestamp, + page_ranges: config.pages.clone(), + standards: config.pdf_standards.clone(), + }; + let buffer = typst_pdf::pdf(document, &options)?; + config + .output + .write(&buffer) + .map_err(|err| eco_format!("failed to write PDF file ({err})")) + .at(Span::detached())?; Ok(()) } -/// Get the current date and time in UTC. -fn now() -> Option { - let now = chrono::Local::now().naive_utc(); +/// Convert [`chrono::DateTime`] to [`Datetime`] +fn convert_datetime( + date_time: chrono::DateTime, +) -> Option { Datetime::from_ymd_hms( - now.year(), - now.month().try_into().ok()?, - now.day().try_into().ok()?, - now.hour().try_into().ok()?, - now.minute().try_into().ok()?, - now.second().try_into().ok()?, + date_time.year(), + date_time.month().try_into().ok()?, + date_time.day().try_into().ok()?, + date_time.hour().try_into().ok()?, + date_time.minute().try_into().ok()?, + date_time.second().try_into().ok()?, ) } /// An image format to export in. +#[derive(Clone, Copy)] enum ImageExportFormat { Png, Svg, } -/// Export to one or multiple PNGs. +/// Export to one or multiple images. fn export_image( - world: &mut SystemWorld, - document: &Document, - command: &CompileCommand, - watching: bool, + document: &PagedDocument, + config: &CompileConfig, + fmt: ImageExportFormat, +) -> StrResult> { + // Determine whether we have indexable templates in output + let can_handle_multiple = match config.output { + Output::Stdout => false, + Output::Path(ref output) => { + output_template::has_indexable_template(output.to_str().unwrap_or_default()) + } + }; + + let exported_pages = document + .pages + .iter() + .enumerate() + .filter(|(i, _)| { + config.pages.as_ref().is_none_or(|exported_page_ranges| { + exported_page_ranges.includes_page_index(*i) + }) + }) + .collect::>(); + + if !can_handle_multiple && exported_pages.len() > 1 { + let err = match config.output { + Output::Stdout => "to stdout", + Output::Path(_) => { + "without a page number template ({p}, {0p}) in the output path" + } + }; + bail!("cannot export multiple images {err}"); + } + + // The results are collected in a `Vec<()>` which does not allocate. + exported_pages + .par_iter() + .map(|(i, page)| { + // Use output with converted path. + let output = match &config.output { + Output::Path(path) => { + let storage; + let path = if can_handle_multiple { + storage = output_template::format( + path.to_str().unwrap_or_default(), + i + 1, + document.pages.len(), + ); + Path::new(&storage) + } else { + path + }; + + // If we are not watching, don't use the cache. + // If the frame is in the cache, skip it. + // If the file does not exist, always create it. + if config.watching + && config.export_cache.is_cached(*i, page) + && path.exists() + { + return Ok(Output::Path(path.to_path_buf())); + } + + Output::Path(path.to_owned()) + } + Output::Stdout => Output::Stdout, + }; + + export_image_page(config, page, &output, fmt)?; + Ok(output) + }) + .collect::>>() +} + +mod output_template { + const INDEXABLE: [&str; 3] = ["{p}", "{0p}", "{n}"]; + + pub fn has_indexable_template(output: &str) -> bool { + INDEXABLE.iter().any(|template| output.contains(template)) + } + + pub fn format(output: &str, this_page: usize, total_pages: usize) -> String { + // Find the base 10 width of number `i` + fn width(i: usize) -> usize { + 1 + i.checked_ilog10().unwrap_or(0) as usize + } + + let other_templates = ["{t}"]; + INDEXABLE.iter().chain(other_templates.iter()).fold( + output.to_string(), + |out, template| { + let replacement = match *template { + "{p}" => format!("{this_page}"), + "{0p}" | "{n}" => format!("{:01$}", this_page, width(total_pages)), + "{t}" => format!("{total_pages}"), + _ => unreachable!("unhandled template placeholder {template}"), + }; + out.replace(template, replacement.as_str()) + }, + ) + } +} + +/// Export single image. +fn export_image_page( + config: &CompileConfig, + page: &Page, + output: &Output, fmt: ImageExportFormat, ) -> StrResult<()> { - // Determine whether we have a `{n}` numbering. - let output = command.output(); - let string = output.to_str().unwrap_or_default(); - let numbered = string.contains("{n}"); - if !numbered && document.pages.len() > 1 { - bail!("cannot export multiple images without `{{n}}` in output path"); + match fmt { + ImageExportFormat::Png => { + let pixmap = typst_render::render(page, config.ppi / 72.0); + let buf = pixmap + .encode_png() + .map_err(|err| eco_format!("failed to encode PNG file ({err})"))?; + output + .write(&buf) + .map_err(|err| eco_format!("failed to write PNG file ({err})"))?; + } + ImageExportFormat::Svg => { + let svg = typst_svg::svg(page); + output + .write(svg.as_bytes()) + .map_err(|err| eco_format!("failed to write SVG file ({err})"))?; + } } + Ok(()) +} - // Find a number width that accommodates all pages. For instance, the - // first page should be numbered "001" if there are between 100 and - // 999 pages. - let width = 1 + document.pages.len().checked_ilog10().unwrap_or(0) as usize; - let mut storage; - - let cache = world.export_cache(); - for (i, frame) in document.pages.iter().enumerate() { - let path = if numbered { - storage = string.replace("{n}", &format!("{:0width$}", i + 1)); - Path::new(&storage) - } else { - output.as_path() - }; +impl Output { + fn write(&self, buffer: &[u8]) -> StrResult<()> { + match self { + Output::Stdout => std::io::stdout().write_all(buffer), + Output::Path(path) => fs::write(path, buffer), + } + .map_err(|err| eco_format!("{err}")) + } +} + +/// Caches exported files so that we can avoid re-exporting them if they haven't +/// changed. +/// +/// This is done by having a list of size `files.len()` that contains the hashes +/// of the last rendered frame in each file. If a new frame is inserted, this +/// will invalidate the rest of the cache, this is deliberate as to decrease the +/// complexity and memory usage of such a cache. +pub struct ExportCache { + /// The hashes of last compilation's frames. + pub cache: RwLock>, +} + +impl ExportCache { + /// Creates a new export cache. + pub fn new() -> Self { + Self { cache: RwLock::new(Vec::with_capacity(32)) } + } + + /// Returns true if the entry is cached and appends the new hash to the + /// cache (for the next compilation). + pub fn is_cached(&self, i: usize, page: &Page) -> bool { + let hash = typst::utils::hash128(page); - // If we are not watching, don't use the cache. - // If the frame is in the cache, skip it. - // If the file does not exist, always create it. - if watching && cache.is_cached(i, frame) && path.exists() { - continue; + let mut cache = self.cache.upgradable_read(); + if i >= cache.len() { + cache.with_upgraded(|cache| cache.push(hash)); + return false; } - match fmt { - ImageExportFormat::Png => { - let pixmap = - typst::export::render(frame, command.ppi / 72.0, Color::WHITE); - pixmap - .save_png(path) - .map_err(|err| eco_format!("failed to write PNG file ({err})"))?; - } - ImageExportFormat::Svg => { - let svg = typst::export::svg(frame); - fs::write(path, svg.as_bytes()) - .map_err(|err| eco_format!("failed to write SVG file ({err})"))?; + cache.with_upgraded(|cache| std::mem::replace(&mut cache[i], hash) == hash) + } +} + +/// Writes a Makefile rule describing the relationship between the output and +/// its dependencies to the path specified by the --make-deps argument, if it +/// was provided. +fn write_make_deps( + world: &mut SystemWorld, + config: &CompileConfig, + outputs: Vec, +) -> StrResult<()> { + let Some(ref make_deps_path) = config.make_deps else { return Ok(()) }; + let Ok(output_paths) = outputs + .into_iter() + .filter_map(|o| match o { + Output::Path(path) => Some(path.into_os_string().into_string()), + Output::Stdout => None, + }) + .collect::, _>>() + else { + bail!( + "failed to create make dependencies file because output path was not valid unicode" + ) + }; + if output_paths.is_empty() { + bail!("failed to create make dependencies file because output was stdout") + } + + // Based on `munge` in libcpp/mkdeps.cc from the GCC source code. This isn't + // perfect as some special characters can't be escaped. + fn munge(s: &str) -> String { + let mut res = String::with_capacity(s.len()); + let mut slashes = 0; + for c in s.chars() { + match c { + '\\' => slashes += 1, + '$' => { + res.push('$'); + slashes = 0; + } + ':' => { + res.push('\\'); + slashes = 0; + } + ' ' | '\t' => { + // `munge`'s source contains a comment here that says: "A + // space or tab preceded by 2N+1 backslashes represents N + // backslashes followed by space..." + for _ in 0..slashes + 1 { + res.push('\\'); + } + slashes = 0; + } + '#' => { + res.push('\\'); + slashes = 0; + } + _ => slashes = 0, + }; + res.push(c); + } + res + } + + fn write( + make_deps_path: &Path, + output_paths: Vec, + root: PathBuf, + dependencies: impl Iterator, + ) -> io::Result<()> { + let mut file = File::create(make_deps_path)?; + let current_dir = std::env::current_dir()?; + let relative_root = diff_paths(&root, ¤t_dir).unwrap_or(root.clone()); + + for (i, output_path) in output_paths.into_iter().enumerate() { + if i != 0 { + file.write_all(b" ")?; } + file.write_all(munge(&output_path).as_bytes())?; + } + file.write_all(b":")?; + for dependency in dependencies { + let relative_dependency = match dependency.strip_prefix(&root) { + Ok(root_relative_dependency) => { + relative_root.join(root_relative_dependency) + } + Err(_) => dependency, + }; + let Some(relative_dependency) = relative_dependency.to_str() else { + // Silently skip paths that aren't valid unicode so we still + // produce a rule that will work for the other paths that can be + // processed. + continue; + }; + + file.write_all(b" ")?; + file.write_all(munge(relative_dependency).as_bytes())?; } + file.write_all(b"\n")?; + + Ok(()) } - Ok(()) + write(make_deps_path, output_paths, world.root().to_owned(), world.dependencies()) + .map_err(|err| { + eco_format!("failed to create make dependencies file due to IO error ({err})") + }) +} + +/// Opens the output if desired. +fn open_output(config: &mut CompileConfig) -> StrResult<()> { + let Some(viewer) = config.open.take() else { return Ok(()) }; + + #[cfg(feature = "http-server")] + if let Some(server) = &config.server { + let url = format!("http://{}", server.addr()); + return open_path(OsStr::new(&url), viewer.as_deref()); + } + + // Can't open stdout. + let Output::Path(path) = &config.output else { return Ok(()) }; + + // Some resource openers require the path to be canonicalized. + let path = path + .canonicalize() + .map_err(|err| eco_format!("failed to canonicalize path ({err})"))?; + + open_path(path.as_os_str(), viewer.as_deref()) } /// Opens the given file using: -/// - The default file viewer if `open` is `None`. -/// - The given viewer provided by `open` if it is `Some`. -fn open_file(open: Option<&str>, path: &Path) -> StrResult<()> { - if let Some(app) = open { - open::with_in_background(path, app); +/// +/// - The default file viewer if `app` is `None`. +/// - The given viewer provided by `app` if it is `Some`. +fn open_path(path: &OsStr, viewer: Option<&str>) -> StrResult<()> { + if let Some(viewer) = viewer { + open::with_detached(path, viewer) + .map_err(|err| eco_format!("failed to open file with {} ({})", viewer, err)) } else { - open::that_in_background(path); + open::that_detached(path).map_err(|err| { + let openers = open::commands(path) + .iter() + .map(|command| command.get_program().to_string_lossy()) + .collect::>() + .join(", "); + eco_format!( + "failed to open file with any of these resource openers: {} ({})", + openers, + err, + ) + }) } - - Ok(()) } /// Print diagnostic messages to the terminal. @@ -256,11 +654,6 @@ pub fn print_diagnostics( warnings: &[SourceDiagnostic], diagnostic_format: DiagnosticFormat, ) -> Result<(), codespan_reporting::files::Error> { - let mut w = match diagnostic_format { - DiagnosticFormat::Human => color_stream(), - DiagnosticFormat::Short => StandardStream::stderr(ColorChoice::Never), - }; - let mut config = term::Config { tab_width: 2, ..Default::default() }; if diagnostic_format == DiagnosticFormat::Short { config.display_style = term::DisplayStyle::Short; @@ -281,7 +674,7 @@ pub fn print_diagnostics( ) .with_labels(label(world, diagnostic.span).into_iter().collect()); - term::emit(&mut w, &config, world, &diag)?; + term::emit(&mut terminal::out(), &config, world, &diag)?; // Stacktrace-like helper diagnostics. for point in &diagnostic.trace { @@ -290,7 +683,7 @@ pub fn print_diagnostics( .with_message(message) .with_labels(label(world, point.span).into_iter().collect()); - term::emit(&mut w, &config, world, &help)?; + term::emit(&mut terminal::out(), &config, world, &help)?; } } @@ -305,7 +698,7 @@ fn label(world: &SystemWorld, span: Span) -> Option> { impl<'a> codespan_reporting::files::Files<'a> for SystemWorld { type FileId = FileId; type Name = String; - type Source = Source; + type Source = Lines; fn name(&'a self, id: FileId) -> CodespanResult { let vpath = id.vpath(); @@ -365,3 +758,23 @@ impl<'a> codespan_reporting::files::Files<'a> for SystemWorld { }) } } + +impl From for typst_pdf::PdfStandard { + fn from(standard: PdfStandard) -> Self { + match standard { + PdfStandard::V_1_4 => typst_pdf::PdfStandard::V_1_4, + PdfStandard::V_1_5 => typst_pdf::PdfStandard::V_1_5, + PdfStandard::V_1_6 => typst_pdf::PdfStandard::V_1_6, + PdfStandard::V_1_7 => typst_pdf::PdfStandard::V_1_7, + PdfStandard::V_2_0 => typst_pdf::PdfStandard::V_2_0, + PdfStandard::A_1b => typst_pdf::PdfStandard::A_1b, + PdfStandard::A_2b => typst_pdf::PdfStandard::A_2b, + PdfStandard::A_2u => typst_pdf::PdfStandard::A_2u, + PdfStandard::A_3b => typst_pdf::PdfStandard::A_3b, + PdfStandard::A_3u => typst_pdf::PdfStandard::A_3u, + PdfStandard::A_4 => typst_pdf::PdfStandard::A_4, + PdfStandard::A_4f => typst_pdf::PdfStandard::A_4f, + PdfStandard::A_4e => typst_pdf::PdfStandard::A_4e, + } + } +} diff --git a/crates/typst-cli/src/completions.rs b/crates/typst-cli/src/completions.rs new file mode 100644 index 000000000000..51e7db103319 --- /dev/null +++ b/crates/typst-cli/src/completions.rs @@ -0,0 +1,13 @@ +use std::io::stdout; + +use clap::CommandFactory; +use clap_complete::generate; + +use crate::args::{CliArguments, CompletionsCommand}; + +/// Execute the completions command. +pub fn completions(command: &CompletionsCommand) { + let mut cmd = CliArguments::command(); + let bin_name = cmd.get_name().to_string(); + generate(command.shell, &mut cmd, bin_name, &mut stdout()); +} diff --git a/crates/typst-cli/src/download.rs b/crates/typst-cli/src/download.rs index 9db73fe8685a..28317ff72176 100644 --- a/crates/typst-cli/src/download.rs +++ b/crates/typst-cli/src/download.rs @@ -1,251 +1,120 @@ -// Acknowledgement: -// Closely modelled after rustup's [`DownloadTracker`]. -// https://github.com/rust-lang/rustup/blob/master/src/cli/download_tracker.rs - -use std::collections::VecDeque; -use std::io::{self, ErrorKind, Read, Stderr, Write}; -use std::sync::Arc; +use std::fmt::Display; +use std::io; +use std::io::Write; use std::time::{Duration, Instant}; -use once_cell::sync::Lazy; -use ureq::Response; - -/// Keep track of this many download speed samples. -const SPEED_SAMPLES: usize = 5; - -/// Lazily loads a custom CA certificate if present, but if there's an error -/// loading certificate, it just uses the default configuration. -static TLS_CONFIG: Lazy>> = Lazy::new(|| { - crate::ARGS - .cert - .as_ref() - .map(|path| { - let file = std::fs::OpenOptions::new().read(true).open(path)?; - let mut buffer = std::io::BufReader::new(file); - let certs = rustls_pemfile::certs(&mut buffer)?; - let mut store = rustls::RootCertStore::empty(); - store.add_parsable_certificates(&certs); - let config = rustls::ClientConfig::builder() - .with_safe_defaults() - .with_root_certificates(store) - .with_no_client_auth(); - Ok::<_, std::io::Error>(Arc::new(config)) - }) - .and_then(|x| x.ok()) -}); - -/// Download binary data and display its progress. -#[allow(clippy::result_large_err)] -pub fn download_with_progress(url: &str) -> Result, ureq::Error> { - let mut builder = ureq::AgentBuilder::new() - .user_agent(concat!("typst/{}", env!("CARGO_PKG_VERSION"))); - - // Get the network proxy config from the environment. - if let Some(proxy) = env_proxy::for_url_str(url) - .to_url() - .and_then(|url| ureq::Proxy::new(url).ok()) - { - builder = builder.proxy(proxy); - } - - // Apply a custom CA certificate if present. - if let Some(config) = &*TLS_CONFIG { - builder = builder.tls_config(config.clone()); - } +use codespan_reporting::term; +use codespan_reporting::term::termcolor::WriteColor; +use typst::utils::format_duration; +use typst_kit::download::{DownloadState, Downloader, Progress}; - let agent = builder.build(); - let response = agent.get(url).call()?; - Ok(RemoteReader::from_response(response).download()?) -} - -/// A wrapper around [`ureq::Response`] that reads the response body in chunks -/// over a websocket and displays statistics about its progress. -/// -/// Downloads will _never_ fail due to statistics failing to print, print errors -/// are silently ignored. -struct RemoteReader { - reader: Box, - content_len: Option, - total_downloaded: usize, - downloaded_this_sec: usize, - downloaded_last_few_secs: VecDeque, - start_time: Instant, - last_print: Option, - displayed_charcount: Option, - stderr: Stderr, -} +use crate::ARGS; +use crate::terminal::{self, TermOut}; -impl RemoteReader { - /// Wraps a [`ureq::Response`] and prepares it for downloading. - /// - /// The 'Content-Length' header is used as a size hint for read - /// optimization, if present. - pub fn from_response(response: Response) -> Self { - let content_len: Option = response - .header("Content-Length") - .and_then(|header| header.parse().ok()); - - Self { - reader: response.into_reader(), - content_len, - total_downloaded: 0, - downloaded_this_sec: 0, - downloaded_last_few_secs: VecDeque::with_capacity(SPEED_SAMPLES), - start_time: Instant::now(), - last_print: None, - displayed_charcount: None, - stderr: io::stderr(), - } - } +/// Prints download progress by writing `downloading {0}` followed by repeatedly +/// updating the last terminal line. +pub struct PrintDownload(pub T); - /// Download the bodies content as raw bytes while attempting to print - /// download statistics to standard error. Download progress gets displayed - /// and updated every second. - /// - /// These statistics will never prevent a download from completing, errors - /// are silently ignored. - pub fn download(mut self) -> io::Result> { - let mut buffer = vec![0; 8192]; - let mut data = match self.content_len { - Some(content_len) => Vec::with_capacity(content_len), - None => Vec::with_capacity(8192), - }; - - loop { - let read = match self.reader.read(&mut buffer) { - Ok(0) => break, - Ok(n) => n, - // If the data is not yet ready but will be available eventually - // keep trying until we either get an actual error, receive data - // or an Ok(0). - Err(ref e) if e.kind() == ErrorKind::Interrupted => continue, - Err(e) => return Err(e), - }; - - data.extend(&buffer[..read]); - - let last_printed = match self.last_print { - Some(prev) => prev, - None => { - let current_time = Instant::now(); - self.last_print = Some(current_time); - current_time - } - }; - let elapsed = Instant::now().saturating_duration_since(last_printed); - - self.total_downloaded += read; - self.downloaded_this_sec += read; - - if elapsed >= Duration::from_secs(1) { - if self.downloaded_last_few_secs.len() == SPEED_SAMPLES { - self.downloaded_last_few_secs.pop_back(); - } - - self.downloaded_last_few_secs.push_front(self.downloaded_this_sec); - self.downloaded_this_sec = 0; - - if let Some(n) = self.displayed_charcount { - self.erase_chars(n); - } - - self.display(); - let _ = write!(self.stderr, "\r"); - self.last_print = Some(Instant::now()); - } - } +impl Progress for PrintDownload { + fn print_start(&mut self) { + // Print that a package downloading is happening. + let styles = term::Styles::default(); - self.display(); - let _ = writeln!(self.stderr); + let mut out = terminal::out(); + let _ = out.set_color(&styles.header_help); + let _ = write!(out, "downloading"); - Ok(data) + let _ = out.reset(); + let _ = writeln!(out, " {}", self.0); } - /// Compile and format several download statistics and make an attempt at - /// displaying them on standard error. - fn display(&mut self) { - let sum: usize = self.downloaded_last_few_secs.iter().sum(); - let len = self.downloaded_last_few_secs.len(); - let speed = if len > 0 { sum / len } else { self.content_len.unwrap_or(0) }; - - let total = as_time_unit(self.total_downloaded, false); - let speed_h = as_time_unit(speed, true); - let elapsed = - time_suffix(Instant::now().saturating_duration_since(self.start_time)); - - let output = match self.content_len { - Some(content_len) => { - let percent = (self.total_downloaded as f64 / content_len as f64) * 100.; - let remaining = content_len - self.total_downloaded; - - format!( - "{} / {} ({:3.0} %) {} in {} ETA: {}", - total, - as_time_unit(content_len, false), - percent, - speed_h, - elapsed, - time_suffix(Duration::from_secs(if speed == 0 { - 0 - } else { - (remaining / speed) as u64 - })) - ) - } - None => format!("Total: {} Speed: {} Elapsed: {}", total, speed_h, elapsed,), - }; - - let _ = write!(self.stderr, "{output}"); - - self.displayed_charcount = Some(output.chars().count()); + fn print_progress(&mut self, state: &DownloadState) { + let mut out = terminal::out(); + let _ = out.clear_last_line(); + let _ = display_download_progress(&mut out, state); } - /// Erase each previously printed character and add a carriage return - /// character, clearing the line for the next `display()` update. - fn erase_chars(&mut self, count: usize) { - let _ = write!(self.stderr, "{}", " ".repeat(count)); - let _ = write!(self.stderr, "\r"); + fn print_finish(&mut self, state: &DownloadState) { + let mut out = terminal::out(); + let _ = display_download_progress(&mut out, state); + let _ = writeln!(out); } } -/// Append a unit-of-time suffix. -fn time_suffix(duration: Duration) -> String { - let secs = duration.as_secs(); - match format_dhms(secs) { - (0, 0, 0, s) => format!("{s:2.0}s"), - (0, 0, m, s) => format!("{m:2.0}m {s:2.0}s"), - (0, h, m, s) => format!("{h:2.0}h {m:2.0}m {s:2.0}s"), - (d, h, m, s) => format!("{d:3.0}d {h:2.0}h {m:2.0}m {s:2.0}s"), +/// Returns a new downloader. +pub fn downloader() -> Downloader { + let user_agent = concat!("typst/", env!("CARGO_PKG_VERSION")); + match ARGS.cert.clone() { + Some(cert) => Downloader::with_path(user_agent, cert), + None => Downloader::new(user_agent), } } -/// Format the total amount of seconds into the amount of days, hours, minutes -/// and seconds. -fn format_dhms(sec: u64) -> (u64, u8, u8, u8) { - let (mins, sec) = (sec / 60, (sec % 60) as u8); - let (hours, mins) = (mins / 60, (mins % 60) as u8); - let (days, hours) = (hours / 24, (hours % 24) as u8); - (days, hours, mins, sec) +/// Compile and format several download statistics and make and attempt at +/// displaying them on standard error. +pub fn display_download_progress( + out: &mut TermOut, + state: &DownloadState, +) -> io::Result<()> { + let sum: usize = state.bytes_per_second.iter().sum(); + let len = state.bytes_per_second.len(); + let speed = if len > 0 { sum / len } else { state.content_len.unwrap_or(0) }; + + let total_downloaded = as_bytes_unit(state.total_downloaded); + let speed_h = as_throughput_unit(speed); + let elapsed = Instant::now().saturating_duration_since(state.start_time); + + match state.content_len { + Some(content_len) => { + let percent = (state.total_downloaded as f64 / content_len as f64) * 100.; + let remaining = content_len - state.total_downloaded; + + let download_size = as_bytes_unit(content_len); + let eta = Duration::from_secs(if speed == 0 { + 0 + } else { + (remaining / speed) as u64 + }); + + writeln!( + out, + "{total_downloaded} / {download_size} ({percent:3.0} %) \ + {speed_h} in {elapsed} ETA: {eta}", + elapsed = format_duration(elapsed), + eta = format_duration(eta), + )?; + } + None => writeln!( + out, + "Total downloaded: {total_downloaded} \ + Speed: {speed_h} \ + Elapsed: {elapsed}", + elapsed = format_duration(elapsed), + )?, + }; + Ok(()) } /// Format a given size as a unit of time. Setting `include_suffix` to true /// appends a '/s' (per second) suffix. -fn as_time_unit(size: usize, include_suffix: bool) -> String { +fn as_bytes_unit(size: usize) -> String { const KI: f64 = 1024.0; const MI: f64 = KI * KI; const GI: f64 = KI * KI * KI; let size = size as f64; - let suffix = if include_suffix { "/s" } else { "" }; - if size >= GI { - format!("{:5.1} GiB{}", size / GI, suffix) + format!("{:5.1} GiB", size / GI) } else if size >= MI { - format!("{:5.1} MiB{}", size / MI, suffix) + format!("{:5.1} MiB", size / MI) } else if size >= KI { - format!("{:5.1} KiB{}", size / KI, suffix) + format!("{:5.1} KiB", size / KI) } else { - format!("{size:3.0} B{}", suffix) + format!("{size:3} B") } } + +fn as_throughput_unit(size: usize) -> String { + as_bytes_unit(size) + "/s" +} diff --git a/crates/typst-cli/src/fonts.rs b/crates/typst-cli/src/fonts.rs index 7c7857167980..dbe28d6f5522 100644 --- a/crates/typst-cli/src/fonts.rs +++ b/crates/typst-cli/src/fonts.rs @@ -1,19 +1,15 @@ -use std::cell::OnceCell; -use std::fs; -use std::path::PathBuf; - -use fontdb::{Database, Source}; -use typst::diag::StrResult; -use typst::font::{Font, FontBook, FontInfo, FontVariant}; +use typst::text::FontVariant; +use typst_kit::fonts::Fonts; use crate::args::FontsCommand; /// Execute a font listing command. -pub fn fonts(command: &FontsCommand) -> StrResult<()> { - let mut searcher = FontSearcher::new(); - searcher.search(&command.font_paths); +pub fn fonts(command: &FontsCommand) { + let fonts = Fonts::searcher() + .include_system_fonts(!command.font.ignore_system_fonts) + .search_with(&command.font.font_paths); - for (name, infos) in searcher.book.families() { + for (name, infos) in fonts.book.families() { println!("{name}"); if command.variants { for info in infos { @@ -22,121 +18,4 @@ pub fn fonts(command: &FontsCommand) -> StrResult<()> { } } } - - Ok(()) -} - -/// Searches for fonts. -pub struct FontSearcher { - /// Metadata about all discovered fonts. - pub book: FontBook, - /// Slots that the fonts are loaded into. - pub fonts: Vec, -} - -/// Holds details about the location of a font and lazily the font itself. -pub struct FontSlot { - /// The path at which the font can be found on the system. - path: PathBuf, - /// The index of the font in its collection. Zero if the path does not point - /// to a collection. - index: u32, - /// The lazily loaded font. - font: OnceCell>, -} - -impl FontSlot { - /// Get the font for this slot. - pub fn get(&self) -> Option { - self.font - .get_or_init(|| { - let data = fs::read(&self.path).ok()?.into(); - Font::new(data, self.index) - }) - .clone() - } -} - -impl FontSearcher { - /// Create a new, empty system searcher. - pub fn new() -> Self { - Self { book: FontBook::new(), fonts: vec![] } - } - - /// Search everything that is available. - pub fn search(&mut self, font_paths: &[PathBuf]) { - let mut db = Database::new(); - - // Font paths have highest priority. - for path in font_paths { - db.load_fonts_dir(path); - } - - // System fonts have second priority. - db.load_system_fonts(); - - for face in db.faces() { - let path = match &face.source { - Source::File(path) | Source::SharedFile(path, _) => path, - // We never add binary sources to the database, so there - // shouln't be any. - Source::Binary(_) => continue, - }; - - let info = db - .with_face_data(face.id, FontInfo::new) - .expect("database must contain this font"); - - if let Some(info) = info { - self.book.push(info); - self.fonts.push(FontSlot { - path: path.clone(), - index: face.index, - font: OnceCell::new(), - }); - } - } - - // Embedded fonts have lowest priority. - #[cfg(feature = "embed-fonts")] - self.add_embedded(); - } - - /// Add fonts that are embedded in the binary. - #[cfg(feature = "embed-fonts")] - fn add_embedded(&mut self) { - let mut process = |bytes: &'static [u8]| { - let buffer = typst::eval::Bytes::from_static(bytes); - for (i, font) in Font::iter(buffer).enumerate() { - self.book.push(font.info().clone()); - self.fonts.push(FontSlot { - path: PathBuf::new(), - index: i as u32, - font: OnceCell::from(Some(font)), - }); - } - }; - - macro_rules! add { - ($filename:literal) => { - process(include_bytes!(concat!("../../../assets/fonts/", $filename))); - }; - } - - // Embed default fonts. - add!("LinLibertine_R.ttf"); - add!("LinLibertine_RB.ttf"); - add!("LinLibertine_RBI.ttf"); - add!("LinLibertine_RI.ttf"); - add!("NewCMMath-Book.otf"); - add!("NewCMMath-Regular.otf"); - add!("NewCM10-Regular.otf"); - add!("NewCM10-Bold.otf"); - add!("NewCM10-Italic.otf"); - add!("NewCM10-BoldItalic.otf"); - add!("DejaVuSansMono.ttf"); - add!("DejaVuSansMono-Bold.ttf"); - add!("DejaVuSansMono-Oblique.ttf"); - add!("DejaVuSansMono-BoldOblique.ttf"); - } } diff --git a/crates/typst-cli/src/greet.rs b/crates/typst-cli/src/greet.rs new file mode 100644 index 000000000000..01f273fcff17 --- /dev/null +++ b/crates/typst-cli/src/greet.rs @@ -0,0 +1,66 @@ +use std::io::{self, Read}; + +/// This is shown to users who just type `typst` the first time. +#[rustfmt::skip] +const GREETING: &str = color_print::cstr!("\ +Welcome to Typst, we are glad to have you here! ❤️ + +If you are new to Typst, start with the tutorial at \ +https://typst.app/docs/tutorial/. To get a quick start with your first \ +project, choose a template on https://typst.app/universe/. + +Here are the most important commands you will be using: + +- Compile a file once: typst compile file.typ +- Compile a file on every change: typst watch file.typ +- Set up a project from a template: typst init @preview/<