Skip to content

Installation

Typhon ships as a single Rust binary called tyc. The fastest way to get it is a pre-built binary from the latest GitHub Release; you can also build from source with one cargo command. Optional integrations (tyc ty, tyc stubtest) shell out to Python tools you can install on demand.

Pre-built, checksum-verified binaries ship on every GitHub Release for Linux (x86_64/aarch64), macOS (Apple Silicon/Intel), and Windows (x86_64).

Terminal window
curl -sSL https://raw.githubusercontent.com/codehalwell/typhon/main/install.sh | sh

The installer detects your platform, downloads the matching archive, verifies its SHA-256 against the release manifest over TLS, and installs tyc to a per-user directory (no sudo). Pin a version with --version=v1.0.0-beta.2 (or TYPHON_VERSION=…).

If your platform isn’t listed (FreeBSD, Linux MUSL, Windows ARM64), build from source below.

Prerequisites (build from source)

  • A Rust toolchain — the repo pins Rust 1.94 (tyc/rust-toolchain.toml); the vendored crates require 1.93+, so an older cargo will refuse to build. Install via rustup if you don’t already have it.
  • A Python interpreter — CPython 3.13 (or 3.14, or the free-threaded t variants). Typhon emits code targeting 3.13 by default; you can change the target in typhon.toml.
  • (Optional) uv — Astral’s package manager. Used by tyc add / tyc remove / tyc sync for dependency installation. Install with pipx install uv or via the uv install script.
  • (Optional) ty — Astral’s Python type checker. Used by tyc ty for a second-opinion typing pass against the emitted Python. Install with pip install ty or uv tool install ty.

Build from source

  1. Clone the repository.

    Terminal window
    git clone https://github.com/CodeHalwell/Typhon.git
    cd Typhon
  2. Build the compiler in release mode.

    Terminal window
    cd tyc
    cargo build --release

    This produces tyc/target/release/tyc. The first build will take a few minutes (the vendored Ruff fork is large); subsequent builds are incremental.

  3. Put it on your PATH. Either copy the binary to a directory already on PATH, or alias it.

    Terminal window
    sudo ln -s "$PWD/target/release/tyc" /usr/local/bin/tyc
  4. Verify the install.

    Terminal window
    tyc --version
    tyc --help

    You should see the version banner and the list of subcommands.

Updating

Pull the latest commits and rebuild:

Terminal window
cd /path/to/Typhon
git pull
cd tyc && cargo build --release

If you symlinked, you don’t need to redo it; the symlink points at the freshly-rebuilt binary.

Optional integrations

ty (Astral’s type checker)

For a second-opinion pass over the emitted Python:

Terminal window
uv tool install ty

Then run tyc ty in any Typhon project.

mypy (for tyc stubtest)

The runtime-introspection probe for .dty / .pyi stub drift:

Terminal window
pip install mypy
# or
uv tool install mypy

Then run tyc stubtest in projects that ship stubs.

uv (for tyc add / remove / sync)

The package-manager surface shells out to uv for installs. Without uv, tyc add / remove still edit typhon.toml; they just won’t install. Recommended:

Terminal window
pipx install uv
# or
curl -LsSf https://astral.sh/uv/install.sh | sh

VS Code extension (reference)

The repository ships a reference VS Code extension under editors/vscode/. It wires up tyc lsp over stdio. To install:

Terminal window
cd editors/vscode
npm install
npm run package # produces typhon-X.Y.Z.vsix
code --install-extension typhon-*.vsix

Restart VS Code; opening a .ty file should give you syntax highlighting and diagnostics on save. See editors/vscode/README.md for details.

Other LSP-aware editors (Neovim, Helix, Zed, etc.) can wire tyc lsp directly. See Editor Setup for examples.

Troubleshooting

”command not found: cargo”

Install Rust via rustup. On the first run it sets up cargo, rustc, and the toolchain in ~/.cargo/bin. Open a new shell or source $HOME/.cargo/env to pick it up.

Build fails with linker errors

You need a working C linker. On Linux: sudo apt install build-essential (Debian / Ubuntu) or sudo dnf install gcc (Fedora). On macOS: xcode-select --install. On Windows: install Visual Studio Build Tools.

”tyc check” complains about missing typhon.toml

You’re running outside a Typhon project. Either cd into one or scaffold one first with tyc init.

LSP doesn’t start in VS Code

Open the Output panel (View → Output) and select “Typhon” from the dropdown. The extension logs the tyc lsp invocation; if tyc is not on the PATH the editor process sees, the LSP won’t start. Set the binary path in extension settings, or fix your PATH.

Cargo build is slow

The first cargo build --release rebuilds the entire vendored Ruff fork plus every Typhon crate. Subsequent builds are incremental. If you’re hacking on the compiler, cargo build (debug mode) is faster.

Next steps

  • Walk through Hello, world for the shortest end-to-end Typhon program.
  • Read Project Layout to understand what tyc init produces.
  • Skim The Five Rules so you know what the checker will and will not tolerate.