Building from source
One Rust workspace: one command to build, one command to test, and packaging scripts for each platform.
Requirements
- Rust
- Stable, 2021 edition, installed with rustup.
- A C toolchain
- The cryptography library
ring, used by TLS, compiles some C code for the host. On macOS, the Xcode command line tools are enough. - Linux system libraries
- Development packages for windows, keyboards and file dialogs; see below.
- Python 3
- Runs the law’s frozen cores and the conformance comparisons, with the standard library alone.
- Foundry
- Used to test the registry contract and recompute its code hash.
On Debian or Ubuntu, install the build dependencies first:
sudo apt install build-essential pkg-config libxkbcommon-dev libxkbcommon-x11-0 \
libwayland-dev libx11-dev libxcursor-dev libxrandr-dev libxi-dev libgl1-mesa-dev \
xdg-desktop-portal xdg-desktop-portal-gtkOn Linux the system file dialog goes through the desktop portal, so running the app needs xdg-desktop-portal and a backend; where the portal is missing, drag files straight into the window.
Build and test
tar -xzf zikaron-0.1.0-src.tar.gz
cd zikaron-0.1.0
cargo build --release --locked
cargo test --workspace--locked holds the build to the dependency versions pinned in Cargo.lock, as release builds do. The products:
| Program | What it is |
|---|---|
target/release/app | The desktop window, packaged as ZIKARON.app on macOS and as zikaron-desk on Linux |
target/release/zikaron | The command line; see Command line |
zk1, zkk, zks, zka, zkg | Helper programs for tests and conformance comparisons |
Packaging
| Script | Output |
|---|---|
packaging/macos/build.sh [--identity NAME] | ZIKARON.app, inside a .dmg and a .pkg (macOS) |
packaging/linux/build.sh | A .deb and an AppImage, built natively on Linux |
packaging/linux/cross-build.sh | The same Linux x86_64 packages, built on another host with zig and cargo-zigbuild |
Packages land in dist/, each platform with a SHA256SUMS-<system>-<arch>.txt. When --identity is left off, the macOS script signs ad hoc (-); release packages are signed with Kaptonia’s certificate; see Releasing.
Contract tests
cd base/zikaron-core/contracts
forge testThe law’s cores
cd base/zikaron-conformance
./criterion-digest.sh
./criterion-digest-kit.shHow to run the conformance corpora against a candidate implementation is under Testing an implementation.
Trying it with separate data
The app finds the machine folder from HOME, and the key store lives there alone. Point HOME at an empty directory before launching, and the machine folder, key store and ledgers all land inside it, apart from your everyday data:
T=$(mktemp -d)
HOME=$T ./target/release/appFor a trial, choose “Custom” in the wizard first and connect to the Sepolia testnet; see Networks in the Wiki. Generate test keys on the spot with zikaron keygen, and discard them after use.
Embedded fonts
The interface’s Latin face Inter and the monospace JetBrains Mono are embedded in the app; Chinese comes from the system’s PingFang on macOS and from the embedded Noto Sans SC on Linux. All three embedded fonts are released under SIL OFL 1.1, with their licence texts in crates/zikaron-ui/fonts/.