Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
46693cb
fix CI pipeline and add precompiled NIF support
Jan 27, 2026
4259c1d
fix cross-compilation: add Cross.toml and make io-uring opt-in
Jan 27, 2026
20b2e92
add concurrency control to cancel older workflow runs
Jan 27, 2026
3dbb037
fix cross-compilation: install LLVM 14 from apt.llvm.org
Jan 27, 2026
7516951
fix artifact rename step with debugging and fallback search
Jan 27, 2026
7be8265
fix interactive apt prompt with DEBIAN_FRONTEND=noninteractive
Jan 27, 2026
6d5fb68
set CROSS_CONFIG env var to ensure Cross.toml is found
Jan 27, 2026
334f1d9
fix branch name sanitization: replace / with - in artifact names
Jan 27, 2026
4388062
use official cross-rs images and simplify pre-build
Jan 27, 2026
c704eb2
fix cross environment step: remove cross --version that triggers meta…
Jan 27, 2026
ad25337
fix RocksDB build: set CXXFLAGS=-std=c++20
Jan 27, 2026
300ef92
fix: use -std=c++2a for older GCC cross-compilers
Jan 27, 2026
1fc5dc3
disable cross targets with old GCC (C++20 incompatible)
Jan 27, 2026
e1092da
Add custom Docker images for cross-compilation with GCC 10+
Jan 27, 2026
f7c79b7
Fix cross-compiler wrapper scripts for GCC 10
Jan 27, 2026
d01fa1c
Fix Dockerfiles to use update-alternatives for Debian compiler names
Jan 27, 2026
f8ab501
Handle both Debian and Rust triplet compiler names in Dockerfiles
Jan 27, 2026
a1d2ad6
Simplify: use clang for ARM cross-compilation, reduce targets
Jan 27, 2026
1147a61
Add Windows x86_64 target
Jan 27, 2026
a23be5c
Fix Cross.toml env variables syntax
Jan 27, 2026
0b08362
Use native ARM64 runner instead of cross-compilation
Jan 27, 2026
7eeadc6
Remove Windows target (C++17 hardcoded in cozorocks)
Jan 27, 2026
06b7d84
Add Windows back with C++20 flag for MSVC
Jan 27, 2026
16fd675
Try to disable jemalloc on Windows
Jan 27, 2026
63a35e9
Disable jemalloc on Windows via cargo-args
Jan 27, 2026
9190769
Fix cargo-args YAML quoting for Windows
Jan 27, 2026
ac9b353
Try multiple --features flags for Windows
Jan 28, 2026
6582217
Test Windows with default features
Jan 28, 2026
0f7eaab
fix: disable jemalloc on Windows via feature flag
Jan 28, 2026
30bf84f
fix: move pinned deps before target-specific section
Jan 28, 2026
1b64314
feat: improve rustler precompiled deployment
Jan 28, 2026
98223b4
Merge upstream/main: resolve conflicts and address review comments
Feb 20, 2026
d0c81b0
Merge remote-tracking branch 'upstream/develop' into fix/ci-precompil…
Feb 20, 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
50 changes: 50 additions & 0 deletions .cross/Dockerfile.aarch64-unknown-linux-gnu
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
FROM ghcr.io/cross-rs/aarch64-unknown-linux-gnu:main

ENV DEBIAN_FRONTEND=noninteractive

