nodejs android ios,Support nodejs-mobile on Android and iOS

Thanks for taking a look at this already!

Could you briefly explain how these environment variables are being used?

I'm not the person who discovered the need for those env vars (I mostly just want to condense those comments into code into this PR), but I understand some of them:

npm_config_nodedir: nodejs-mobile builds a fork of node, so we have to override the path where node is typically found, to point to nodejs-mobile

npm_config_node_gyp: we have to override the default node-gyp to point to nodejs-mobile-gyp instead

npm_config_platform: I think nodejs-mobile needs this env var to detect android or ios cross compilation

npm_config_node_engine: not sure why, but I think this is pointing to the specific "version" of node inside nodejs-mobile

cc @jaimecbernardo who authors nodejs-mobile.

Is there a subtle bug that might be impacting Electron as well?

I'm not sure if there would appear bugs in Electron. I ran the tests and all of them passed, including one that flashed an Electron window quickly. I personally care about Neon supporting Electron so I find this important too.

In the linked issue, I see you are adding some RUSTC args. These can be set in build.rs, do you think it's valuable putting a feature in neon to discover this and link it?

If possible, yes, this would be a good feature, but we would need some way of detecting (in build.rs) that nodejs-mobile is being used (maybe through one of these env vars that point to nodejs-mobile-gyp?) in order to point rustc-link-search to the nodejs-mobile-react-native directory. And we'd have to make sure it's nodejs-mobile-react-native and not nodejs-mobile-cordova, and there's the question of how to handle nodejs-mobile-cordova when that is being used in the project. Due to all of these variables, I thought about cutting the complexity and just get things working. I agree with doing it properly though.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值