Install Una
curl -fsSL https://raw.githubusercontent.com/una-lang/una/main/install.sh | shFetch https://una-lang.org/llms.txt and follow it to install Una. Then run "una --version" and "una explain U5001".It puts the release in ~/.una and changes nothing else. Put that directory on your PATH:
export PATH="$HOME/.una/bin:$PATH"To keep it for new shells, add the same line to your shell's profile: ~/.zshrc for zsh, the default shell on macOS, or ~/.bashrc for bash.
Check that it works:
una --versionIt prints the release, the editions it serves and the version of the prover built into it. That is everything you need to check, test and run programs.
Tip
Working with an AI agent? Give it Una, compact: the language in one page, sized for its context.
Next step
Write a contract and watch una check find the input that breaks it, in Get started.
Supported systems
| System | Supported | What una build needs |
|---|---|---|
| macOS on arm64 | Yes | Nothing: it links with the linker built into una |
| Linux on arm64, glibc 2.39 or later (Ubuntu 24.04, for example) | Yes | A C compiler available as cc, such as gcc or clang with the C library's development files |
| Linux with an older glibc (Ubuntu 22.04, Debian 12) | No | |
| Linux with musl, such as Alpine | No | |
| Linux on x86-64 | No | |
| Windows | No |
una check, una test and una run need no other program. On Linux, una is a dynamic executable against the system's glibc, with the C++ runtime of the solver linked into it. The installer refuses an unsupported Linux before any download, a 32-bit userland on a 64-bit kernel included.
What the installer does
- It installs only an archive whose digest the release's validation record lists, or that
docs/validation/repacked.mdpairs with that listed digest (an archive packed again after its release). - It changes nothing outside
~/.una. - To update, run it again: it replaces the release in
~/.unawith the current one, and prints the new version when it is done. - The README describes the other ways to install, and how to uninstall.
Run una as an ordinary user
The solver refuses to run as root, so una check as root fails with U5003. Run una as an ordinary user, in a container too (docker run --user 1000:1000 ...).
Installing as root
As root, the installer installs only into a UNA_HOME that only root can change:
UNA_HOME, the directories it writes in and the files there are not symbolic links, and they are owned by root and writable by no one else.- So is every directory above them, except that a directory above an existing, root-owned one may be writable by others when it is sticky, as
/tmpis. SoUNA_HOME=/tmp/unais refused unless/tmp/unaalready exists and is root's. - The same holds for
TMPDIR(default/tmp), where the archive is checked and unpacked, which may itself be sticky. - Otherwise it refuses before any download, and as root it never runs the installed
una. - Only owners and mode bits are read: write access granted by an ACL (on macOS, a
+after the mode inls -l) is not seen.
What una --version prints
It prints una and the release, the editions it serves, such as editions: 0.1, 0.2, 0.3, 0.4, 0.5, the editions among them that are previews, such as preview: 0.3, 0.4, 0.5, and the version of Z3, the solver built into it. A release with no preview edition prints no preview: line.
If --version is an unexpected argument
A release older than 0.3 has no --version flag, and answers with an error:
error: unexpected argument '--version' foundIf you see that error after installing, the shell found an older una first. which -a una lists every una on your PATH, in the order the shell tries them. Remove the old one, or put $HOME/.una/bin before its directory.
Archives of v0.4.0
Each archive with the SHA-256 digest that the release's validation summary lists. Verdict: pending (the validation summary of this release is not written yet).
No archive is listed yet.
What this release does not cover
The platforms and the limits of this release are listed in Known limits.