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

neon build --target #16

Open
dherman opened this issue Mar 9, 2018 · 6 comments
Open

neon build --target #16

dherman opened this issue Mar 9, 2018 · 6 comments

Comments

@dherman
Copy link
Contributor

@dherman dherman commented Mar 9, 2018

We need an RFC for cross-compilation flags. The design should try to mirror the UX of Cargo as much as possible.

@cgdusek
Copy link

@cgdusek cgdusek commented Sep 18, 2019

Has there been any progress made on cross-compilation or a manual workaround? Currently looking to build for iOS and Android toolchains from Linux.

@kjvalencik
Copy link
Member

@kjvalencik kjvalencik commented Sep 18, 2019

The rust side of this is actually pretty easy and works today. Since neon-cli passes on environment variables, cargo will respect the TARGET variable.

Unfortunately, the complexity of cross compiling node-gyp is where this becomes problematic (required by neon-runtime). Due to that complexity, I believe that this is blocked by N-API support which will eliminate node-gyp.

There is no timeline for N-API.

neon-bindings/neon#202
neon-bindings/neon#440

@ShinySaana
Copy link

@ShinySaana ShinySaana commented Apr 3, 2021

Hello,

What is the current status of this feature?
Does it exist any workaround as of today, and if not, is there anything we can do to help?

@kjvalencik
Copy link
Member

@kjvalencik kjvalencik commented Apr 4, 2021

@ShinySaana It's not being worked on. The legacy backend requires node-gyp which does not easily handle cross compiling.

The good news is that the N-API backend does support cross compiling and only uses cargo to build.

Try npm init neon my-project to create a new N-API project.

@ShinySaana
Copy link

@ShinySaana ShinySaana commented Apr 4, 2021

As my neon project already used N-API, it was a breeze to migrate to the new backend. I just tested it and it worked wonders. Thank you very much for saving me a lot of headaches !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants