Home

Awesome

<!-- PROJECT LOGO --> <br /> <p align="center"> <a href="https://github.com/haobogu/rmk"> <img src="https://github.com/HaoboGu/rmk/blob/2b73951291fd829075277d64e0aeb8ea82d0bea9/docs/src/images/rmk_logo2.png?raw=true" alt="Logo" width="150"> </a> <p align="center"> A feature-rich Rust keyboard firmware. <br /> <br /> <a href="https://crates.io/crates/rmk"><img src="https://img.shields.io/crates/v/rmk"></a> <a href="https://docs.rs/rmk/latest/rmk/"><img src="https://img.shields.io/docsrs/rmk"></a> <a href="https://github.com/HaoboGu/rmk/actions"><img src="https://github.com/haobogu/rmk/actions/workflows/build.yml/badge.svg"></a> <a href="https://discord.gg/HHGA7pQxkG"><img src="https://img.shields.io/discord/1166665039793639424?label=discord"></a> </p> </p>

πŸ‘‰ Join our Discord server if you have anything to discuss!


δΈ­ζ–‡

Features

User Documentation | API Reference | FAQs | Changelog

Real World Examples

rmk-ble-keyboard

<img src="https://github.com/HaoboGu/rmk/blob/main/docs/src/images/rmk_ble_keyboard.jpg?raw=true" width="60%">

dactyl-lynx-rmk

<img src="https://raw.githubusercontent.com/whitelynx/dactyl-lynx-keyboard/refs/heads/main/resources/skeleton-prototype.jpg" width="60%">

Usage

Option 1: Initialize from template

You can use rmk-template to initialize your project.

cargo install cargo-generate flip-link
cargo generate --git https://github.com/HaoboGu/rmk-template

Then follow the steps in generated README.md. Check RMK's User Guide for details.

Option 2: Try built-in examples

Example can be found at examples. The following is a simple step-to-step instruction for rp2040. For other microcontrollers, the steps should be identical with a debug probe.

rp2040

  1. Install probe-rs

    curl --proto '=https' --tlsv1.2 -LsSf https://github.com/probe-rs/probe-rs/releases/latest/download/probe-rs-tools-installer.sh | sh
    
  2. Build the firmware

    cd examples/use_rust/rp2040
    cargo build
    
  3. Flash using debug probe

    If you have a debug probe connected to your rp2040 board, flashing is quite simple: run the following command to automatically compile and flash RMK firmware to the board:

    cd examples/use_rust/rp2040
    cargo run
    
  4. (Optional) Flash using USB

    If you don't have a debug probe, you can use elf2uf2-rs to flash your rp2040 firmware via USB. There are several additional steps you have to do:

    1. Install elf2uf2-rs: cargo install elf2uf2-rs
    2. Update examples/use_rust/rp2040/.cargo/config.toml, use elf2uf2 as the flashing tool
      - runner = "probe-rs run --chip RP2040"
      + runner = "elf2uf2-rs -d"
      
    3. Connect your rp2040 board holding the BOOTSEL key, ensure that rp's USB drive appears
    4. Flash
      cd examples/use_rust/rp2040
      cargo run
      
      Then, you will see logs like if everything goes right:
      Finished release [optimized + debuginfo] target(s) in 0.21s
      Running `elf2uf2-rs -d 'target\thumbv6m-none-eabi\release\rmk-rp2040'`
      Found pico uf2 disk G:\
      Transfering program to pico
      173.00 KB / 173.00 KB [=======================] 100.00 % 193.64 KB/s  
      

Roadmap

Current roadmap of RMK can be found here.

Minimum Supported Rust Version (MSRV)

This crate uses latest stable. Other versions should work, but they're not tested.

License

RMK is licensed under either of

at your option.