The library uses pre-built addons only, no recompilation should be needed.
If you still want to compile yourself, for a modification or a fork, use these instructions.
- Install Visual Studio 2022 build tools
- In the
addons
directory, runnpm install
and thennpm run build-windows-x64
- To cross-compile for arm64 go to
Visual Studio Installer -> Individual components
, and ensureMSVC v143 - VS 2022 C++ ARM64 build tools (latest)
is checked. Then in theaddons
directory runnpm run build-windows-arm64
- In the
addons
directory, runnpm install
, then:npm run build-macos-x64
(x64) ornpm run build-macos-arm64
(arm64)
- Ensure you have the ALSA header files installed globally. On Ubuntu you can use
sudo apt install libasound2-dev
. - In the
addons
directory, runnpm install
and thennpm run build-linux-x64
To successfully cross-compile for arm64:
- Install
g++-aarch64-linux-gnu
package - Manually download a
libasound2-dev
package targeting arm64 (example Ubuntu package) and extract the package locally to~/arm64-libs
(that's the default location used inaddons/binding.gyp
- you'll need to edit the file to change it) - In the
addons
directory, runnpm install
and thennpm run build-linux-arm64