nxhack / openwrt-node-packages

OpenWrt Project Node.js packages. v18.x TLS and v20.x LTS
GNU General Public License v2.0
257 stars 99 forks source link

Binary installation of node.js instead of HostBuild #1547

Open artynet opened 1 year ago

artynet commented 1 year ago

Hello @nxhack,

I have come up with a simple hack to speed up the overall node.js build. Instead of compiling the sources for the local build, wouldn't it be simpler to download the binary tarball and extract it in the $(STAGING_DIR_HOSTPKG) folder ? Please take a look at my modification to main the the main node package Makefile here:

https://github.com/artynet/openwrt-node-packages/commit/79565b131f5e3b8fbad74ad825db785096e967fa

looking forward to know about you feedback.....

Kind Regards

nxhack commented 1 year ago

Hi @artynet

Your ideas are simple and effective. Thank you. However, some packages depend on 'node/host'.

That will be a concern.

nxhack commented 1 year ago

The other thing I found out is that we need to consider macos and WSL as build environments for OpenWrt other than Linux.

There is an official node.js binary package for macos, but not for WSL, although it can be installed using apt.

As a hobby of mine ;) I have been able to build OpenWrt on FreeBSD.

nxhack commented 1 year ago

I will add an option to support only linux 64bit host. I'm a bit busy right now, so implementation will come a bit later.