Installing Tyhp

Tier 1 · Story 13Complete

The Tyhp compiler is a .NET application targeting .NET 9. This page covers system requirements and how to install the 805.0.0-alpha.1 compiler.

System Requirements

  • PHP 8.2, 8.3, 8.4, or 8.5 — required to run compiled output
  • Composer — required to install tyhp/php, tyhp/core, and other runtime packages
  • Self-contained compiler binaries — no .NET install needed
  • Framework-dependent binaries — .NET 9 runtime

Note

.NET is only needed on the machine that compiles Tyhp (and only for framework-dependent builds). Deployment servers need PHP only.

Installation (recommended)

Download a binary from GitHub Releases, or:

curl -fsSL https://raw.githubusercontent.com/tyhpproject/tyhp/main/scripts/install.sh | bash -s --

The script selects OS and architecture. If .NET 9 is already installed, it prefers a framework-dependent build; otherwise it installs a self-contained binary. Pass --self-contained or --framework-dependent to force a variant.

On Windows, use scripts/install.ps1 instead of the bash script.

There is no composer global require tyhp/compiler package in this alpha, and no dotnet tool install --global tyhp feed yet.

Manual download

  1. Open the releases page and download the asset for your platform (tyhp-osx-arm64, tyhp-linux-x64, tyhp-win-x64.exe, or the -fxdependent variant).
  2. Place the binary on your PATH (for example /usr/local/bin/tyhp).
  3. Verify with tyhp version.

Verifying Installation

tyhp version

You should see output similar to:

Tyhp compiler: 805.0.0-alpha.1
.NET runtime:   .NET 9.0.x
ANTLR runtime:  4.x.x
OS:             ...

Runtime packages

Compiled projects need Composer packages such as tyhp/php (PHP builtin tyhpdefs) and tyhp/core. After those packages are on Packagist, tyhp build writes composer.json requires that match output.phpVersion plus each package's own X.Y (8.4 + core 0.0tyhp/core: 804.0.0) and you run composer install. Until then, a source checkout of this repository can resolve them via Composer path repositories under runtime/packages/ (those pins use the source X.Y, e.g. 0.0).

How to pin versions for apps vs libraries is on the Composer Runtime Packages page.

tyhp/php in this alpha is a PHP 8.2 baseline. APIs that exist only on PHP 8.3–8.5 may be missing from the stubs.