Skip to content
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

[binary-releases] macos aarch64 (m1) support #2286

Closed
JonasKruckenberg opened this issue Jul 23, 2021 · 8 comments
Closed

[binary-releases] macos aarch64 (m1) support #2286

JonasKruckenberg opened this issue Jul 23, 2021 · 8 comments
Assignees
Labels
scope: cli.js The @tauri-apps/cli npm package type: bug

Comments

@JonasKruckenberg
Copy link
Contributor

JonasKruckenberg commented Jul 23, 2021

Describe the bug

The bundler fails to include a sidecar on apple silicon machines. It is expecting to find a binary named: ${name}-x86_64-apple-darwin even though the correct thing to do is to look for a binary with the name ${name}-aarch64-apple-darwin.

Platform and Versions (required):

Operating System - Mac OS, version 11.3.1 X64

Node.js environment
  Node.js - 16.5.0
  @tauri-apps/cli - 1.0.0-beta.6
  @tauri-apps/api - 1.0.0-beta.5

Global packages
  npm - 7.19.1
  yarn - 1.22.10

Rust environment
  rustc - 1.53.0
  cargo - 1.53.0

App directory structure
/dist
/node_modules
/.github
/src-tauri
/.git
/src

App
  tauri.rs - 1.0.0-beta.4
  build-type - bundle
  CSP - default-src blob: data: filesystem: ws: wss: http: https: tauri: 'unsafe-eval' 'unsafe-inline' 'self' img-src: 'self'
  distDir - ../dist
  devPath - http://localhost:3000
  framework - React

Workaround

you can specify the target explicitly by running yarn tauri build --target aarch64-apple-darwin.

@lemarier
Copy link
Member

lemarier commented Jul 23, 2021

Nice catch! Thanks
As we are there we should do a full round of checkups for aarch64 support.
The updater should add aarch64 as a supported platform as well.

@JonasKruckenberg
Copy link
Contributor Author

I just noticed ^^the target triple is aarch64-apple-darwin not arch64-apple-darwin. Something that my autocorrection doesn't like

@lemarier
Copy link
Member

lemarier commented Jul 23, 2021

@JonasKruckenberg could you make rustup default and paste me the result please

Thanks

@JonasKruckenberg
Copy link
Contributor Author

Sorry for the delay, here you go!
rustup default gives me:

stable-aarch64-apple-darwin (default)

@lemarier
Copy link
Member

@JonasKruckenberg could you try without node cli ?

cargo install tauri-cli --version 1.0.0-beta.5

then cargo tauri build should do the trick in the src-tauri

Let me know if it works

@JonasKruckenberg
Copy link
Contributor Author

JonasKruckenberg commented Jul 26, 2021

It works! 🥳👍🏻

@lemarier lemarier changed the title Bundler fails to find sidecar on apple silicon [binary-releases] macos aarch64 (m1) support Jul 26, 2021
@lemarier
Copy link
Member

@nklayman looks like this is coming from the binary releases as the built-in target_arch is wrong

Maybe we could build a CI version with --target aarch64-apple-darwin?

Thanks

@lemarier lemarier added the scope: cli.js The @tauri-apps/cli npm package label Jul 26, 2021
@nklayman
Copy link
Member

I don't think we can cross compile, so we'd have to wait for actions/runner-images#2187. We could work around this by checking the arch at runtime instead of build time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: cli.js The @tauri-apps/cli npm package type: bug
Projects
None yet
Development

No branches or pull requests

4 participants