Skip to content

Commit 83a54be

Browse files
authored
Use Zig to cross-compile ARM64 Linux builds (#4)
1 parent 2dc2fbc commit 83a54be

2 files changed

Lines changed: 15 additions & 25 deletions

File tree

.github/workflows/release.yml

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,8 @@ jobs:
120120
asset_content_type: application/zip
121121

122122
build-linux-arm64:
123-
name: Build Linux ARM64
124-
runs-on: ubuntu-24.04-arm64
123+
name: Build Linux ARM64 (cross-compile)
124+
runs-on: ubuntu-latest
125125
needs: create-release
126126
permissions:
127127
contents: write
@@ -147,20 +147,16 @@ jobs:
147147
EXTENSION_NAME=${{ env.EXTENSION_NAME }} \
148148
EXTENSION_API_VERSION=${{ env.EXTENSION_API_VERSION }}
149149
150-
- name: Download DuckDB CLI
151-
run: |
152-
wget -q https://github.com/duckdb/duckdb/releases/download/${{ env.DUCKDB_VERSION }}/duckdb_cli-linux-arm64.zip
153-
unzip -q duckdb_cli-linux-arm64.zip
154-
chmod +x duckdb
155-
156-
- name: Smoke test
150+
- name: Verify build artifact
157151
run: |
158-
./duckdb -unsigned -c "
159-
LOAD 'zig-out/lib/linux_arm64/${{ env.EXTENSION_NAME }}.duckdb_extension';
160-
SELECT extension_name, loaded, extension_version FROM duckdb_extensions() WHERE extension_name = '${{ env.EXTENSION_NAME }}';
161-
" > test_output.txt
162-
cat test_output.txt
163-
grep -q "${{ env.EXTENSION_NAME }}" test_output.txt && grep -q "true" test_output.txt && echo "Smoke test passed: Extension loaded successfully" || (echo "Smoke test failed" && exit 1)
152+
if [ -f "zig-out/lib/linux_arm64/${{ env.EXTENSION_NAME }}.duckdb_extension" ]; then
153+
echo "Extension built successfully"
154+
file zig-out/lib/linux_arm64/${{ env.EXTENSION_NAME }}.duckdb_extension
155+
ls -lh zig-out/lib/linux_arm64/${{ env.EXTENSION_NAME }}.duckdb_extension
156+
else
157+
echo "Extension file not found"
158+
exit 1
159+
fi
164160
165161
- name: Upload repository artifact
166162
uses: actions/upload-artifact@v4
@@ -244,8 +240,8 @@ jobs:
244240
asset_content_type: application/zip
245241

246242
build-linux-arm64-musl:
247-
name: Build Linux ARM64 (musl)
248-
runs-on: ubuntu-24.04-arm64
243+
name: Build Linux ARM64 musl (cross-compile)
244+
runs-on: ubuntu-latest
249245
needs: create-release
250246
permissions:
251247
contents: write

docs/limitations.md

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ Automatic capture (via DuckDB profiling output or a query log hook) is planned b
1515

1616
Vizier uses two extraction strategies during a flush:
1717

18-
1. **EXPLAIN-based extraction** (preferred): runs `EXPLAIN` on the captured query using DuckDB's own parser.
18+
1. EXPLAIN-based extraction (preferred deafult): runs `EXPLAIN` on the captured query using DuckDB's own parser.
1919
This produces accurate table references, filter predicates, and estimated row counts directly from the
2020
query plan. Note that it only works when the referenced tables exist in the current database.
2121

22-
2. **Tokenizer-based extraction** (fallback): a hand-rolled tokenizer that parses SQL text without
22+
2. Tokenizer-based extraction (fallback): a hand-rolled tokenizer that parses SQL text without
2323
database access. Used when `EXPLAIN` fails (e.g., tables do not exist, or the query uses unsupported syntax).
2424

2525
The tokenizer fallback has known limitations. It will miss or misparse:
@@ -64,12 +64,6 @@ They do not report the tradeoff or warn that other queries may regress.
6464

6565
Use `vizier_replay()` after applying a sort recommendation to check for regressions across the full workload.
6666

67-
## Large API Surface
68-
69-
Vizier exposes 22 functions, 8 macros, 5 views, 8 metadata tables, and 14 settings.
70-
Some of these may change or be removed in future versions.
71-
Pin your usage to specific Vizier versions if you depend on the API in scripts or pipelines.
72-
7367
## Best Suited for Persistent, Repeated Workloads
7468

7569
Vizier works best when queries repeat over time against a persistent DuckDB database.

0 commit comments

Comments
 (0)