Skip to content

Running Henad

Before running Henad, install it or clone the repository. If you just want to try out Henad with the example models, you can use the web app instead.

Desktop app

With the app installed, run:

henad-app

From a clone of the repository, run:

cargo run --release --bin henad-app

In your own project, cargo run --release runs the project's app over its own models.

Release mode

The debug build is slow, and the sim thread will not run at full speed. Make sure that --release is used to build the release version.

See the app tour for an introduction to the UI.

Web app

To build the web app from a clone, use the following command:

./scripts/build_web.sh serve --release   # starts server at http://localhost:8080

Then open http://localhost:8080 in a browser that supports WebGPU.

Alternatively, to deploy the web app, run:

./scripts/build_web.sh build --release   # writes to dist/

Web build performance

CPU models run noticeably slower in the browser. Run natively when you want the engine at full speed.

Nonetheless, GPU model performance is close to native.

Since the thread pool needs SharedArrayBuffer, the web build serves cross-origin isolated. Hosts deploying Henad need to send Cross-Origin-Opener-Policy: same-origin and Cross-Origin-Embedder-Policy: require-corp.

See the app tour for an introduction to the UI.

CLI

If you do not need to render anything, you can use the Henad CLI. This is mainly for benchmarking purposes, but it can also be used if you want to run Henad in a headless environment.

Run the following command to see the available flags:

henad-cli --help

From a clone, write cargo run --release -p henad-cli -- instead of henad-cli, and in your own project, cargo run --release --bin my-model-cli --.

See the Henad CLI reference for more details. See parameter sweeps for running a model over many parameter values and seeds at once, and searching a model for letting Henad pick the values.