Русская версия README здесь.
This project includes a compiler and emulator for the HACK computer virtual machine from the NAND-TO-TETRIS course.
If you don't have uv installed yet, install it:
macOS/Linux:
curl -LsSf https://astral.sh/uv/install.sh | shWindows:
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"Or via pip:
pip install uvuv syncmacOS/Linux:
source .venv/bin/activateWindows:
.venv\Scripts\activateFrom the project root:
uv pip install -e .To verify the installation, get information about the flags:
jacke -hAfter this, the jacke command is available from any directory in the current environment:
jacke /path/to/jack/filesMore information about the compiler can be found here
More information about the vm can be found here
Run these commands before each commit:
# 1. Code formatting
uv run ruff format .
# 2. Fix linter issues
uv run ruff check --fix .
# 3. Type checking
uv run mypy vm/ compiler/ main.py
# 4. If everything is OK, commit
git add .
git commit -m "your commit message"
# tests will be added soon...ruff format . && uv run ruff check --fix . && mypy vm/ compiler/ && echo "✅ All checks passed!"uv add package-nameIf Python 3.14 is required, but you have a different version:
uv python install 3.14
uv python pin 3.14rm -rf .venv
uv sync