MCPcopy Index your code
hub / github.com/Univa/rumcake

github.com/Univa/rumcake @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
853 symbols 1,521 edges 64 files 181 documented · 21%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

rumcake

rumcake is a rust library that lets you build featureful keyboard firmware with ease.

[!WARNING] rumcake is still a work in progress. Expect some bugs and breaking changes.

User Docs - API Reference - How to Contribute

About

Under the hood, rumcake uses embassy-rs as the embedded framework. Providing rumcake as a library allows you to build your firmware in your own Cargo workspace, removing the need to push code to the central rumcake repo.

The rumcake library:

  • Provides embassy-executor tasks for common keyboard activities, including matrix polling, host communication, LED rendering, etc.
  • Provides macros that allow you to configure your keyboard firmware in an easy-to-understand way. keyberon is also used under the hood for keyboard layout configuration.
  • Aims to be platform-agnostic, and uses different HALs (hardware abstraction libraries) under the hood, depending on the chip you decide to build for.

Minimum Supported Rust Version

rumcake uses some Rust features that are only found on the nightly toolchain. Please use the latest nightly toolchain when compiling your firmware.

MCUs

Note that building and flashing instructions may change depending on the MCU. See the templates for some build and flashing instructions for some common setups.

Tested

  • STM32F072CBx
  • STM32F303CBx
  • nRF52840 (tested with nice!nano v2)
  • RP2040

Features

Working

The following features are working, but may not be stable or has missing components.

  • USB host communication
  • Bluetooth host communication (only for nRF-based keyboards)
  • Backlighting
  • Underglow
  • Split keyboards
  • Displays (e.g. SSD1306)
  • Storage
  • Via/Vial
  • Media keys
  • Encoders

Why the name "rumcake"

"RUst MeChAnical KEyboard"

Acknowledgements

This firmware would not be possible without the work done by other community projects.

A huge thanks goes to the following projects:

  • QMK
  • A lot of backlighting and underglow animations have been adapted from QMK.
  • WS2812 Bitbang driver is also loosely based on their implementation.
  • ZMK
  • Their existing bluetooth, and split keyboard implementations have been helpful references for rumcake's implementation
  • TeXitoi's keyberon crate
  • For providing the logic for keyboard matrix and layouts
  • jtroo's keyberon fork
  • For the implementation of extra layout actions, like one shot and tap dance keys
  • riskable and borisfaure
  • For the implementation of sequences/macros in keyberon
  • simmsb's corne firmware
  • Very helpful reference for developing a keyboard firmware using embassy-rs
  • TeXitoi's keyseebee project
  • Another helpful reference for a rust-based keyboard firmware
  • Any dependency used by rumcake. Building this would be a lot more difficult without them!

Extension points exported contracts — how you extend this code

MatrixSampler (Interface)
Trait that allows you to use ADC hardware to pull samples for an analog matrix. [6 implementers]
rumcake/src/keyboard.rs
Leds (Interface)
A trait to manage keyboard LEDs. `()` implements this trait if you don't care of LEDs. [1 implementers]
keyberon/src/keyboard.rs
FlashStorage (Interface)
A trait that allows a flash peripheral to be used as a [`StorageService`]. [4 implementers]
rumcake/src/storage.rs
FromAscii (Interface)
Trait that defines how ASCII characters get converted to keycodes. [1 implementers]
keyberon/src/layout.rs
Animator (Interface)
Trait which can be used to implement an animator that can be used with the lighting task. [4 implementers]
rumcake/src/lighting/mod.rs
HidDevice (Interface)
(no doc) [1 implementers]
keyberon/src/hid.rs
Pollable (Interface)
Trait that allows you to implement matrix polling functionality. This trait is already implemented for all of the existi [3 …
rumcake/src/keyboard.rs
SimpleBacklightMatrixDriver (Interface)
A trait that a driver must implement in order to support a simple (no color) backlighting matrix scheme. [2 implementers]
rumcake/src/lighting/simple_backlight_matrix.rs

Core symbols most depended-on inside this repo

keycodes
called by 410
keyberon/src/layout.rs
assert_keys
called by 409
keyberon/src/layout.rs
event
called by 264
keyberon/src/layout.rs
k
called by 153
keyberon/src/action.rs
get
called by 52
rumcake/src/lib.rs
clone
called by 21
keyberon/src/layout.rs
set_brightness_for_each_led
called by 20
rumcake/src/lighting/simple_backlight_matrix.rs
set
called by 14
rumcake/src/lib.rs

Shape

Method 331
Function 304
Class 97
Enum 72
Interface 49

Languages

Rust100%
TypeScript1%

Modules by API surface

keyberon/src/layout.rs81 symbols
rumcake/src/via/handlers.rs62 symbols
rumcake-macros/src/lib.rs51 symbols
rumcake/src/lighting/rgb_backlight_matrix.rs36 symbols
rumcake/src/lighting/simple_backlight_matrix.rs33 symbols
rumcake/src/storage.rs32 symbols
rumcake/src/bluetooth/nrf_ble.rs32 symbols
rumcake/src/lighting/underglow.rs31 symbols
rumcake/src/lighting/simple_backlight.rs31 symbols
rumcake/src/keyboard.rs31 symbols
rumcake/src/vial/handlers.rs26 symbols
keyberon/src/hid.rs24 symbols

For agents

$ claude mcp add rumcake \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact