alquerque

cross-platform, stripped-down Qirkat implementation using Tauri + Gleam

View on GitHub

Alquerque

Qirkat, also known as alquerque, is a board game that was popular in medieval Spain and later grew into checkers. Alquerque is a small desktop version of it: you play against the computer, against another person at the same screen, or watch the computer play itself. It is the Gleam and Lustre code of the web version, Qirkat Gleam, unchanged, in a Tauri 2 window, so that one source makes an app for Linux, Windows and the Mac.

The Alquerque window during a game: a five by five board of points joined by straight lines and, at every other point, diagonal ones; Dark rings above and Light rings below, blue lines marking Light's legal moves, the tally above and the Resign and Quit buttons below

The full game is the Qirkat app for iPhone, iPad and Mac, which comes with documentation, move suggestions, analysis tools and three short stories. The web version is played at https://qirkat.com/play/.

Getting it

On a Mac, download the disk image from the latest release, open it, and drag Alquerque to your Applications folder. It needs an Apple-silicon Mac with macOS 13 or later, and it opens without a security warning, since the app is signed and notarised.

On Fedora, download the RPM from the latest release and install it:

sudo dnf install ./Alquerque-0.1.0-1.x86_64.rpm

Alquerque then appears among the desktop’s applications, with its icon; sudo dnf remove alquerque takes it away again. It needs an x86_64 machine, and dnf brings in the two libraries it uses (GTK 3 and WebKitGTK 4.1) if they are not there. The package was built and tried on Fedora 45 with GNOME, on Wayland; it is not signed, so dnf says that it skipped the OpenPGP check. Other distributions that use RPMs are untried, and for anything else the route is to build from source, as below.

On Windows there is no package to download yet: build it from source, as below. The configuration for a Windows installer is in place, but it has not been built or tried so far.

Playing

Each side has twelve pieces on a board of five points by five, with only the centre point free. Every point is joined by a line to the points beside, above and below it; diagonal lines meet only at every other point (the corners, the centre and the points in step with them). Light moves first.

To move, click a piece and then the point it should go to. A multiple jump is made one hop at a time.

The start screen asks how many players there are (0, 1 or 2; with one, you then choose your side) and holds the three settings:

Resign gives the game to the other side, and Quit goes back to the start screen. The tally above the board counts each side’s wins, and the draws.

Two limits of this version:

The window can be resized; the game grows and shrinks to fill it and stays in the middle.

Running it from source

You need:

git clone https://github.com/jonathanhuston/alquerque.git
cd alquerque
npm install
npm test         # gleam test
npm run dev      # the app in its window, with live reload
npm run build    # the package for the platform you are on

The first npm run dev or npm run build downloads Bun into .lustre/ and compiles Tauri’s Rust crates, which takes a minute or two and leaves about 3 GB in src-tauri/target/. npm run web runs the same page in an ordinary browser at http://localhost:1234.

npm run build makes:

Platform Package Where
macOS Alquerque.app, signed only for the Mac that built it (see Releasing) src-tauri/target/release/bundle/macos/
Linux an RPM src-tauri/target/release/bundle/rpm/
Windows an NSIS installer src-tauri/target/release/bundle/nsis/

The Mac and the Linux builds have been run; the Windows one has not. Each platform’s package has to be built on that platform.

On Fedora

Tried on Fedora 45 (GNOME, Wayland) on 5 December 2026; the record is in docs/risk-check.md. Tauri’s libraries, from its page for Fedora:

sudo dnf check-update
sudo dnf install webkit2gtk4.1-devel openssl-devel curl wget file \
  libappindicator-gtk3-devel librsvg2-devel libxdo-devel
sudo dnf group install "c-development"

