neon-bindings/examples

Apple M1 issue

javaxiu opened this issue · 2 comments

i've clone this example on both intel chip Mac and M1 chip Mac, and build on both, it works well on intel but got this error on M1, please help me find it out and thanks a lot

image

@javaxiu This seems like the addon is being built for a different architecture than Node is running under.

Can you confirm a few things?

  1. The issue still happens after running cargo clean and then rebuilding. This will rule out an old build for a different architecture.
  2. Both the shell and node being run are compiled for M1 and not running under Rosetta. This can be checked in activity monitor or the CLI.
  3. The Rust build chain being used is for aarch.

FYI, native add-ons are not portable across CPU architectures. However, you can use lipo to make a large binary that supports both.

Closing this issue since it has not had updates in awhile and we have sufficient evidence that Neon works great on M1.

Let me know if you continue to have problems and I will re-open.