Installation
Hydronnx ships in two pieces, and you may need either or both:
- Two Rust CLIs,
chelis-hydronnx-inspectandchelis-hydronnx-emit. You run these on an.onnxfile ahead of time, before you build your Chelis program. The emit CLI is the build-time code generator behind the model-load surface: Chelis is ahead-of-time compiled, so a model is turned into importable.chsource ahead of time. - The
HydronnxChelis module surface, themodule Hydronnx.<Name>files the emit CLI writes. These are ordinary Chelis source files; you add them to your reef project alongside any other.chyou write.
The two pieces are independent. The CLIs are Rust binaries with no Chelis
dependency at install time, and an emitted .ch module compiles under chelis
with no Hydronnx runtime.
Toolchain pin
Section titled “Toolchain pin”Hydronnx is built and tested against a specific chelis release. The repo's
reef.toml pins that compiler version. The emit CLI's output is chelis check, chelis test, and chelis prove clean under exactly that version.
Mixing emitted .ch from one Hydronnx revision with a different chelis
toolchain is not supported.
Hydronnx requires the chelis CLI on PATH. The emitted .ch is consumed by
chelis check, chelis test, and chelis prove, and the worked example's
acceptance test invokes the CLI directly. Consume the released tarball from the
chelis releases for the
pinned binary; do not build from source.
Installing the CLIs
Section titled “Installing the CLIs”From source
Section titled “From source”Hydronnx's Rust crate depends on chelis crates via path dependencies
(../chelis/crates/chelis-ir, ../chelis/crates/chelis-types), so a from-source
build needs both repos checked out as siblings:
cd /some/workspacegit clone https://github.com/Chelis-Lang/chelisgit clone https://github.com/Chelis-Lang/hydronnxcd hydronnxcargo build --release --bin chelis-hydronnx-inspect --bin chelis-hydronnx-emitThe two CLIs land in target/release/. Add that directory to your PATH, or
invoke the binaries by absolute path. There is no cargo install flow: the
path dependency on chelis blocks publishing to crates.io until chelis itself is
published.
You can also invoke either CLI through cargo run:
cargo run --release --bin chelis-hydronnx-inspect -- path/to/model.onnxcargo run --release --bin chelis-hydronnx-emit -- path/to/model.onnx -o out.chBoth forms are equivalent; the released binary is faster to launch.
From a release tarball
Section titled “From a release tarball”The release-gate flow attaches a tarball and a .chb bundle to the GitHub
release. The tarball contains the prebuilt CLIs for use without a chelis source
checkout. A cargo install --git flow is not supported, for the reason above.
Adding Hydronnx-emitted modules to a Chelis project
Section titled “Adding Hydronnx-emitted modules to a Chelis project”An emitted .ch is a normal Chelis module. There is no runtime dependency to
declare in your reef.toml. A minimal project that uses one:
[package]name = "my-project"version = "<your project version>"compiler = "=<pinned chelis version>"module_prefix = "Hydronnx"
[dependencies]# nothing Hydronnx-specific here.The module_prefix = "Hydronnx" line matches the prefix the emit CLI puts on
every module it generates (module Hydronnx.MyModel). The
module-pascal-components lint allows Hydronnx as a known prefix.
Place the emitted file at the path that matches its module: module Hydronnx.MyModel lives at src/mymodel.ch. Reef matches the module ladder to
the file path literally (lowercase, no underscores). The emit CLI's default
output path already follows this rule.
The worked example at examples/tabular_classifier/ is a complete
self-contained reef project showing this layout end to end.
Python environment (only for fixture generation)
Section titled “Python environment (only for fixture generation)”The Python scripts in scripts/ regenerate the ONNX fixtures used by the test
suite and the worked examples. A user emitting their own .onnx does not need
Python. The Hydronnx CLIs are pure Rust.
If you want to regenerate or extend the fixtures, the repo uses a uv-managed
venv:
python3 scripts/setup_env.py # creates .venv, installs onnx + numpy (once)source .venv/bin/activatepython3 scripts/gen_fixtures.pyOne-shot without setup: uv run --with onnx python3 scripts/gen_fixtures.py.
Verifying the install
Section titled “Verifying the install”A quick health check that both CLIs are reachable:
chelis-hydronnx-inspect --helpchelis-hydronnx-emit --helpBoth should print usage; a non-zero exit means the binary is not on PATH. Inspect a model:
chelis-hydronnx-inspect examples/tabular_classifier/iris_classifier.onnxYou should see a printed model inventory ending with a non-differentiable operators (0): section. See the CLI reference for the full
output and Loading a model for the end-to-end walkthrough.