Install
One line installs ridgunc, stable, omni and the standard libraries, each checked against its signature.
Ridgun has three programs:
ridguncis the compiler. It checks a file, runs it, or builds it into a native executable.stableis the project tool. It creates projects, fetches dependencies, checks, tests, formats and builds them.omniis the package manager. It installs the toolchain, the standard libraries and the packages published here, and checks the signature of everything it installs.
They are native executables that need nothing else on the machine. Releases are built for Linux, macOS and Windows, on x86-64 and ARM64.
One line
curl -fsSL https://ridgun.com/install.sh | sh
The script downloads the release for your system and the standard libraries, then runs omni setup. omni checks their signatures with the release key built into it, then installs the three programs in ~/.local/bin and the libraries in ~/.local/lib/ridgun. If a check fails, nothing is installed. You can read the script first.
On Windows, paste this in PowerShell instead:
irm https://ridgun.com/install.ps1 | iex
It does the same and puts the folders in your user folder: %USERPROFILE%\.local\bin and %USERPROFILE%\.local\lib\ridgun. You can read it first too. In Git Bash the first line works as well.
By hand
Download the file for your system from the Download page, with the release's SHA256SUMS and SHA256SUMS.minisig. With minisign you can check the signature yourself. The key is on the Download page and in the Ridgun repository's README; make sure the two match:
minisign -Vm SHA256SUMS -P <the release key, RW…>
sha256sum -c --ignore-missing SHA256SUMS
Then unpack it and let omni install it:
tar -xzf ridgun-<version>-<arch>-<os>.tar.gz
./ridgun-<version>/bin/omni setup
omni downloads the release again from this site, checks its signature, and installs it together with the standard libraries.
On Windows, in PowerShell (Windows 10 and later come with tar):
(Get-FileHash ridgun-<version>-<arch>-windows.tar.gz -Algorithm SHA256).Hash.ToLower()
tar -xzf ridgun-<version>-<arch>-windows.tar.gz
.\ridgun-<version>\bin\omni.exe setup
The first line prints the file's SHA-256, which must be the one SHA256SUMS lists for it.
PATH
Most Linux distributions already have ~/.local/bin on the PATH. If yours doesn't, add this line to ~/.profile (on macOS, ~/.zprofile), then open a new terminal:
export PATH="$HOME/.local/bin:$PATH"
On Windows, add %USERPROFILE%\.local\bin to your user PATH from PowerShell, then open a new terminal:
[Environment]::SetEnvironmentVariable('Path', "$env:USERPROFILE\.local\bin;" + [Environment]::GetEnvironmentVariable('Path', 'User'), 'User')
Check that it works
ridgunc --version
It prints the compiler's version and target, for example ridgunc 0.9.52 (self-hosted Ridgun compiler, x86_64-unknown-linux-gnu).
Libraries and tools
omni installs what this site publishes, and checks each signature before it installs anything:
omni install json # a library, into the project you are in
omni install -g unix-tools # a package's programs, into ~/.local/bin
omni search # what you can install
The Packages page lists them all. Now write your first program.