# Install newer GCC (10+) for C++20 support required by RocksDB
RUN apt-get update && \
apt-get install -y software-properties-common && \
add-apt-repository -y ppa:ubuntu-toolchain-r/test && \
apt-get update && \
apt-get install -y \
gcc-10 \
g++-10 \
gcc-10-aarch64-linux-gnu \
g++-10-aarch64-linux-gnu \
libclang-dev \
clang \
llvm \
lld && \
# Clean up
apt-get clean && \
rm -rf /var/lib/apt/lists/*

# Set GCC 10 as default for Debian-style compiler names
RUN update-alternatives --install /usr/bin/aarch64-linux-gnu-gcc aarch64-linux-gnu-gcc /usr/bin/aarch64-linux-gnu-gcc-10 100 && \
update-alternatives --install /usr/bin/aarch64-linux-gnu-g++ aarch64-linux-gnu-g++ /usr/bin/aarch64-linux-gnu-g++-10 100 && \
update-alternatives --set aarch64-linux-gnu-gcc /usr/bin/aarch64-linux-gnu-gcc-10 && \
update-alternatives --set aarch64-linux-gnu-g++ /usr/bin/aarch64-linux-gnu-g++-10

# Also handle Rust triplet names (aarch64-unknown-linux-gnu-g++) if present
RUN if [ -f /usr/bin/aarch64-unknown-linux-gnu-g++ ]; then \
mv /usr/bin/aarch64-unknown-linux-gnu-g++ /usr/bin/aarch64-unknown-linux-gnu-g++.old; \
fi && \
if [ -f /usr/bin/aarch64-unknown-linux-gnu-gcc ]; then \
mv /usr/bin/aarch64-unknown-linux-gnu-gcc /usr/bin/aarch64-unknown-linux-gnu-gcc.old; \
fi && \
ln -sf /usr/bin/aarch64-linux-gnu-g++-10 /usr/bin/aarch64-unknown-linux-gnu-g++ && \
ln -sf /usr/bin/aarch64-linux-gnu-gcc-10 /usr/bin/aarch64-unknown-linux-gnu-gcc

# Also check /x-tools for crosstool-ng compilers and override those too
RUN find /x-tools -name "aarch64-unknown-linux-gnu-g++" -type f 2>/dev/null | while read f; do \
mv "$f" "$f.old" && \
ln -sf /usr/bin/aarch64-linux-gnu-g++-10 "$f"; \
done || true && \
find /x-tools -name "aarch64-unknown-linux-gnu-gcc" -type f 2>/dev/null | while read f; do \
mv "$f" "$f.old" && \
ln -sf /usr/bin/aarch64-linux-gnu-gcc-10 "$f"; \
done || true

# Verify GCC version (should show GCC 10)
RUN aarch64-linux-gnu-g++ --version | head -1
66 changes: 66 additions & 0 deletions .cross/Dockerfile.aarch64-unknown-linux-musl
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
FROM ghcr.io/cross-rs/aarch64-unknown-linux-musl:main

ENV DEBIAN_FRONTEND=noninteractive

# Install newer GCC (10+) for C++20 support required by RocksDB
RUN apt-get update && \
apt-get install -y software-properties-common && \
add-apt-repository -y ppa:ubuntu-toolchain-r/test && \
apt-get update && \
apt-get install -y \
gcc-10 \
g++-10 \
gcc-10-aarch64-linux-gnu \
g++-10-aarch64-linux-gnu \
libclang-dev \
clang \
llvm \
lld && \
# Clean up
apt-get clean && \
rm -rf /var/lib/apt/lists/*

# Set GCC 10 as default host compiler
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100 && \
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 100 && \
update-alternatives --set gcc /usr/bin/gcc-10 && \
update-alternatives --set g++ /usr/bin/g++-10

# Set GCC 10 as default aarch64 cross-compiler (Debian-style names)
RUN update-alternatives --install /usr/bin/aarch64-linux-gnu-gcc aarch64-linux-gnu-gcc /usr/bin/aarch64-linux-gnu-gcc-10 100 && \
update-alternatives --install /usr/bin/aarch64-linux-gnu-g++ aarch64-linux-gnu-g++ /usr/bin/aarch64-linux-gnu-g++-10 100 && \
update-alternatives --set aarch64-linux-gnu-gcc /usr/bin/aarch64-linux-gnu-gcc-10 && \
update-alternatives --set aarch64-linux-gnu-g++ /usr/bin/aarch64-linux-gnu-g++-10

# Handle musl compiler names - both Debian-style and Rust triplet style
RUN if [ -f /usr/bin/aarch64-linux-musl-g++ ]; then \
mv /usr/bin/aarch64-linux-musl-g++ /usr/bin/aarch64-linux-musl-g++.old; \
fi && \
if [ -f /usr/bin/aarch64-linux-musl-gcc ]; then \
mv /usr/bin/aarch64-linux-musl-gcc /usr/bin/aarch64-linux-musl-gcc.old; \
fi && \
ln -sf /usr/bin/aarch64-linux-gnu-g++-10 /usr/bin/aarch64-linux-musl-g++ && \
ln -sf /usr/bin/aarch64-linux-gnu-gcc-10 /usr/bin/aarch64-linux-musl-gcc

# Handle Rust triplet names
RUN if [ -f /usr/bin/aarch64-unknown-linux-musl-g++ ]; then \
mv /usr/bin/aarch64-unknown-linux-musl-g++ /usr/bin/aarch64-unknown-linux-musl-g++.old; \
fi && \
if [ -f /usr/bin/aarch64-unknown-linux-musl-gcc ]; then \
mv /usr/bin/aarch64-unknown-linux-musl-gcc /usr/bin/aarch64-unknown-linux-musl-gcc.old; \
fi && \
ln -sf /usr/bin/aarch64-linux-gnu-g++-10 /usr/bin/aarch64-unknown-linux-musl-g++ && \
ln -sf /usr/bin/aarch64-linux-gnu-gcc-10 /usr/bin/aarch64-unknown-linux-musl-gcc

# Also check /x-tools for crosstool-ng compilers and override those too
RUN find /x-tools -name "aarch64-unknown-linux-musl-g++" -type f 2>/dev/null | while read f; do \
mv "$f" "$f.old" && \
ln -sf /usr/bin/aarch64-linux-gnu-g++-10 "$f"; \
done || true && \
find /x-tools -name "aarch64-unknown-linux-musl-gcc" -type f 2>/dev/null | while read f; do \
mv "$f" "$f.old" && \
ln -sf /usr/bin/aarch64-linux-gnu-gcc-10 "$f"; \
done || true

# Verify GCC version
RUN aarch64-linux-gnu-g++ --version | head -1
53 changes: 53 additions & 0 deletions .cross/Dockerfile.arm-unknown-linux-gnueabihf
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
FROM ghcr.io/cross-rs/arm-unknown-linux-gnueabihf:main

ENV DEBIAN_FRONTEND=noninteractive

# Install newer GCC (10+) for C++20 support required by RocksDB
RUN apt-get update && \
apt-get install -y software-properties-common && \
add-apt-repository -y ppa:ubuntu-toolchain-r/test && \
apt-get update && \
apt-get install -y \
gcc-10 \
g++-10 \
gcc-10-arm-linux-gnueabihf \
g++-10-arm-linux-gnueabihf \
libclang-dev \
clang \
llvm \
lld && \
# Clean up
apt-get clean && \
rm -rf /var/lib/apt/lists/*

# Set GCC 10 as default for Debian-style compiler names
RUN update-alternatives --install /usr/bin/arm-linux-gnueabihf-gcc arm-linux-gnueabihf-gcc /usr/bin/arm-linux-gnueabihf-gcc-10 100 && \
update-alternatives --install /usr/bin/arm-linux-gnueabihf-g++ arm-linux-gnueabihf-g++ /usr/bin/arm-linux-gnueabihf-g++-10 100 && \
update-alternatives --set arm-linux-gnueabihf-gcc /usr/bin/arm-linux-gnueabihf-gcc-10 && \
update-alternatives --set arm-linux-gnueabihf-g++ /usr/bin/arm-linux-gnueabihf-g++-10

# The cross-rs image for arm uses Rust triplet names (arm-unknown-linux-gnueabihf-g++)
# which come from crosstool-ng. We need to replace those with GCC 10 wrappers.
# First, backup the old compilers, then create symlinks to GCC 10
RUN if [ -f /usr/bin/arm-unknown-linux-gnueabihf-g++ ]; then \
mv /usr/bin/arm-unknown-linux-gnueabihf-g++ /usr/bin/arm-unknown-linux-gnueabihf-g++.old; \
fi && \
if [ -f /usr/bin/arm-unknown-linux-gnueabihf-gcc ]; then \
mv /usr/bin/arm-unknown-linux-gnueabihf-gcc /usr/bin/arm-unknown-linux-gnueabihf-gcc.old; \
fi && \
ln -sf /usr/bin/arm-linux-gnueabihf-g++-10 /usr/bin/arm-unknown-linux-gnueabihf-g++ && \
ln -sf /usr/bin/arm-linux-gnueabihf-gcc-10 /usr/bin/arm-unknown-linux-gnueabihf-gcc

# Also check /x-tools for crosstool-ng compilers and override those too
RUN find /x-tools -name "arm-unknown-linux-gnueabihf-g++" -type f 2>/dev/null | while read f; do \
mv "$f" "$f.old" && \
ln -sf /usr/bin/arm-linux-gnueabihf-g++-10 "$f"; \
done || true && \
find /x-tools -name "arm-unknown-linux-gnueabihf-gcc" -type f 2>/dev/null | while read f; do \
mv "$f" "$f.old" && \
ln -sf /usr/bin/arm-linux-gnueabihf-gcc-10 "$f"; \
done || true

# Verify GCC version (should show GCC 10)
RUN arm-linux-gnueabihf-g++ --version | head -1
RUN which arm-unknown-linux-gnueabihf-g++ && arm-unknown-linux-gnueabihf-g++ --version | head -1 || echo "arm-unknown-linux-gnueabihf-g++ not in PATH"
58 changes: 58 additions & 0 deletions .cross/Dockerfile.x86_64-unknown-linux-musl
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
FROM ghcr.io/cross-rs/x86_64-unknown-linux-musl:main

ENV DEBIAN_FRONTEND=noninteractive

# Install newer GCC (10+) for C++20 support required by RocksDB
RUN apt-get update && \
apt-get install -y software-properties-common && \
add-apt-repository -y ppa:ubuntu-toolchain-r/test && \
apt-get update && \
apt-get install -y \
gcc-10 \
g++-10 \
libclang-dev \
clang \
llvm \
lld && \
# Clean up
apt-get clean && \
rm -rf /var/lib/apt/lists/*

# Set GCC 10 as default host compiler
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100 && \
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 100 && \
update-alternatives --set gcc /usr/bin/gcc-10 && \
update-alternatives --set g++ /usr/bin/g++-10

# Handle musl compiler names - both Debian-style and Rust triplet style
RUN if [ -f /usr/bin/x86_64-linux-musl-g++ ]; then \
mv /usr/bin/x86_64-linux-musl-g++ /usr/bin/x86_64-linux-musl-g++.old; \
fi && \
if [ -f /usr/bin/x86_64-linux-musl-gcc ]; then \
mv /usr/bin/x86_64-linux-musl-gcc /usr/bin/x86_64-linux-musl-gcc.old; \
fi && \
ln -sf /usr/bin/g++-10 /usr/bin/x86_64-linux-musl-g++ && \
ln -sf /usr/bin/gcc-10 /usr/bin/x86_64-linux-musl-gcc

# Handle Rust triplet names
RUN if [ -f /usr/bin/x86_64-unknown-linux-musl-g++ ]; then \
mv /usr/bin/x86_64-unknown-linux-musl-g++ /usr/bin/x86_64-unknown-linux-musl-g++.old; \
fi && \
if [ -f /usr/bin/x86_64-unknown-linux-musl-gcc ]; then \
mv /usr/bin/x86_64-unknown-linux-musl-gcc /usr/bin/x86_64-unknown-linux-musl-gcc.old; \
fi && \
ln -sf /usr/bin/g++-10 /usr/bin/x86_64-unknown-linux-musl-g++ && \
ln -sf /usr/bin/gcc-10 /usr/bin/x86_64-unknown-linux-musl-gcc

# Also check /x-tools for crosstool-ng compilers and override those too
RUN find /x-tools -name "x86_64-unknown-linux-musl-g++" -type f 2>/dev/null | while read f; do \
mv "$f" "$f.old" && \
ln -sf /usr/bin/g++-10 "$f"; \
done || true && \
find /x-tools -name "x86_64-unknown-linux-musl-gcc" -type f 2>/dev/null | while read f; do \
mv "$f" "$f.old" && \
ln -sf /usr/bin/gcc-10 "$f"; \
done || true

# Verify GCC version
RUN g++ --version | head -1
73 changes: 73 additions & 0 deletions .github/workflows/build-cross-images.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: Build Cross-Compilation Images

on:
push:
paths:
- '.cross/Dockerfile.*'
- '.github/workflows/build-cross-images.yml'
branches:
- main
- 'fix/**'
workflow_dispatch:

concurrency:
group: build-cross-images-${{ github.ref }}
cancel-in-progress: true

env:
REGISTRY: ghcr.io
IMAGE_PREFIX: ${{ github.repository_owner }}/cozodb-cross

jobs:
build-images:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

strategy:
fail-fast: false
matrix:
include:
- target: aarch64-unknown-linux-gnu
dockerfile: .cross/Dockerfile.aarch64-unknown-linux-gnu
- target: arm-unknown-linux-gnueabihf
dockerfile: .cross/Dockerfile.arm-unknown-linux-gnueabihf
- target: aarch64-unknown-linux-musl
dockerfile: .cross/Dockerfile.aarch64-unknown-linux-musl
- target: x86_64-unknown-linux-musl
dockerfile: .cross/Dockerfile.x86_64-unknown-linux-musl

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_PREFIX }}-${{ matrix.target }}
tags: |
type=raw,value=latest
type=sha,prefix=

- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
file: ${{ matrix.dockerfile }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
Loading