Skip to content
Phero Lang
Menu

Install

One binary, in one command.

pherolang is a native executable. It runs no service, needs no account, and reads nothing from the network while it compiles.

Browse the v0.3.0 release on GitHub.

Step 1

Download the archive for your platform

v0.3.0 publishes three archives and a checksum manifest. An archive contains a single file: the binary, at the archive root.

Released archives for pherolang v0.3.0
PlatformReleased asset
Linux x86_64pherolang-0.3.0-x86_64-unknown-linux-gnu.tar.gz
Linux aarch64pherolang-0.3.0-aarch64-unknown-linux-gnu.tar.gz
Windows x86_64pherolang-0.3.0-x86_64-pc-windows-msvc.zip
All of the aboveSHA256SUMS

The commands below pin v0.3.0. If thereleases page lists a newer tag, substitute it in the download URLs and in the archive names.

Step 2

Linux and macOS

Extract into a temporary directory, verify the archive against the published checksums, then move the binary onto your PATH.

Run this on Linux x86_64. The last line writes to/usr/local/bin, which is already on most PATHs:

bashexecuted by CI
cd "$(mktemp -d)"
curl -LO https://github.com/yestechgroup/pherolang/releases/download/v0.3.0/pherolang-0.3.0-x86_64-unknown-linux-gnu.tar.gz
curl -LO https://github.com/yestechgroup/pherolang/releases/download/v0.3.0/SHA256SUMS
sha256sum -c --ignore-missing SHA256SUMS
tar -xzf pherolang-0.3.0-x86_64-unknown-linux-gnu.tar.gz
sudo install -m 0755 pherolang /usr/local/bin/pherolang

On Linux aarch64, replace x86_64-unknown-linux-gnu withaarch64-unknown-linux-gnu in both the download command and thetar command. Everything else is identical.

sha256sum -c prints one line per listed archive it can find —pherolang-0.3.0-x86_64-unknown-linux-gnu.tar.gz: OK. It exits 1 and names the file if a single byte differs.

If you would rather not use sudo, install into your home directory instead — provided ~/.local/bin is on your PATH:

bashexecuted by CI
install -m 0755 pherolang "$HOME/.local/bin/pherolang"

Step 3

Windows

The Windows archive is a zip. This block downloads it, checks it against SHA256SUMS, extracts it to %USERPROFILE%\.pherolang, and adds that directory to your user PATH.

PowerShellexecuted by CI
$Version = '0.3.0'
$Asset = "pherolang-$Version-x86_64-pc-windows-msvc.zip"
$Base = "https://github.com/yestechgroup/pherolang/releases/download/v$Version"
Invoke-WebRequest "$Base/$Asset" -OutFile $Asset
Invoke-WebRequest "$Base/SHA256SUMS" -OutFile SHA256SUMS
$Expected = (Select-String -Path SHA256SUMS -SimpleMatch $Asset).Line.Split()[0]
if ((Get-FileHash $Asset -Algorithm SHA256).Hash -ne $Expected) { throw "checksum mismatch: $Asset" }
Expand-Archive $Asset -DestinationPath "$env:USERPROFILE\.pherolang" -Force
[Environment]::SetEnvironmentVariable('Path', "$env:USERPROFILE\.pherolang;" + [Environment]::GetEnvironmentVariable('Path', 'User'), 'User')

Get-FileHash and SHA256SUMS are compared case-insensitively; PowerShell's -ne already ignores case, so the lower-case manifest and the upper-case hash match without normalisation. The block throws on a mismatch, so a bad download stops there instead of reaching Expand-Archive.

SetEnvironmentVariable changes your user environment, not the terminal you are in. Open a new terminal before running pherolang.

Fallback

Build from source

A release is built from its tag, so installing from the tag compiles the same tree the release workflow compiled.

bashexecuted by CI
cargo install --git https://github.com/yestechgroup/pherolang --tag v0.3.0 --locked phero-cli

This needs a Rust toolchain installed through rustup. The workspace targets edition 2021 and declares no minimum Rust version; CI and the release workflow both build with the current stable channel, so that is the safe choice. Cargo puts the binary in ~/.cargo/bin, which rustup already adds to your PATH.

Expect several minutes rather than seconds: phero-cli pulls in the compiler, the language server and every in-tree backend, and they are all compiled from scratch.--locked makes cargo use the tag's own Cargo.lock, which is what the release workflow builds.

If a previous pherolang is on your PATH, cargo refuses to overwrite it. Add --force to replace it.

Step 4

Verify the install

Two commands that need no model files, then one that does.

bashexecuted by CI
pherolang --version

It prints pherolang 0.3.0 followed by the target triple it was built for —pherolang 0.3.0 (x86_64-unknown-linux-gnu) for the Linux x86_64 archive. The triple is part of the banner so a bug report can name the platform.

The registry that explains the compiler's diagnostic codes ships inside the binary — so this works from an empty directory:

bashexecuted by CI
pherolang explain E0104

You should see E0104 — Unknown action reference (error), the band it belongs to, the meaning, and a one-line fix. pherolang explain --list prints the whole allocation ledger.

To check a real model, clone the repository and run the compiler over the example it uses everywhere:

bashexecuted by CI
pherolang check examples/support/support.mox

It prints OK examples/support/support.mox and exits 0. From here,the five-minute walkthrough compiles that model to an artifact and generates code from it.

Availability

Why there is no crates.io release

You cannot yet depend on it through crates.io. That is a decision, not an oversight.

VERSIONING.mdreserves the compatibility promise for 1.0. Throughout 0.x, the grammar, the IR shape and the CLI may break, and each break lands in the changelog with its golden-regeneration note. At 1.0 the wire formats freeze: within a formatVersion evolution becomes additive only.

A caret range over a moving 0.x is a promise nobody can keep, so the crates are consumed by pinned git revision instead — the pattern in theREADME— and the binary by release tag. Both are pins you can read: a revision and a tag name one tree.

Editors

The language server

The same binary is the language server. There is no editor extension in this repository, so you point your client at the executable.

bashexecuted by CI
pherolang lsp

pherolang lsp speaks LSP 3.x over stdio, and exits when the client closes the stream — which is why this page can print it as a command that terminates. Any LSP client works: start the binary with the single argument lsp and nothing else. The server implements diagnostics, quick fixes on class-typed features, go to definition (including opposite mentions), hover, document symbols, completion, and rename.

Client settings are yours to write; the repository'sREADME shows a VS Codesettings.json that launches the binary with the lsp argument for the .mox language.