-
Notifications
You must be signed in to change notification settings - Fork 4
Add windows arm and bump version #49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
791d090
Add windows arm and bump version
JonoPrest b98182d
Reduce node version to 20 for windows build
JonoPrest e97e001
Revert "Reduce node version to 20 for windows build"
JonoPrest 8d8d7dd
Add explicit targets for windows builds
JonoPrest ed13f0a
Upgrade napi
JonoPrest a5ebbfc
Add missing feature for windows build
JonoPrest 6c929d9
Add custom base images for workflow
JonoPrest File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,115 @@ | ||
| name: Build Docker Images | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| push: | ||
| branches: | ||
| - main | ||
| paths: | ||
| - 'docker/**' | ||
|
|
||
| permissions: | ||
| contents: read | ||
| packages: write | ||
|
|
||
| jobs: | ||
| build-alpine: | ||
| name: Build Alpine image | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - 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: ghcr.io | ||
| username: ${{ github.actor }} | ||
| password: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: Build and push Alpine image | ||
| uses: docker/build-push-action@v5 | ||
| with: | ||
| context: . | ||
| file: docker/alpine.Dockerfile | ||
| platforms: linux/amd64,linux/arm64 | ||
| push: true | ||
| tags: ghcr.io/${{ github.repository }}/nodejs-rust:alpine | ||
| cache-from: type=gha | ||
| cache-to: type=gha,mode=max | ||
|
|
||
| build-debian: | ||
| name: Build Debian image | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - 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: ghcr.io | ||
| username: ${{ github.actor }} | ||
| password: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: Build and push Debian image | ||
| uses: docker/build-push-action@v5 | ||
| with: | ||
| context: . | ||
| file: docker/debian.Dockerfile | ||
| platforms: linux/amd64 | ||
| push: true | ||
| tags: ghcr.io/${{ github.repository }}/nodejs-rust:debian | ||
| cache-from: type=gha | ||
| cache-to: type=gha,mode=max | ||
|
|
||
| build-debian-aarch64: | ||
| name: Build Debian ARM64 image | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up Docker Buildx | ||
| uses: docker/setup-buildx-action@v3 | ||
|
|
||
| - name: Set up QEMU | ||
| uses: docker/setup-qemu-action@v3 | ||
| with: | ||
| platforms: arm64 | ||
|
|
||
| - name: Install latest libc++-dev for cross build | ||
| uses: addnab/docker-run-action@v3 | ||
| with: | ||
| image: node:lts-slim | ||
| options: '--platform linux/arm64 --user 0:0 -v ${{ github.workspace }}/lib/llvm-18:/usr/lib/llvm-18' | ||
| run: >- | ||
| apt-get update && | ||
| apt-get install -y wget gnupg2 && | ||
| wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - && | ||
| echo "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-18 main" >> /etc/apt/sources.list && | ||
| echo "deb-src http://apt.llvm.org/focal/ llvm-toolchain-focal-18 main" >> /etc/apt/sources.list && | ||
| apt-get update && | ||
| apt-get install libc++-18-dev libc++abi-18-dev -y --fix-missing --no-install-recommends && | ||
| rm /usr/lib/llvm-18/lib/libc++abi.so | ||
|
|
||
| - name: Log in to GitHub Container Registry | ||
| uses: docker/login-action@v3 | ||
| with: | ||
| registry: ghcr.io | ||
| username: ${{ github.actor }} | ||
| password: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: Build and push Debian ARM64 image | ||
| uses: docker/build-push-action@v5 | ||
| with: | ||
| context: . | ||
| file: docker/debian-aarch64.Dockerfile | ||
| platforms: linux/amd64 | ||
| push: true | ||
| tags: ghcr.io/${{ github.repository }}/nodejs-rust:debian-aarch64 | ||
| cache-from: type=gha | ||
| cache-to: type=gha,mode=max |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| FROM node:22-alpine | ||
|
|
||
| ENV PATH="/aarch64-linux-musl-cross/bin:/usr/local/cargo/bin/rustup:/root/.cargo/bin:$PATH" \ | ||
| RUSTFLAGS="-C target-feature=-crt-static" \ | ||
| CC="clang" \ | ||
| CXX="clang++" \ | ||
| GN_EXE=gn | ||
|
|
||
| RUN apk add --update --no-cache bash wget cmake musl-dev clang llvm build-base python3 && \ | ||
| sed -i -e 's/v[[:digit:]]\..*\//edge\//g' /etc/apk/repositories && \ | ||
| apk add --update --no-cache --repository https://dl-cdn.alpinelinux.org/alpine/edge/testing \ | ||
| rustup \ | ||
| git \ | ||
| gn \ | ||
| tar \ | ||
| ninja && \ | ||
| apk update && \ | ||
| apk upgrade | ||
|
|
||
| RUN rustup-init -y && \ | ||
| rustup update stable && \ | ||
| rustup default stable && \ | ||
| yarn global add pnpm lerna && \ | ||
| rustup target add aarch64-unknown-linux-musl && \ | ||
| rustup target add x86_64-unknown-linux-musl && \ | ||
| wget https://github.com/napi-rs/napi-rs/releases/download/linux-musl-cross%4010/aarch64-linux-musl-cross.tgz && \ | ||
| tar -xvf aarch64-linux-musl-cross.tgz && \ | ||
| rm aarch64-linux-musl-cross.tgz |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| FROM messense/manylinux2014-cross:aarch64 | ||
|
|
||
| ENV RUSTUP_HOME=/usr/local/rustup \ | ||
| CARGO_HOME=/usr/local/cargo \ | ||
| PATH=/usr/local/cargo/bin:$PATH \ | ||
| CC=clang \ | ||
| CC_aarch64_unknown_linux_gnu=clang \ | ||
| CXX=clang++ \ | ||
| CXX_aarch64_unknown_linux_gnu=clang++ \ | ||
| CFLAGS="--sysroot=/usr/aarch64-unknown-linux-gnu/aarch64-unknown-linux-gnu/sysroot" \ | ||
| CXXFLAGS="--sysroot=/usr/aarch64-unknown-linux-gnu/aarch64-unknown-linux-gnu/sysroot" \ | ||
| C_INCLUDE_PATH="/usr/aarch64-unknown-linux-gnu/aarch64-unknown-linux-gnu/sysroot/usr/include" \ | ||
| LDFLAGS="-L/usr/aarch64-unknown-linux-gnu/lib/llvm-18/lib" | ||
|
|
||
| ADD ./lib/llvm-18 /usr/aarch64-unknown-linux-gnu/lib/llvm-18 | ||
|
|
||
| RUN apt-get update && \ | ||
| apt-get install -y --fix-missing --no-install-recommends curl gnupg gpg-agent ca-certificates openssl && \ | ||
| curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ | ||
| curl -fsSL https://apt.llvm.org/llvm-snapshot.gpg.key | gpg --dearmor -o /etc/apt/keyrings/llvm-snapshot.gpg && \ | ||
| echo "deb [signed-by=/etc/apt/keyrings/llvm-snapshot.gpg] http://apt.llvm.org/jammy/ llvm-toolchain-jammy-18 main" >> /etc/apt/sources.list && \ | ||
| echo "deb-src [signed-by=/etc/apt/keyrings/llvm-snapshot.gpg] http://apt.llvm.org/jammy/ llvm-toolchain-jammy-18 main" >> /etc/apt/sources.list && \ | ||
| echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" > /etc/apt/sources.list.d/nodesource.list && \ | ||
| apt-get update && \ | ||
| apt-get install -y --fix-missing --no-install-recommends \ | ||
| llvm-18 \ | ||
| clang-18 \ | ||
| lld-18 \ | ||
| libc++-18-dev \ | ||
| libc++abi-18-dev \ | ||
| nodejs \ | ||
| xz-utils \ | ||
| rcs \ | ||
| git \ | ||
| make \ | ||
| cmake \ | ||
| ninja-build && \ | ||
| apt-get autoremove -y && \ | ||
| curl https://sh.rustup.rs -sSf | sh -s -- -y && \ | ||
| rustup update stable && \ | ||
| rustup default stable && \ | ||
| rustup target add aarch64-unknown-linux-gnu && \ | ||
| corepack enable && \ | ||
| ln -sf /usr/bin/clang-18 /usr/bin/clang && \ | ||
| ln -sf /usr/bin/clang++-18 /usr/bin/clang++ && \ | ||
| ln -sf /usr/bin/lld-18 /usr/bin/lld && \ | ||
| ln -sf /usr/bin/clang-18 /usr/bin/cc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| FROM messense/manylinux2014-cross:x86_64 | ||
|
|
||
| ARG NASM_VERSION=2.16.01 | ||
|
|
||
| ENV RUSTUP_HOME=/usr/local/rustup \ | ||
| CARGO_HOME=/usr/local/cargo \ | ||
| PATH=/usr/local/cargo/bin:$PATH \ | ||
| CC=clang \ | ||
| CXX=clang++ \ | ||
| CC_x86_64_unknown_linux_gnu=clang \ | ||
| CXX_x86_64_unknown_linux_gnu=clang++ \ | ||
| RUST_TARGET=x86_64-unknown-linux-gnu | ||
|
|
||
| RUN apt-get update && \ | ||
| apt-get install -y --fix-missing --no-install-recommends curl gnupg gpg-agent ca-certificates openssl && \ | ||
| mkdir -p /etc/apt/keyrings && \ | ||
| curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ | ||
| curl -fsSL https://apt.llvm.org/llvm-snapshot.gpg.key | gpg --dearmor -o /etc/apt/keyrings/llvm-snapshot.gpg && \ | ||
| echo "deb [signed-by=/etc/apt/keyrings/llvm-snapshot.gpg] http://apt.llvm.org/jammy/ llvm-toolchain-jammy-18 main" >> /etc/apt/sources.list && \ | ||
| echo "deb-src [signed-by=/etc/apt/keyrings/llvm-snapshot.gpg] http://apt.llvm.org/jammy/ llvm-toolchain-jammy-18 main" >> /etc/apt/sources.list && \ | ||
| echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" > /etc/apt/sources.list.d/nodesource.list && \ | ||
| apt-get update && \ | ||
| apt-get install -y --fix-missing --no-install-recommends \ | ||
| llvm-18 \ | ||
| clang-18 \ | ||
| lld-18 \ | ||
| libc++-18-dev \ | ||
| libc++abi-18-dev \ | ||
| nodejs \ | ||
| xz-utils \ | ||
| rcs \ | ||
| git \ | ||
| make \ | ||
| cmake \ | ||
| ninja-build && \ | ||
| apt-get autoremove -y && \ | ||
| curl https://sh.rustup.rs -sSf | sh -s -- -y && \ | ||
| rustup update stable && \ | ||
| rustup default stable && \ | ||
| corepack enable && \ | ||
| ln -sf /usr/bin/clang-18 /usr/bin/clang && \ | ||
| ln -sf /usr/bin/clang++-18 /usr/bin/clang++ && \ | ||
| ln -sf /usr/bin/lld-18 /usr/bin/lld && \ | ||
| ln -sf /usr/bin/clang-18 /usr/bin/cc | ||
|
|
||
| RUN wget https://www.nasm.us/pub/nasm/releasebuilds/${NASM_VERSION}/nasm-${NASM_VERSION}.tar.xz && \ | ||
| tar -xf nasm-${NASM_VERSION}.tar.xz && \ | ||
| cd nasm-${NASM_VERSION} && \ | ||
| ./configure --prefix=/usr/ && \ | ||
| make && \ | ||
| make install && \ | ||
| cd / && \ | ||
| rm -rf nasm-${NASM_VERSION} && \ | ||
| rm nasm-${NASM_VERSION}.tar.xz | ||
|
|
||
| ENV LDFLAGS="-fuse-ld=lld --sysroot=/usr/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/sysroot" \ | ||
| CFLAGS="--sysroot=/usr/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/sysroot" \ | ||
| CXXFLAGS="--sysroot=/usr/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/sysroot" \ | ||
| C_INCLUDE_PATH="/usr/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/sysroot/usr/include" |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🌐 Web query:
napi crate 3.6.0 crates.io breaking changes💡 Result:
Do you mean the napi crate version 3.6.0 (napi v3.6.0)? I can't find a release/tag for "napi 3.6.0" in the napi-rs changelogs or on crates.io — do you want breaking changes for napi v3 (the v3 migration) or for a different specific version (please paste a link or exact version)?
🌐 Web query:
napi-derive crate 3.4.0 crates.io breaking changes💡 Result:
I couldn't find a napi-derive 3.4.0 release on crates.io or in the official changelogs — latest documented napi-derive releases in the official changelog are 3.0.0-beta.* (and site tools show 3.1.1 as a recent stable). See the napi-derive changelog and package listings for available versions. (napi.rs)
Citations:
🌐 Web query:
napi-rs 3.6.0 3.4.0 compatibility @napi-rs/cli 3.5.0💡 Result:
Short answer: yes — @napi-rs/cli@3.5.0 is intended to work across napi-rs v3.x releases, so napi-rs 3.4.0 and 3.6.0 are compatible in practice. The v3 line (napi v3 + @napi-rs/cli v3) is the intended compatibility surface; earlier strict version-enforcement checks were relaxed in the CLI. [1][2]
Sources:
The specified napi and napi-derive versions do not exist on crates.io.
The Cargo.toml references napi 3.6.0 and napi-derive 3.4.0, but these versions are not available on crates.io. The latest documented napi-derive release is 3.1.1, and napi 3.6.0 does not appear in official changelogs. Verify the correct version numbers and update Cargo.toml accordingly, or confirm these are intentional pre-releases/local versions.
🤖 Prompt for AI Agents