django-rusty-templates is written in Rust, so you'll need to install the Rust toolchain.
uv is a fast Python package installer and resolver. Using it will significantly speed up dependency installation.
First, install uv:
$ curl -LsSf https://astral.sh/uv/install.sh | shThen sync the dependencies and activate the automatically created virtual env:
$ uv sync
$ source .venv/bin/activateIf you prefer not to use uv, you can set up your development environment with standard Python tools:
$ python -m venv .venv
$ source .venv/bin/activate
$ pip install --group devNote: The [dev] dependency group is defined in pyproject.toml and includes all necessary development dependencies.
To run the Python tests, build Django Rusty Templates in develop mode with maturin and then run pytest. Each change in rust needs a new execution of maturin develop.
$ maturin develop
$ pytestYou can also run the Rust tests:
$ cargo testIf you get an ImportError from python, you may need to set the PYTHONPATH environment variable:
export PYTHONPATH=/path/to/venv/lib/python3.x/site-packagesYou can optionally install pre-commit hooks to automatically run some validation checks when making a commit:
$ pip install pre-commit # or: uv tool install pre-commit
$ pre-commit installWhen submitting a PR we check coverage. You can check coverage locally by running a command from the justfile:
$ just python-coverage
$ just rust-coverage
$ just rust-coverage-browserYou will need Just installed.