From v0.7 to v0.8

RMK v0.8 is a major release with lots of updates and improvements. The key changes in v0.8 include:

  • Dependency upgrades: Updated many dependencies to their latest versions, including esp-hal v1.0, trouble-host v0.5, and others.

  • Tap-hold system refactoring: Introduced the new Morse operation — a superset of tap-hold and tap-dance functionalities.

  • Simplified matrix configuration: Replaced input/output_pins with row/col_pins in keyboard.toml and removed the col2row feature from Cargo.toml, making matrix setup more intuitive.

  • Dongle support: Reintroduced dongle support for split keyboards.

  • General fixes and improvements: Numerous bug fixes and refinements across the codebase.

Cargo.toml Update

Update RMK and embassy-* dependencies

First, update the rmk version to v0.8 and adjust its feature flag. Update versions of embassy-* dependencies and HALs as well:

# Update the following dependencies in your `Cargo.toml`.
# Keep feature gates unchanged unless otherwise specified.
- rmk = { version = "0.7", features = [
+ rmk = { version = "0.8", features = [
    "nrf52840_ble",
    "split",
    "async_matrix",
    "adafruit_bl",
-   "rapid_debouncer" # If applicable
-   "col2row" # If applicable
-   "bidirectional" # If applicable
] }
- embassy-executor = { version = "0.7.0" }
+ embassy-executor = { version = "0.9" }
- embassy-time = { version = "0.4", }
+ embassy-time = { version = "0.5" }
- embassy-nrf = { version = "0.3.1" }
+ embassy-nrf = { version = "0.8" }
- embassy-rp = { version = "0.4" }
+ embassy-rp = { version = "0.8" }
- bt-hci = { version = "0.3", default-features = false, features = ["defmt"] }
+ bt-hci = { version = "0.6", features = ["defmt"] }
- cyw43 = { version = "0.3.0", features = ["defmt", "firmware-logs", "bluetooth"] }
+ cyw43 = { version = "0.5", features = ["defmt", "firmware-logs", "bluetooth"] }
- cyw43-pio = { version = "0.4.0", features = ["defmt"] }
+ cyw43-pio = { version = "0.8.0", features = ["defmt"] }

Remove patched dependencies

If your Cargo.toml contains [patch.crates-io], remove them:

# Remove patched dependencies(if any)
- [patch.crates-io]
- embassy-sync = { git = "https://github.com/embassy-rs/embassy.git", rev = "f35aa4005a63e8d478b2b95aaa2bfb316b72dece" }
- embassy-futures = { git = "https://github.com/embassy-rs/embassy.git", rev = "f35aa4005a63e8d478b2b95aaa2bfb316b72dece" }
- embassy-executor = { git = "https://github.com/embassy-rs/embassy.git", rev = "f35aa4005a63e8d478b2b95aaa2bfb316b72dece" }
- embassy-time = { git = "https://github.com/embassy-rs/embassy.git", rev = "f35aa4005a63e8d478b2b95aaa2bfb316b72dece" }
- embassy-usb = { git = "https://github.com/embassy-rs/embassy.git", rev = "f35aa4005a63e8d478b2b95aaa2bfb316b72dece" }
- embassy-embedded-hal = { git = "https://github.com/embassy-rs/embassy.git", rev = "f35aa4005a63e8d478b2b95aaa2bfb316b72dece" }
- embassy-nrf = { git = "https://github.com/embassy-rs/embassy.git", rev = "f35aa4005a63e8d478b2b95aaa2bfb316b72dece" }
- embassy-rp = { git = "https://github.com/embassy-rs/embassy.git", rev = "f35aa4005a63e8d478b2b95aaa2bfb316b72dece" }
- cyw43 = { git = "https://github.com/embassy-rs/embassy.git", rev = "f35aa4005a63e8d478b2b95aaa2bfb316b72dece" }
- cyw43-pio = { git = "https://github.com/embassy-rs/embassy.git", rev = "f35aa4005a63e8d478b2b95aaa2bfb316b72dece" }
- nrf-sdc = { git = "https://github.com/alexmoon/nrf-sdc.git", rev = "7be9b853e15ca0404d65c623d1ec5795fd96c204" }
- nrf-mpsl = { git = "https://github.com/alexmoon/nrf-sdc.git", rev = "7be9b853e15ca0404d65c623d1ec5795fd96c204" }
- trouble-host = { git = "https://github.com/embassy-rs/trouble", rev = "90c6359" }
- sequential-storage = { git = "https://github.com/tweedegolf/sequential-storage", rev = "4e9abcec36c259cb2c30840649ff8f9a6b6fcafc" }

nRF specific update

For nRF, update nrf-sdc and nrf-mpsl to git version

- nrf-sdc = { version = "0.1.0", default-features = false, ..
+ nrf-sdc = { git = "https://github.com/alexmoon/nrf-sdc", rev = "11d5c3c", ..
- nrf-mpsl = { version = "0.1.0", default-features = false, ..
+ nrf-mpsl = { git = "https://github.com/alexmoon/nrf-sdc", rev = "11d5c3c", ..

Pico W specific update

For Pico W, rename "rp2040_bl" feature to "rp2040", patch cyw43, and embassy-time-*

- rmk = { version = "0.7", features = ["pico_w_ble", "rp2040_bl"] }
+ rmk = { version = "0.8", features = ["pico_w_ble", "rp2040"] }
+ [patch.crates-io]
+ cyw43 = { git = "https://github.com/embassy-rs/embassy", rev = "faacad6" }
+ embassy-time-driver = { git = "https://github.com/embassy-rs/embassy", rev = "faacad6" }
+ embassy-time = { git = "https://github.com/embassy-rs/embassy", rev = "faacad6" }

RP2040 specific update

For RP2040 wired split, rename "rp2040_bl" feature to "rp2040", remove "rp2040_pio" feature

- rmk = { version = "0.7", features = ["split", "rp2040_bl", "rp2040_pio"] }
+ rmk = { version = "0.8", features = ["split", "rp2040" ] }

ESP32 specific update

For ESP32, update all esp-* dependencies to latest, add vial feature gate to rmk if you need vial support

rmk = { version = "0.8", default-features = false, features = [
    "esp32c3_ble",
    "log",
    "storage",
-   "col2row",
+   "vial",
] 
- esp-backtrace = { version = "0.16", features = [
+ esp-backtrace = { version = "0.18", features = [
    "esp32c3",
-   "exception-handler",
    "panic-handler",
    "println",
] }
- esp-storage = { version = "0.6.0", features = ["esp32c3"] }
- esp-hal = { version = "1.0.0-beta.1", features = ["esp32c3", "unstable"] }
- esp-hal-embassy = { version = "0.8.1", features = ["esp32c3"] }
- esp-alloc = { version = "0.8.0" }
- esp-println = { version = "0.14.0", features = ["esp32c3","log-04"] }
- esp-wifi = { version = "0.14.1", features = ["esp32c3", "ble"] }
+ esp-hal = { version = "1.0", features = ["esp32c3", "unstable"] }
+ esp-storage = { version = "0.8", features = ["esp32c3"] }
+ esp-alloc = { version = "0.9.0" }
+ esp-println = { version = "0.16.0", features = ["esp32c3", "log-04"] }
+ esp-radio = { version = "0.17", features = ["esp32c3", "unstable", "ble"] }
+ esp-rtos = { version = "0.2", features = ["esp32c3", "esp-radio", "embassy"] }
+ esp-bootloader-esp-idf = { version = "0.4", features = ["esp32c3", "log-04"] }
+ static_cell = "2"

STM32 specific update

For STM32, update embassy-stm32 to v0.4

- embassy-stm32 = { version = "0.2", ... }
+ embassy-stm32 = { version = "0.4", ... }

keyboard.toml Update

[matrix] update

The main update of keyboard.toml is in the [matrix] section:

  • row2col options is not a "fake" option anymore, it "just works" in keyboard.toml
  • input/output_pins is removed, row/col_pins is used instead
[matrix]
- input_pins = ["P1_00", "P1_01", "P1_02", "P1_07", "P1_08"]
- output_pins = ["P1_05", "P1_06", "P1_03", "P1_04"]
+ row_pins = ["P1_00", "P1_01", "P1_02", "P1_07", "P1_08"]
+ col_pins = ["P1_05", "P1_06", "P1_03", "P1_04"]

# RMK uses col2row as the default matrix diode direction, if you want to use a row2col matrix, add `row2col = true`
# row2col = true

[behavior] update

Due to Morse update, [behavior] section is needed to be updated as well.

The options are also updated, please refer to Morse Configuration for details

[behavior]
# The tap_hold setting is removed, use morse instead
- tap_hold = { .. }
+ morse = { .. }

Other configuration update

For other configuration updates, please refer to Configuration section

Dongle support

Dongle support is back! Checkout config example and Rust example for more details.

INFO

For Rust code users, you need to add a keyboard.toml with following content to your project to specify the number of peripherals:

keyboard.toml
[rmk]
split_peripherals_num = 2