Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
8a93a7a
claude: Add PDF layout verification test infrastructure
gordonwoodhull Jan 2, 2026
cdb579f
claude: Add Typst margin layout support
gordonwoodhull Dec 28, 2025
77b5a30
claude: Add typst-gather tool for offline package staging
gordonwoodhull Jan 12, 2026
a5bb8c4
claude: Add typst-gather to build and release process
gordonwoodhull Jan 13, 2026
5bb4444
claude: Add @local import detection and --init-config to typst-gather
gordonwoodhull Jan 13, 2026
67db389
claude: Fix typst-gather CI compatibility and error output
gordonwoodhull Jan 13, 2026
c5e8f1d
claude: Improve typst-gather --init-config and error handling
gordonwoodhull Jan 13, 2026
2be68a9
claude: Add rootdir support to typst-gather config
gordonwoodhull Jan 13, 2026
48c3b02
claude: Pass config file directly to typst-gather rust tool
gordonwoodhull Jan 13, 2026
0532e8d
claude: Add typst-gather tests for rootdir and @local packages
gordonwoodhull Jan 13, 2026
fdbade3
claude: Display relative paths in typst-gather output
gordonwoodhull Jan 13, 2026
3845f18
claude: Filter excluded files when copying @local packages
gordonwoodhull Jan 13, 2026
a983b47
claude: Skip @preview downloads for packages configured as @local
gordonwoodhull Jan 13, 2026
ec166da
claude: Refactor typst-gather to use GatherContext struct
gordonwoodhull Jan 13, 2026
8524007
claude: Add smoke tests for typst template extensions
gordonwoodhull Jan 13, 2026
63ad04d
claude: Only set typst package paths when staging dirs exist
gordonwoodhull Jan 13, 2026
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: "1.81"

- 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: "1.81"

- 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: "1.81"

- 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: "1.81"

- 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: "1.81"

- 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
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