Development¶
Environment¶
The easiest way to set up the development environment is with devenv.nix.
devenv shell
Using direnv is a convenient way to auto-load the shell.
Tests¶
Rust tests:
cargo test
Python tests:
uv run pytest -n auto
Snapshot updates:
uv run pytest --snapshot-update
Documentation¶
The documentation site is powered by Sphinx using the shared pytket-docs-theming configuration.
Build locally:
uv run --group docs sphinx-build -M html docs docs/_build
The rendered site will be written under docs/_build/html.
Clean and rebuild:
uv run --group docs sphinx-build -M clean docs docs/_build
uv run --group docs sphinx-build -M html docs docs/_build
Useful source locations¶
CLI:
src/cli.rsPython wrapper:
python/hugr_qir/hugr_to_qir.pyWasm lowering:
src/qir/wasm_ext.rsExamples in the docs: Examples