Rust through rustup (https://www.rust-lang.org/tools/install), then Node:

sudo dnf install nodejs npm

Fedora has no package for Gleam or for rebar3. The trial took Gleam, Erlang and rebar3 from Homebrew, which needs no root access once it is installed, and whose gleam brings the other two with it (Gleam 1.19.2, Erlang/OTP 29, rebar3 3.28):

brew install gleam

The other route, not tried here, is Fedora’s own Erlang (sudo dnf install erlang; check its version against https://gleam.run/documentation/compatibility-reference/), the rebar3 file from https://github.com/erlang/rebar3/releases made executable on your PATH, and Gleam’s precompiled executable (gleam-v…-x86_64-unknown-linux-musl.tar.gz) from https://github.com/gleam-lang/gleam/releases, unpacked onto your PATH.

Then:

git clone https://github.com/jonathanhuston/alquerque.git
cd alquerque
npm ci
npm test
npm run dev
npm run build
sudo dnf install src-tauri/target/release/bundle/rpm/*.rpm

npm ci rather than npm install, because Fedora’s npm 10 rewrites package-lock.json (written by npm 11) when it installs. The RPM is made by Tauri itself, so rpm-build is not needed. To keep Alquerque in GNOME’s dash, right-click its icon there while it runs and choose Pin to Dash.

If the window is blank or flickers, see https://v2.tauri.app/develop/debug/linux-graphics/.

Checking it

npm run play (with npm run web running) plays the page by clicking, in Playwright’s WebKit: every number of players, both sides, undo, redo, resign, quit, the settings, the tally, a computer move overtaken by Undo or a new game, and a whole computer-against-computer game at the lowest and the highest strength. It needs npx playwright install webkit once.

How it is built

   
src/, test/ the game, copied unchanged from Qirkat Gleam: rules (game, board, move, position, player), the search (ai), the Lustre model and views. Changes to the game are made there and copied here
gleam.toml the web version’s, with the page (title, reset) generated by Lustre’s dev tools
assets/ fit.css and fit.js, which scale the game to fill the window and keep it centred
src-tauri/ the Tauri shell as tauri init wrote it, the window and bundle settings, per-platform overrides, the icon
dev/play.mjs the scripted check
docs/ the spec for the first step, the risk check, screenshots

What was learned on the way, and what still has to be looked at by eye, is in docs/risk-check.md.

Releasing

The Mac

To open on other Macs without a warning, the app has to be signed with a Developer ID and notarised by Apple. With a “Developer ID Application” certificate in the keychain:

APPLE_SIGNING_IDENTITY="Developer ID Application: <Your Name> (<TEAMID>)" npm run build

The identity’s full name is listed by security find-identity -v -p codesigning. Tauri signs the app with the hardened runtime and, with no Apple ID or API key variables set, skips notarising. Before signing it runs xattr -cr on the bundle, which needs the system’s /usr/bin/xattr: if another xattr comes first on your PATH (Anaconda installs one without -r), put PATH="/usr/bin:$PATH" in front of the command.

Notarising and the disk image are done by hand, from src-tauri/target/release/bundle/macos/, with notary credentials stored once with xcrun notarytool store-credentials <profile>:

ditto -c -k --keepParent Alquerque.app Alquerque.zip
xcrun notarytool submit Alquerque.zip --keychain-profile <profile> --wait
xcrun stapler staple Alquerque.app
spctl -a -vv Alquerque.app       # expect: Notarized Developer ID

Then the disk image, with the stapled app beside a link to /Applications:

mkdir <staging> && ditto Alquerque.app <staging>/Alquerque.app && ln -s /Applications <staging>/Applications
hdiutil create -volname Alquerque -srcfolder <staging> -ov -format UDZO Alquerque.dmg
codesign --sign "<identity>" --timestamp Alquerque.dmg
xcrun notarytool submit Alquerque.dmg --keychain-profile <profile> --wait
xcrun stapler staple Alquerque.dmg
spctl -a -t open --context context:primary-signature -v Alquerque.dmg

The dmg is made by hand because Tauri’s own dmg step builds the app again and would lose the staple. The image is not in the repository: it is built into release/, which git ignores, and published on the releases page.

Linux

npm run build on Fedora makes the RPM as it is published; nothing is signed. It is copied to release/ and added to the release:

cp src-tauri/target/release/bundle/rpm/Alquerque-0.1.0-1.x86_64.rpm release/
sha256sum release/Alquerque-0.1.0-1.x86_64.rpm
gh release upload v0.1.0 release/Alquerque-0.1.0-1.x86_64.rpm

History

Jonathan Huston wrote Qirkat in Swift for iPhone, iPad and Mac. The Gleam web version was written in February 2026 and Alquerque in December 2026, both using Claude.

Licence

The code in this repository is released under the MIT licence. The full Qirkat app is a separate program and is not part of it.