openwrt-node-packages icon indicating copy to clipboard operation
openwrt-node-packages copied to clipboard

Binary installation of node.js instead of HostBuild

Open artynet opened this issue 1 year ago • 3 comments

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

artynet avatar Apr 21 '23 08:04 artynet

Hi @artynet

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

  • cloudreve
  • adguardhome
  • transmission

That will be a concern.

nxhack avatar Apr 22 '23 01:04 nxhack

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 avatar Apr 22 '23 07:04 nxhack

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.

nxhack avatar May 08 '23 23:05 nxhack