Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 20 additions & 4 deletions .github/workflows/actions/quarto-dev/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,22 @@ runs:
restore-keys: |
${{ runner.os }}-deno_std-2-

- name: Install Rust for typst-gather
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable

- name: Cache Cargo dependencies
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
package/typst-gather/target
key: ${{ runner.os }}-cargo-typst-gather-${{ hashFiles('package/typst-gather/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-typst-gather-

- name: Configure Quarto (.sh)
if: runner.os != 'Windows'
shell: bash
Expand All @@ -33,13 +49,13 @@ runs:
- name: Basic dev mode sanity check
shell: pwsh
run: |
If ( "$(quarto --version)" -ne "99.9.9") {
If ( "$(quarto --version)" -ne "99.9.9") {
echo "Unexpected version detected: $(quarto --version)"
Exit 1
Exit 1
}
If ( $(quarto --paths | Select-String -Pattern "package[/\\]+dist[/\\]+share") -ne $null ) {
If ( $(quarto --paths | Select-String -Pattern "package[/\\]+dist[/\\]+share") -ne $null ) {
echo "Unexpected package/dist/share path detected: $(quarto --paths)"
Exit 1
Exit 1
}
# check if configure is modifying some files as it should not
$modifiedFiles = git diff --name-only
Expand Down
25 changes: 21 additions & 4 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,11 @@ jobs:
if: ${{ inputs.publish-release }}
uses: ./.github/workflows/actions/prevent-rerun

- name: Install Rust for typst-gather
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable

- name: Configure
run: |
./configure.sh
Expand Down Expand Up @@ -261,6 +266,11 @@ jobs:
if: ${{ inputs.publish-release }}
uses: ./.github/workflows/actions/prevent-rerun

- name: Install Rust for typst-gather
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable

- name: Configure
run: |
./configure.sh
Expand Down Expand Up @@ -360,10 +370,11 @@ jobs:
if: ${{ inputs.publish-release }}
uses: ./.github/workflows/actions/prevent-rerun

- name: Configure Rust Tools
run: |
rustup.exe toolchain install 1.63.0 --component rustfmt --component clippy --no-self-update
rustup.exe default 1.63.0
- name: Install Rust for typst-gather and launcher
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable

- name: Configure
run: |
.\configure.cmd
Expand All @@ -389,6 +400,7 @@ jobs:
./package/pkg-working/bin/tools/x86_64/esbuild.exe
./package/pkg-working/bin/tools/x86_64/dart-sass/src/dart.exe
./package/pkg-working/bin/tools/x86_64/deno_dom/plugin.dll
./package/pkg-working/bin/tools/x86_64/typst-gather.exe
./package/pkg-working/bin/tools/pandoc.exe
./package/pkg-working/bin/quarto.js
env:
Expand Down Expand Up @@ -491,6 +503,11 @@ jobs:
if: ${{ inputs.publish-release }}
uses: ./.github/workflows/actions/prevent-rerun

- name: Install Rust for typst-gather
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable

- name: Configure
run: |
./configure.sh
Expand Down
10 changes: 10 additions & 0 deletions configure.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,16 @@ IF EXIST !QUARTO_BIN_PATH!\quarto.cmd (
ECHO NOTE: To use quarto please use quarto.cmd (located in this folder) or add the following path to your PATH
ECHO !QUARTO_BIN_PATH!

REM Build typst-gather if cargo is available
where cargo >nul 2>nul
if %ERRORLEVEL% EQU 0 (
ECHO Building typst-gather...
cargo build --release --manifest-path package\typst-gather\Cargo.toml
) else (
ECHO Note: Rust/cargo not found, skipping typst-gather build
ECHO Install Rust to use 'quarto call typst-gather'
)

endlocal & set QUARTO_BIN_DEV=%QUARTO_BIN_PATH%

GOTO :eof
Expand Down
9 changes: 9 additions & 0 deletions configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,12 @@ else
export QUARTO_DENO_EXTRA_OPTIONS="--reload"
quarto --version
fi

# Build typst-gather if cargo is available
if command -v cargo &> /dev/null; then
echo "Building typst-gather..."
cargo build --release --manifest-path package/typst-gather/Cargo.toml
else
echo "Note: Rust/cargo not found, skipping typst-gather build"
echo "Install Rust to use 'quarto call typst-gather'"
fi
1 change: 1 addition & 0 deletions news/changelog-1.9.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ All changes included in 1.9:
- ([rstudio/tinytex-releases#49](https://github.com/rstudio/tinytex-releases/issues/49)): Fix detection of LuaTeX-ja missing file errors by matching both "File" and "file" in error messages.
- ([#13667](https://github.com/quarto-dev/quarto-cli/issues/13667)): Fix LaTeX compilation error with Python error output containing caret characters.
- ([#13730](https://github.com/quarto-dev/quarto-cli/issues/13730)): Fix TinyTeX detection when `~/.TinyTeX/` directory exists without binaries. Quarto now verifies that the bin directory and tlmgr binary exist before reporting TinyTeX as available, allowing proper fallback to system PATH installations.
- ([#13919](https://github.com/quarto-dev/quarto-cli/issues/13919)): Fix margin citations with citeproc showing unresolved `?quarto-cite:` placeholders in PDF output. Caused by Pandoc 3.6+ adding `\protect` before `\phantomsection` in bibliography anchors.
- ([#13249](https://github.com/quarto-dev/quarto-cli/pull/13249)): Update to Pandoc's LaTeX template following Pandoc 3.8.3 support:
- New RTL support for LuaTeX with `\RL`, `\LR` commands and `RTL`, `LTR` environments.
- New `shorthands` variable for Babel language shortcuts control.
Expand Down
24 changes: 24 additions & 0 deletions package/src/common/prepare-dist.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,30 @@ export async function prepareDist(
}
}

// Stage typst-gather binary if it exists (built by configure.sh)
// Only stage if the build machine architecture matches the target architecture
// (cross-compilation is not currently supported)
const buildArch = Deno.build.arch === "aarch64" ? "aarch64" : "x86_64";
if (buildArch === config.arch) {
const typstGatherBinaryName = config.os === "windows" ? "typst-gather.exe" : "typst-gather";
const typstGatherSrc = join(
config.directoryInfo.root,
"package/typst-gather/target/release",
typstGatherBinaryName,
);
if (existsSync(typstGatherSrc)) {
info("\nStaging typst-gather binary");
const typstGatherDest = join(targetDir, config.arch, typstGatherBinaryName);
ensureDirSync(join(targetDir, config.arch));
copySync(typstGatherSrc, typstGatherDest, { overwrite: true });
info(`Copied ${typstGatherSrc} to ${typstGatherDest}`);
} else {
info("\nNote: typst-gather binary not found, skipping staging");
}
} else {
info(`\nNote: Skipping typst-gather staging (build arch ${buildArch} != target arch ${config.arch})`);
}

// build quarto-preview.js
info("Building Quarto Web UI");
const result = buildQuartoPreviewJs(config.directoryInfo.src, undefined, true);
Expand Down
1 change: 1 addition & 0 deletions package/typst-gather/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/target
Loading
Loading