Development process
How to run Nuclear in development mode and start coding
Last updated
Was this helpful?
How to run Nuclear in development mode and start coding
Last updated
Was this helpful?
Ensure that you have installed the prerequisites:
Node.js LTS (20)
npm v10
git
Rust - How to install:
Your platform's build tools required to recompile native dependencies.
Node-gyp is the tool we use to recompile them. It will be installed automatically, but you need to install its dependencies yourself. Check how to do it here:
You will not be able to run Nuclear without these dependencies.
Linux is recommended (but not required) for development. The process should work the same for all platforms.
Start by cloning the repository:
Go to the project root and install the dependencies:
This will install the dependencies in the project root, and automatically link the local packages with lerna. Nuclear is using a monorepo structure, which means it's a collection of Node packages, as you can see in the packages
folder.
You should not install the dependencies inside individual package folders. This will be done for you when you run npm install
in project root.
Next, you can run the tests:
Or start the program in development mode:
To build a production release, run this:
Replace <version>
with a string that will be added to the filenames of the built packages, e.g. 0.6.30
or a short githash: f4b6771
. This only affects the filenames, but needs to be set.
Replace <platform>
with the name of your platform: linux
, macos
, windows
or all
.
The binaries will be created in <root>/release
.
You have to install Python's setuptools, needed for node-gyp
. You can do that by running:
$ pip install setuptools
cargo
executable.Nuclear has CI pipelines, which means that we use Github Actions to verify that tests pass and the project can be built after every commit. You can see the status of these pipelines here:
Here are some commonly seen errors when running the tests, the build, or the player itself. If you see anything else, let us know on Github: , or on Discord:
This means you need to install Rust. See here how to do that: