Installation¶
Yara Code ships two binaries from one crate: ycode (the terminal frontend) and
ycode-gui (the window). Every install method below installs both at
once — one brew install, one .deb, one archive — because the point of the
two frontends is that you can move between them without thinking about it.
macOS¶
That is the whole install: Yara Code.app lands in /Applications with its
own icon and opens from the Dock and from Spotlight. Both commands live inside
the bundle and are linked onto your PATH at the same time, so ycode still
works in a terminal.
It is a cask, because only a cask may put an application where Finder can see
it — a formula's install runs in a sandbox that stops at Homebrew's own prefix.
brew upgrade --cask follows new versions as they are tagged.
Linux, and macOS without the application¶
The formula installs the two bare commands and no application — all a box without a Dock has use for, and all a Mac you only ever reach over SSH needs. The two cannot both be installed on one machine: they own the same commands.
Signing
Yara Code is signed ad-hoc rather than with an Apple Developer ID, and is not notarised, so macOS would refuse to open it — the dialog it shows for such an app offers Move to Trash and nothing else. The cask clears the quarantine flag on the copy it installs, which is the same step you would otherwise take by hand, and nothing else on the machine is affected.
Why yara-code and not ycode
ycode is already taken in Homebrew core, Debian, Fedora and the AUR by
VirusTotal's YARA, the malware
pattern-matching tool, and it owns /usr/bin/yara. The package is
therefore called yara-code and declares a conflict with ycode; the
commands it installs are still ycode and ycode-gui.
Prebuilt binaries¶
Download the archive for your platform from the latest release:
| Platform | Archive |
|---|---|
| macOS, Apple Silicon | ycode-vX.Y.Z-aarch64-apple-darwin.tar.gz |
| macOS, Intel | ycode-vX.Y.Z-x86_64-apple-darwin.tar.gz |
| Linux, x86_64 | ycode-vX.Y.Z-x86_64-unknown-linux-gnu.tar.gz |
| Linux, arm64 | ycode-vX.Y.Z-aarch64-unknown-linux-gnu.tar.gz |
| Windows, x64 | ycode-vX.Y.Z-x86_64-pc-windows-msvc.zip |
Each archive carries the README, the licence and a .sha256 beside it. On
Linux and Windows it carries the two binaries; on macOS it carries
Yara Code.app, which holds them both:
# Linux
shasum -a 256 -c ycode-vX.Y.Z-x86_64-unknown-linux-gnu.tar.gz.sha256
tar xzf ycode-vX.Y.Z-x86_64-unknown-linux-gnu.tar.gz
sudo mv ycode-vX.Y.Z-x86_64-unknown-linux-gnu/ycode* /usr/local/bin/
# macOS: drag the app to /Applications, and link the commands out of it
shasum -a 256 -c ycode-vX.Y.Z-aarch64-apple-darwin.tar.gz.sha256
tar xzf ycode-vX.Y.Z-aarch64-apple-darwin.tar.gz
mv "ycode-vX.Y.Z-aarch64-apple-darwin/Yara Code.app" /Applications/
sudo ln -sf "/Applications/Yara Code.app/Contents/MacOS/ycode" /usr/local/bin/ycode
sudo ln -sf "/Applications/Yara Code.app/Contents/MacOS/ycode-gui" /usr/local/bin/ycode-gui
Debian and Ubuntu¶
Add the repository once, and apt install ycode works from then on — upgrades
included, with apt upgrade like anything else on the machine:
sudo install -d /usr/share/keyrings
curl -fsSL https://vsdudakov.github.io/packages/apt/ycode.gpg \
| sudo tee /usr/share/keyrings/ycode.gpg > /dev/null
echo "deb [signed-by=/usr/share/keyrings/ycode.gpg] https://vsdudakov.github.io/packages/apt stable main" \
| sudo tee /etc/apt/sources.list.d/ycode.list > /dev/null
sudo apt update
sudo apt install ycode
Both architectures are served: amd64 and arm64. The repository's Release
file is signed, and signed-by is what ties the key to it, so nothing else on
the machine is trusted any further than it was.
Fedora, RHEL and openSUSE¶
sudo curl -fsSL -o /etc/yum.repos.d/ycode.repo \
https://vsdudakov.github.io/packages/yum/ycode.repo
sudo dnf install ycode
x86_64 and aarch64, and the repository metadata is signed with the same
key, which ycode.repo points at.
A single package file¶
Every release also carries the .deb and the .rpm on their own, for a
machine that should not grow a new repository:
curl -LO https://github.com/vsdudakov/yara-code/releases/latest/download/ycode_X.Y.Z-1_amd64.deb
sudo apt install ./ycode_X.Y.Z-1_amd64.deb
curl -LO https://github.com/vsdudakov/yara-code/releases/latest/download/ycode-X.Y.Z-1.x86_64.rpm
sudo dnf install ./ycode-X.Y.Z-1.x86_64.rpm
Every Linux path installs ycode and ycode-gui into /usr/bin and registers
a desktop entry for the window frontend. The repositories keep the ten most
recent versions; older ones stay on their GitHub release.
Arch Linux¶
A PKGBUILD is attached to every release and tracks the published tarball:
From source¶
The binaries land in target/release/.
Terminal frontend only¶
The window needs a display server and a graphics stack; the terminal frontend needs neither. On a server, build it alone:
Nothing but a Rust toolchain is required — no GTK, no Wayland, no wgpu.
Linux build dependencies¶
The window frontend needs the usual desktop development packages. On Debian and Ubuntu:
(GTK is there for the native Open/Save dialogs.)