Skip to content

Support Windows ARM64 - #4375

Closed
hans00 wants to merge 1 commit into
lovell:mainfrom
mybigday:win-arm64
Closed

hans00 wants to merge 1 commit into
lovell:mainfrom
mybigday:win-arm64

Conversation

@hans00

@hans00 hans00 commented Apr 17, 2025

Copy link
Copy Markdown
Contributor

No description provided.

@lovell

lovell commented Apr 17, 2025

Copy link
Copy Markdown
Owner

Hi, thanks for the PR, the @img/sharp-win32-arm64 package doesn't exist (yet).

  • Did you use an LLM to generate this code?
  • Have you tested this?

@hans00

hans00 commented Apr 18, 2025

Copy link
Copy Markdown
Contributor Author
  • Did you use an LLM to generate this code?

I referred to other PRs that support different architectures.

  • Have you tested this?

Not yet

@lovell

lovell commented Apr 20, 2025

Copy link
Copy Markdown
Owner

Thanks, I'll mark this as blocked on lovell/sharp-libvips#238

Comment thread .github/workflows/ci.yml
Comment on lines +113 to +118
- os: windows-11-arm
nodejs_arch: arm64
nodejs_version: "^18.17.0"
nodejs_version_major: 18
platform: win32-arm64
prebuild: true

@dennisameling dennisameling Apr 22, 2025

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Windows arm64 support was only added in Node v20 and newer, see nodejs/node#47233.

@lovell lovell left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The @img/sharp-libvips-win32-arm64 package is now available for this PR to add to sharp's devDependencies.

@gpetrov

gpetrov commented Apr 26, 2025

Copy link
Copy Markdown

Need to adjust also the prebuilds list in https://github.com/lovell/sharp/blob/main/lib/libvips.js#L19

@lovell

lovell commented May 10, 2025

Copy link
Copy Markdown
Owner

Landed via commit e922ef7 (with the suggested changes). Thank you very much @hans00 for your time and work on this.

@lovell lovell closed this May 10, 2025
@lovell lovell added this to the v0.34.2 milestone May 10, 2025
@lovell

lovell commented May 14, 2025

Copy link
Copy Markdown
Owner

There's a release candidate v0.34.2-rc.0 available now if anyone would like to test this:

npm install sharp@0.34.2-rc.0

@gabyvcc

gabyvcc commented May 17, 2025

Copy link
Copy Markdown

image
not sure if this helps, just tested this on Win 11 arm64 surface laptop 7, got that error triying to use Astro astro:assets
installed with npm install sharp@0.34.2-rc.0 after getting Missingsharp errors also with npm

@lovell

lovell commented May 17, 2025

Copy link
Copy Markdown
Owner

@gabyvcc This looks like the sort of error received when there are multiple, conflicting versions of sharp elsewhere in the dependency tree.

@dennisameling

Copy link
Copy Markdown

Can confirm this is working as expected with sharp@0.34.2-rc.0 on a Windows ARM64 machine with this minimal code:

image

The sample.webp file is created correctly. Thanks!! 🎉

@lovell

lovell commented May 20, 2025

Copy link
Copy Markdown
Owner

v0.34.2 now available with experimental prebuilt binaries for Windows ARM64.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants