Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 51 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: CI

on: [push, pull_request]

# Least privilege by default; the deploy job widens this for itself.
permissions:
contents: read

jobs:
ci:
strategy:
Expand All @@ -11,14 +15,16 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false
- uses: pnpm/action-setup@v6
with:
version: 11
- uses: actions/setup-node@v7
with:
node-version: 24

- uses: cargo-bins/cargo-binstall@main
- uses: cargo-bins/cargo-binstall@e00d2c94cc0067b77737821097a62d91c0301baa # v1.21.1

- name: Install wasm-pack
shell: bash
Expand All @@ -35,6 +41,8 @@ jobs:
- run: pnpm install --frozen-lockfile
- run: pnpm build:wasm
- run: pnpm lint
- run: pnpm check
- run: pnpm test
- run: pnpm build:tauri

- uses: actions/upload-artifact@v7
Expand All @@ -48,8 +56,46 @@ jobs:
src-tauri/target/release/bundle/**/*.AppImage
if-no-files-found: error

# End-to-end against the riscv fixture firmware: real rynk protocol over a
# real UART-to-TCP bridge. Linux-only — it needs qemu, not a desktop bundle.
qemu:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false
- uses: pnpm/action-setup@v6
with:
version: 11
- uses: actions/setup-node@v7
with:
node-version: 24

- uses: cargo-bins/cargo-binstall@e00d2c94cc0067b77737821097a62d91c0301baa # v1.21.1

- name: Install toolchains and qemu
run: |
rustup target add wasm32-unknown-unknown riscv32imac-unknown-none-elf
cargo binstall wasm-pack --no-confirm
sudo apt-get update
sudo apt-get install -y qemu-system-misc

# One clone for both artifacts. The firmware and the wasm client speak one
# protocol, so resolving `main` twice can put them on different commits and
# fail the run on wire errors. RMK_REPO is honoured by both build:wasm and
# qemu/run.mjs.
- name: Check out rmk once
run: |
git clone --depth 1 https://github.com/rmk-rs/rmk.git "$RUNNER_TEMP/rmk"
echo "rmk at $(git -C "$RUNNER_TEMP/rmk" rev-parse HEAD)"
echo "RMK_REPO=$RUNNER_TEMP/rmk" >> "$GITHUB_ENV"

- run: pnpm install --frozen-lockfile
- run: pnpm build:wasm
- run: pnpm test:qemu

deploy:
needs: ci
needs: [ci, qemu]
runs-on: ubuntu-24.04
permissions:
contents: read
Expand All @@ -59,14 +105,16 @@ jobs:
github.event_name == 'pull_request' && github.base_ref == 'main'
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false
- uses: pnpm/action-setup@v6
with:
version: 11
- uses: actions/setup-node@v7
with:
node-version: 24

- uses: cargo-bins/cargo-binstall@main
- uses: cargo-bins/cargo-binstall@e00d2c94cc0067b77737821097a62d91c0301baa # v1.21.1

- name: Install wasm-pack
run: |
Expand Down
63 changes: 50 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<div align="center">
<img src="./src-tauri/icons/icon.png" alt="Clash" width="128" />
<h3>
Gui configuration for <a href="https://github.com/rmk-rs/rmk">RMK</a> based on <a href="https://github.com/tauri-apps/tauri">Tauri</a> and <a href="https://github.com/nuxt/nuxt">Nuxt</a>
<img src="./src-tauri/icons/icon.png" alt="RMK GUI" width="128" />
<h3>
Gui configuration for <a href="https://github.com/rmk-rs/rmk">RMK</a> based on <a href="https://github.com/tauri-apps/tauri">Tauri</a> and <a href="https://github.com/sveltejs/svelte">Svelte</a>
</h3>
</div>

## Warn
Expand All @@ -14,13 +14,14 @@ safe distance.

## Install

Go to the release page to download the corresponding installation package Supports Windows (x64/x86), Linux (x64/arm64)
Go to the release page to download the corresponding installation package. Supports Windows (x64/x86), Linux (x64/arm64)
and macOS 10.15+ (intel/apple).

## Features

- Based on Rust and Tauri2 frameworks.
- Concise and modern user interface.
- Concise and modern user interface, built with Svelte 5 and Tailwind CSS 4.
- Talks the rynk protocol over USB serial, BLE, and Web Serial.
- Support for Windows, macOS, and Linux.

## Development
Expand All @@ -35,18 +36,53 @@ Make sure you have Rust, NodeJS and Python installed on your system.
2. Install dependencies:
```bash
pnpm install
rustup target add wasm32-unknown-unknown
cargo install wasm-pack
```
3. Build the protocol client:
```bash
pnpm build:wasm
```
3. Start the development server:
`src/rynk/wasm/` is a build artifact and is not checked in, so this step is
required before anything else runs. It compiles `rynk-wasm` from a sibling
`../rmk` checkout when one exists, otherwise it clones `rmk-rs/rmk`; set
`RMK_REPO` to point somewhere else.
4. Start the development server:
```bash
pnpm web:dev
pnpm tauri:dev
pnpm dev:web # browser only
pnpm dev:tauri # desktop app — runs dev:web itself, don't start both
```
4. Build the application:
5. Build the application:
```bash
pnpm web:build
pnpm tauri:build
pnpm build:web
pnpm build:tauri # runs build:web itself
```

### Testing

```bash
pnpm test # unit tests — no device and no wasm build needed
pnpm test:qemu # end-to-end against the riscv fixture firmware
pnpm check # svelte-check
CI=true pnpm lint
```

`pnpm test:qemu` builds and runs `qemu/` itself, so there is nothing to start by
hand. It needs `qemu-system-riscv32` (`brew install qemu`, or
`apt install qemu-system-misc` on Debian/Ubuntu), the
`riscv32imac-unknown-none-elf` target, and step 3 to have run. It picks a free
TCP port per run; a manual `pnpm qemu` defaults to 7965 and takes
`RMK_QEMU_PORT`. Don't point both at one port — the fixture's serial port serves
one client at a time.

The fixture firmware resolves `rmk` the same way step 3 does (`RMK_REPO`, then a
sibling `../rmk`), so the firmware and the wasm client stay on one revision.
With neither, cargo falls back to the `main` branch and the two can drift onto
different protocol commits.

`CI=true` matters for linting: the eslint config detects editors and relaxes
some rules, so a bare `pnpm lint` is more permissive than CI.

## Roadmap

Too many to write
Expand All @@ -57,8 +93,9 @@ RMK-GUI was based on or inspired by these projects and so on:

- [Tauri](https://github.com/tauri-apps/tauri) A framework for building tiny, fast binaries for all major desktop and
mobile platforms.
- [Nuxt](https://github.com/nuxt/nuxt) An open source framework that makes web development intuitive and powerful.
- [PrimeVue](https://github.com/primefaces/primevue) A free open-source Vue 3 UI component library with rich features.
- [Svelte](https://github.com/sveltejs/svelte) A UI framework that compiles components to small, surgical JavaScript.
- [Ark UI](https://github.com/chakra-ui/ark) A headless, accessible component library for building design systems.
- [Tailwind CSS](https://github.com/tailwindlabs/tailwindcss) A utility-first CSS framework.
- [Vial-gui](https://github.com/vial-kb/vial-gui) An open-source cross-platform (Windows, Linux and Mac) GUI and a QMK
fork for configuring your keyboard in real time.
- [RMK](https://github.com/rmk-rs/rmk) Rust keyboard firmware library with layers, macros, real-time keymap editing,
Expand Down
Loading