rumcake

Crate rumcake

source ·
Expand description

§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!

Re-exports§

  • pub use keyberon;
  • pub use once_cell;

Modules§

  • Bluetooth host communication.
  • Display feature.
  • An optional set of built-in drivers which implement rumcake’s driver traits, so they can be used with rumcake tasks.
  • Utilities for interfacing with hardware.
  • Basic keyboard traits and tasks.
  • Split keyboard features.
  • Storage related features.
  • USB host communication.
  • Support for Via’s protocol (version 12).
  • Support for Vial’s protocol (version 6).

Macros§

Structs§

  • Data structure that allows you to notify listeners about any changes to the data being managed. This can be useful when you want a task to react to changes to certain data.

Attribute Macros§