The Pony toolchain multiplexer
This project is currently beta software.
On Linux and macOS, the installer needs python3 on your PATH if you request a ponyup nightly with --repository=nightlies, or if the latest ponyup release is missing the archive or checksum for your platform. Once installed, ponyup can install and update tools without Python.
sh -c "$(curl --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/ponylang/ponyup/latest-release/ponyup-init.sh)"On Windows PowerShell Core:
Invoke-WebRequest -Uri 'https://raw.githubusercontent.com/ponylang/ponyup/latest-release/ponyup-init.ps1' -Outfile ponyup-init.ps1 && &.\ponyup-init.ps1On Windows Powershell:
Invoke-WebRequest -Uri 'https://raw.githubusercontent.com/ponylang/ponyup/latest-release/ponyup-init.ps1' -Outfile ponyup-init.ps1
&.\ponyup-init.ps1Note that you will need to have Visual Studio 2022 or 2019 (available here) or the Microsoft C++ Build Tools (available here). Install the Desktop Development with C++ workload, along with the latest Windows 10 SDK (10.x.x.x) for Desktop individual component.
If an older ponyup cannot update itself from Cloudsmith, rerun the installer using the same prefix. If you set a custom default platform, set it again after bootstrapping. On Windows, use ponyup in PowerShell. In a .bat or .cmd script, use call ponyup ... so the script continues after ponyup exits. The launcher is now bin\ponyup.bat.
Choose the latest release of the Pony compiler or the latest nightly build.
ponyup update ponyc nightlyponyup update ponyc releaseThese commands will download the chosen version of ponyc and install it to $HOME/.local/share/ponyup/bin by default. See the instructions below for how to set the install path and manage Pony applications.
On Unix:
By default, ponyup will create its root directory in $HOME/.local/share. This prefix can be set manually with the --prefix (or -p) option. All packages selected as default will be symbolically linked into ${prefix}/ponyup/bin. So, by default, ponyup update ponyc release will install ponyc to $HOME/.local/share/ponyup/bin/ponyc.
On Windows:
By default, ponyup will create its root directory in %LOCALAPPDATA%\ponyup. This prefix can be set manually with the --prefix (or -p) option. ponyup will create batch file shims (e.g. ponyc.bat in %LOCALAPPDATA%\ponyup\bin) that will run the selected version.
Ponyup downloads releases from GitHub Releases and nightly builds from the GitHub Container Registry. Use find to list versions available for your platform. Add --all to search across platforms.
ponyup find ponyc release
ponyup find --all ponyc nightly
ponyup update ponyc release <version-from-find>Cloudsmith is still available as a fallback. Pass --source=cloudsmith for the command that should use it.
ponyup --source=cloudsmith find ponyc releasePonyup works without a login. GitHub allows 60 anonymous REST API requests per hour per IP address. If you share an IP with other users or CI jobs, you can reach that limit together. Set GITHUB_TOKEN to use your account's allowance for release lookups.
With the GitHub CLI, run gh auth login --hostname github.com once. On Linux or macOS, use its token for a single command:
GITHUB_TOKEN="$(gh auth token --hostname github.com)" ponyup find ponyc releaseIn PowerShell, set the token for the current session:
$env:GITHUB_TOKEN = gh auth token --hostname github.com
ponyup find ponyc releaseYou can also supply a GitHub personal access token through the same environment variable. The installers also use GITHUB_TOKEN for GitHub release lookups when it is set. Nightly lookups use anonymous access. See GitHub's REST API rate limits.
The ponyup show command will display the installed package versions with the selected packages marked as green with an asterisk. If a more recent version is not installed, then the more recent version will be shown in yellow following the selected version.
$ ponyup show
stable-nightly-20191116 *
stable-nightly-20191115
ponyc-release-0.33.0-musl *
ponyc-nightly-20191116-musl
ponyc-nightly-20191115-musl
corral-nightly-20191115 * -- corral-nightly-20191116
changelog-tool-nightly-20191116
changelog-tool-nightly-20191115 *The show command also has an optional package argument to show only the installed versions of the given package:
$ ponyup show ponyc
ponyc-release-0.33.0-musl *
ponyc-nightly-20191116-musl
ponyc-nightly-20191115-muslThe select command can switch which installed package version to set as default. Here is an example of switching from ponyc release 0.33.0 to nightly 20191116:
$ ponyup show ponyc
ponyc-release-0.33.0-ubuntu18.04 *
ponyc-nightly-20191116-ubuntu18.04
ponyc-nightly-20191115-ubuntu18.04
$ ponyc --version
0.33.0-98c36095 [release]
compiled with: llvm 7.0.1 -- cc (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0
Defaults: pic=true
$ ponyup select ponyc nightly 20191116
selecting ponyc-nightly-20191116-ubuntu18.04 as default for ponyc
$ ponyup show ponyc
ponyc-release-0.33.0-ubuntu18.04
ponyc-nightly-20191116-ubuntu18.04 *
ponyc-nightly-20191115-ubuntu18.04
$ ponyc --version
nightly-20191116 [release]
compiled with: llvm 7.1.0 -- cc (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0
Defaults: pic=truePonyup determines the target platform from the .platform file in its data directory. Use ponyup default to set it:
ponyup default x86_64-linux-ubuntu26.04-
Unable to install ponyc:
error: unexpected selection: ponyc release latest x86_64-unknown-linuxThis is likely caused by a target triple that does not specify the libc ABI for the platform, as detected by
cc -dumpmachine. The solution is to manually set the platform identifier usingponyup default <platform>, where<platform>is a platform identifier such asx86_64-linux-ubuntu26.04.
If ponyup does not recognize your platform or you cannot install ponyc, drop into the #release stream on the Pony Zulip with:
- The output of
cc -dumpmachine(oruname -aandldd --versionon Linux). - The command you ran and the error you got.
From there the team can either point you at an existing platform identifier or add detection support for your platform in a future release.
Building from source requires ponyc 0.79.0 or later.
Run the tests with make test on Linux or macOS, or .\make.ps1 test on Windows. These commands remove their test files when the runner exits. To inspect the files, run the compiled test binary directly. It keeps each test’s packages and lockfile in a separate directory under .pony_test in your working directory.
macOS builds statically link against vendored LibreSSL libraries in lib/. This eliminates the runtime dependency on Homebrew's LibreSSL, which would break when Homebrew updates to a newer version.
To update the vendored LibreSSL version, trigger the "Update vendored LibreSSL" workflow from the Actions tab with the desired version number. The workflow builds on both macOS architectures (using the same CI runners as release builds) and opens a PR with the updated .a files.