Just
just is the project's task runner. It provides a consistent interface for building,
running and cleaning the project.
To see every available command at any time, run:
just help
Commands are grouped by subsystem and follow the pattern just <subsystem> <action>
(for example just cmake build or just js clean). To list only one subsystem's
commands, run just <subsystem> help (for example just cmake help).
Initialise the project​
If you have already run just init before (like when following the Project Setup Guide),
you don't need to run it again.
There is no harm in re-running it, though.
Run this once after cloning the repository.
just init
This:
- Pulls the required Git submodules.
- Installs project dependencies.
- Builds the entire project.
Build the project​
- Everything
- C++ and C
- JS / WASM
- Python
Build Everything (C++, C, JS, WASM, Python, React App, ...).
just build-all
Build C++ Core and C Bindings.
This is CMake-based with GCC / MSVC.
build-c-cpp/CMake build folder.
just cmake build
Key files:
Build JavaScript / WASM Bindings.
This is CMake-based with Emscripten (to compile to WebAssembly).
build-wasm/CMake build folder.packages/js/build-wasm/copied folder (frombuild-wasm/).
just js build
Key Files:
Build Browser & Node.js npm packages.
This is pnpm-based, yet it requires the outputs from the
just js build command.
packages/js/distfolder.
just js package
Key files:
just js build only produces the raw WASM/JS bindings. To build the publishable
img2num npm package — which targets both the browser and Node.js — run
just js package. It compiles the WASM bindings first (so it works from a
clean checkout) and then bundles the browser and Node builds into
packages/js/dist/.
Build Python Bindings + Wheel
This uses uv and scikit-build-core to build the Pybind11 Python bindings
in bindings/py alongside the Python wrapper in packages/py.
distfolder.
just py build
Key files:
Documentation​
- Build
- Server
- Clean
Build the documentation:
just docs build
Start the documentation server:
just docs start
Remove the generated documentation files:
just docs clean
Example applications​
Excluding the React.js example application, the respective projects must be built first before you can run them or see the latest changes you made.
- C++ console app
- C console app
- React.js web app
- Python console app
- Node.js console app
just console-cpp <path-to-image>
just console-c <path-to-image>
just react-js start
Next open http://localhost:5173/example-apps/react-js/ in your browser.
just console-py <path-to-image>
just console-js-cjs <path-to-image>
just console-js-esm <path-to-image>
Cleaning​
Remove generated build files:
- Everything
- C++
- JS / WASM
- JS Packages
- Python Packages
Removes every generated build folder below (and the cleaned documentation files).
just clean-all
just cmake clean
just js clean
just js package-clean
just py clean