Skip to content

Commit 8faf262

Browse files
Remove in-tree Rust project, activate typst-gather binary dependency
Remove the Rust source tree at package/typst-gather/ and switch to the downloaded binary registered in the previous commit. - Remove archiveOnly flag to enable download during configure - Remove cargo build from configure.sh and configure.cmd - Remove typst-gather staging from prepare-dist.ts - Remove Cargo cache step from CI workflow - Add QUARTO_TYPST_GATHER env var override support
1 parent 629b5db commit 8faf262

14 files changed

Lines changed: 3 additions & 4602 deletions

File tree

.github/workflows/actions/quarto-dev/action.yml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,6 @@ runs:
1212
restore-keys: |
1313
${{ runner.os }}-deno_std-2-
1414
15-
- name: Cache Cargo dependencies
16-
uses: actions/cache@v5
17-
with:
18-
path: |
19-
~/.cargo/registry
20-
~/.cargo/git
21-
package/typst-gather/target
22-
key: ${{ runner.os }}-cargo-typst-gather-${{ hashFiles('package/typst-gather/Cargo.lock') }}
23-
restore-keys: |
24-
${{ runner.os }}-cargo-typst-gather-
25-
2615
- name: Configure Quarto (.sh)
2716
if: runner.os != 'Windows'
2817
shell: bash

configure.cmd

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,6 @@ IF EXIST !QUARTO_BIN_PATH!\quarto.cmd (
104104
ECHO NOTE: To use quarto please use quarto.cmd (located in this folder) or add the following path to your PATH
105105
ECHO !QUARTO_BIN_PATH!
106106

107-
REM Build typst-gather and install to tools directory
108-
ECHO Building typst-gather...
109-
cargo build --release --manifest-path package\typst-gather\Cargo.toml
110-
COPY package\typst-gather\target\release\typst-gather.exe "!QUARTO_BIN_PATH!\tools\x86_64\"
111-
112107
endlocal & set QUARTO_BIN_DEV=%QUARTO_BIN_PATH%
113108

114109
GOTO :eof

configure.sh

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,3 @@ else
102102
export QUARTO_DENO_EXTRA_OPTIONS="--reload"
103103
quarto --version
104104
fi
105-
106-
# Build typst-gather and install to tools directory
107-
echo "Building typst-gather..."
108-
cargo build --release --manifest-path package/typst-gather/Cargo.toml
109-
cp package/typst-gather/target/release/typst-gather "$QUARTO_BIN_PATH/tools/$DENO_ARCH_DIR/"

package/src/common/dependencies/typst-gather.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ export function typstGather(version: string): Dependency {
4242
name: "typst-gather",
4343
bucket: "typst-gather",
4444
version,
45-
archiveOnly: true,
4645
architectureDependencies: {
4746
"x86_64": {
4847
"windows": typstGatherRelease("typst-gather-x86_64-pc-windows-msvc.zip"),

package/src/common/prepare-dist.ts

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -100,32 +100,6 @@ export async function prepareDist(
100100
}
101101
}
102102

103-
// Stage typst-gather binary (built by configure.sh)
104-
// Only stage if the build machine architecture matches the target architecture
105-
// (cross-compilation is not currently supported)
106-
const buildArch = Deno.build.arch === "aarch64" ? "aarch64" : "x86_64";
107-
if (buildArch === config.arch) {
108-
const typstGatherBinaryName = config.os === "windows" ? "typst-gather.exe" : "typst-gather";
109-
const typstGatherSrc = join(
110-
config.directoryInfo.root,
111-
"package/typst-gather/target/release",
112-
typstGatherBinaryName,
113-
);
114-
if (!existsSync(typstGatherSrc)) {
115-
throw new Error(
116-
`typst-gather binary not found at ${typstGatherSrc}\n` +
117-
"Run ./configure.sh to build it.",
118-
);
119-
}
120-
info("\nStaging typst-gather binary");
121-
const typstGatherDest = join(targetDir, config.arch, typstGatherBinaryName);
122-
ensureDirSync(join(targetDir, config.arch));
123-
copySync(typstGatherSrc, typstGatherDest, { overwrite: true });
124-
info(`Copied ${typstGatherSrc} to ${typstGatherDest}`);
125-
} else {
126-
info(`\nNote: Skipping typst-gather staging (build arch ${buildArch} != target arch ${config.arch})`);
127-
}
128-
129103
// build quarto-preview.js
130104
info("Building Quarto Web UI");
131105
const result = buildQuartoPreviewJs(config.directoryInfo.src, undefined, true);

package/typst-gather/.gitignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)