Cross-Platform Build Support#
LanceDB ships prebuilt binaries for multiple OS/architecture combinations. The primary complexity is Windows ARM64 (aarch64-pc-windows-msvc), which required several dedicated CI changes across the Rust, Node.js, and Python build pipelines.
Supported Platforms#
The Node.js SDK (@lancedb/lancedb) provides prebuilt binaries for :
| Platform | Architectures |
|---|---|
| Linux | x86_64, aarch64 (glibc and musl) |
| macOS | x86_64 (Intel), aarch64 (Apple Silicon) |
| Windows | x86_64, aarch64 |
Users on any other platform must build from source.
Rust CI#
The Rust workflow at .github/workflows/rust.yml runs a matrix build covering both Windows targets :
x86_64-pc-windows-msvconwindows-2022aarch64-pc-windows-msvconwindows-11-arm(GitHub's free standard ARM64 runner)
Both legs run cargo build and cargo test, so ARM64 tests execute natively rather than being skipped. A comment in the workflow notes that earlier implementations cross-compiled and skipped the test step; switching to a native windows-11-arm runner resolved that .
Compiler flags#
.cargo/config.toml sets static CRT linking for the ARM64 Windows target:
[target.aarch64-pc-windows-msvc]
rustflags = ["-Ctarget-feature=+crt-static"]
The Rust dev-dependencies in rust/lancedb/Cargo.toml gate the pprof profiling dep behind cfg(unix) to avoid pulling it in on Windows at all .
Cross-Compilation Infrastructure (Linux β Windows ARM64)#
Before native windows-11-arm runners were available, builds used Alpine-based cross-compilation. The key artifact of that work is ci/sysroot-aarch64-pc-windows-msvc.sh, which:
- Downloads Windows SDK UCRT headers/libs and MSVC runtime artifacts
- Normalizes include/lib paths (lowercases filenames and
#includedirectives) for Linux filesystem compatibility - Installs headers under
/usr/aarch64-pc-windows-msvc/usr/includeand libraries under/usr/lib - Explicitly links
arm64rt.libto resolve_Interlockedintrinsic linker errors (MSVC Developer Community #1544787)
A companion ci/sysroot-x86_64-pc-windows-msvc.sh provides the same scaffolding for x86_64 Windows cross-builds .
The Alpine-based cross-compile job (added in PR #2081) also pinned crunchy = "=0.2.2" as a workaround for a compile break in upstream , and set ARM64-specific CPU feature flags (+neon,+fp16,+fhm,+dotprod) in RUSTFLAGS .
Python Wheels#
The PyPI publish workflow at .github/workflows/pypi-publish.yml currently releases Windows x86_64 wheels only . The windows job uses rust-lld in place of the single-threaded link.exe for faster builds :
CARGO_TARGET_X86_64_PC_WINDOWS_MSVC_LINKER: rust-lld
PR #3676 added a Windows ARM64 Python wheel CI job on windows-11-arm. The wheel builds and passes 797 Python + 709 Rust tests, but is not yet published to PyPI (artifact prefix unpublished-) because key runtime dependencies β pyarrow, pylance, datafusion, polars β lack win_arm64 wheels on PyPI .
Node.js Packaging#
PR #1770 added the @lancedb/vectordb-win32-arm64-msvc npm package (in nodejs/npm/win32-arm64-msvc/) and wired it into node/package.json. The build scripts ci/build_windows_artifacts.ps1 and ci/build_windows_artifacts_nodejs.ps1 were updated accordingly .
An earlier bug where target-triple arguments were silently dropped (npm run pack-build -t $TARGET vs the correct npm run pack-build -- -t $TARGET) was fixed in PR #1890.
Key Files & References#
| File | Purpose |
|---|---|
.cargo/config.toml | ARM64 Windows rustflags (static CRT) |
.github/workflows/rust.yml | Rust matrix: x86_64 + aarch64 Windows CI |
ci/sysroot-aarch64-pc-windows-msvc.sh | Cross-compile sysroot setup for Windows ARM64 |
.github/workflows/pypi-publish.yml | Python wheel release pipeline |
.github/workflows/build_windows_wheel/action.yml | Composite Windows wheel build action |
nodejs/npm/win32-arm64-msvc/ | Node.js ARM64 Windows npm package |
History#
| PR | Date | Summary |
|---|---|---|
| #1770 | Nov 2024 | Initial ARM64 Windows Rust + Node CI |
| #1810 | Nov 2024 | Fix proto already-installed bug on ARM64 runner |
| #1890 | Dec 2024 | Sysroot scripts; fix npm argument forwarding |
| #2006 | Jan 2025 | Further Windows ARM build fixes |
| #2081 | Jan 2025 | Alpine cross-compile job; crunchy pin |
| #3676 | Jul 2026 | Python win_arm64 wheel (built, not yet published) |