From 79125b9e39a226a5e16e6a116bcc66d58cb14f8e Mon Sep 17 00:00:00 2001 From: Haobo Gu Date: Wed, 11 Dec 2024 17:32:07 +0800 Subject: [PATCH 01/25] feat(storage): use iterator to speedup startup Signed-off-by: Haobo Gu --- rmk/Cargo.toml | 2 +- rmk/src/storage/mod.rs | 52 ++++++++++++------------------------------ 2 files changed, 16 insertions(+), 38 deletions(-) diff --git a/rmk/Cargo.toml b/rmk/Cargo.toml index af827254..88d9ebde 100644 --- a/rmk/Cargo.toml +++ b/rmk/Cargo.toml @@ -40,7 +40,7 @@ num_enum = { version = "0.7", default-features = false } bitfield-struct = "0.9" byteorder = { version = "1", default-features = false } futures = { version = "0.3", default-features = false } -sequential-storage = { version = "3.0.0", features = ["defmt-03"] } +sequential-storage = { version = "3.0.1", git = "https://github.com/HaoboGu/sequential-storage", branch = "feat/map_iterator", features = ["defmt-03"] } serde = { version = "1", default-features = false, features = ["derive"] } postcard = { version = "1", features = ["experimental-derive", "use-defmt"] } diff --git a/rmk/src/storage/mod.rs b/rmk/src/storage/mod.rs index f2c2b9ef..8b1f2a0f 100644 --- a/rmk/src/storage/mod.rs +++ b/rmk/src/storage/mod.rs @@ -12,7 +12,7 @@ use embedded_storage::nor_flash::NorFlash; use embedded_storage_async::nor_flash::NorFlash as AsyncNorFlash; use sequential_storage::{ cache::NoCache, - map::{fetch_item, store_item, SerializationError, Value}, + map::{fetch_item, get_item_iter, store_item, SerializationError, Value}, Error as SSError, }; #[cfg(feature = "_nrf_ble")] @@ -562,44 +562,22 @@ impl Result<(), ()> { - for (layer, layer_data) in keymap.iter_mut().enumerate() { - for (row, row_data) in layer_data.iter_mut().enumerate() { - for (col, value) in row_data.iter_mut().enumerate() { - let key = get_keymap_key::(row, col, layer); - let item = match fetch_item::( - &mut self.flash, - self.storage_range.clone(), - &mut NoCache::new(), - &mut self.buffer, - &key, - ) - .await - { - Ok(Some(StorageData::KeymapKey(k))) => k.action, - Ok(None) => { - error!("Got none when reading keymap from storage at (layer,col,row)=({},{},{})", layer, col, row); - return Err(()); - } - Err(e) => { - print_storage_error::(e); - error!( - "Load keymap key from storage error: (layer,col,row)=({},{},{})", - layer, col, row - ); - return Err(()); - } - _ => { - error!( - "Load keymap key from storage error: (layer,col,row)=({},{},{})", - layer, col, row - ); - return Err(()); - } - }; - *value = item; + let mut key_iterator = get_item_iter(&mut self.flash, self.storage_range.clone()); + loop { + let key = if let Ok(Some((_key, item))) = key_iterator + .next::(&mut self.buffer) + .await + { + match item { + StorageData::KeymapKey(k) => k, + _ => continue, } - } + } else { + break; + }; + keymap[key.layer][key.row][key.col] = key.action; } + Ok(()) } From 114b068953670aeaed1bf8bc4278d8a14bf9cfc0 Mon Sep 17 00:00:00 2001 From: Haobo Gu Date: Wed, 11 Dec 2024 19:24:55 +0800 Subject: [PATCH 02/25] refactor: remove some logs Signed-off-by: Haobo Gu --- rmk/src/storage/mod.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/rmk/src/storage/mod.rs b/rmk/src/storage/mod.rs index 8b1f2a0f..210acca2 100644 --- a/rmk/src/storage/mod.rs +++ b/rmk/src/storage/mod.rs @@ -380,7 +380,6 @@ impl Date: Thu, 12 Dec 2024 15:14:43 +0800 Subject: [PATCH 03/25] refactor(storage): update s-s map iterator api Signed-off-by: Haobo Gu --- rmk/src/storage/mod.rs | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/rmk/src/storage/mod.rs b/rmk/src/storage/mod.rs index 210acca2..18b45e7a 100644 --- a/rmk/src/storage/mod.rs +++ b/rmk/src/storage/mod.rs @@ -12,7 +12,7 @@ use embedded_storage::nor_flash::NorFlash; use embedded_storage_async::nor_flash::NorFlash as AsyncNorFlash; use sequential_storage::{ cache::NoCache, - map::{fetch_item, get_item_iter, store_item, SerializationError, Value}, + map::{fetch_item, fetch_item_stream, store_item, SerializationError, Value}, Error as SSError, }; #[cfg(feature = "_nrf_ble")] @@ -561,21 +561,30 @@ impl Result<(), ()> { - let mut key_iterator = get_item_iter(&mut self.flash, self.storage_range.clone()); - loop { - let key = if let Ok(Some((_key, item))) = key_iterator + let mut storage_cache = NoCache::new(); + if let Ok(mut key_iterator) = fetch_item_stream( + &mut self.flash, + self.storage_range.clone(), + &mut storage_cache, + ) + .await + { + // Iterator the storage, read all keymap keys + while let Ok(Some((_key, item))) = key_iterator .next::(&mut self.buffer) .await { match item { - StorageData::KeymapKey(k) => k, + StorageData::KeymapKey(key) => { + assert!(key.layer < NUM_LAYER); + assert!(key.row < ROW); + assert!(key.col < COL); + keymap[key.layer][key.row][key.col] = key.action; + } _ => continue, } - } else { - break; - }; - keymap[key.layer][key.row][key.col] = key.action; - } + } + }; Ok(()) } From ecdebf19dfb2af4c463bfdae8c944a7c7f99d697 Mon Sep 17 00:00:00 2001 From: Haobo Gu Date: Thu, 19 Dec 2024 14:53:01 +0800 Subject: [PATCH 04/25] feat: update to latest s-s api Signed-off-by: Haobo Gu --- rmk/src/storage/mod.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rmk/src/storage/mod.rs b/rmk/src/storage/mod.rs index 18b45e7a..1e45975c 100644 --- a/rmk/src/storage/mod.rs +++ b/rmk/src/storage/mod.rs @@ -12,7 +12,7 @@ use embedded_storage::nor_flash::NorFlash; use embedded_storage_async::nor_flash::NorFlash as AsyncNorFlash; use sequential_storage::{ cache::NoCache, - map::{fetch_item, fetch_item_stream, store_item, SerializationError, Value}, + map::{fetch_all_items, fetch_item, store_item, SerializationError, Value}, Error as SSError, }; #[cfg(feature = "_nrf_ble")] @@ -562,10 +562,11 @@ impl Result<(), ()> { let mut storage_cache = NoCache::new(); - if let Ok(mut key_iterator) = fetch_item_stream( + if let Ok(mut key_iterator) = fetch_all_items::( &mut self.flash, self.storage_range.clone(), &mut storage_cache, + &mut self.buffer, ) .await { From 302c60325f873ec32bb2c9778d29b0abc931a970 Mon Sep 17 00:00:00 2001 From: Haobo Gu Date: Tue, 24 Dec 2024 10:20:46 +0800 Subject: [PATCH 05/25] chore: use s-s master branch Signed-off-by: Haobo Gu --- rmk/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rmk/Cargo.toml b/rmk/Cargo.toml index 6d276588..00b70340 100644 --- a/rmk/Cargo.toml +++ b/rmk/Cargo.toml @@ -40,7 +40,7 @@ num_enum = { version = "0.7", default-features = false } bitfield-struct = "0.9" byteorder = { version = "1", default-features = false } futures = { version = "0.3", default-features = false } -sequential-storage = { version = "3.0.1", git = "https://github.com/HaoboGu/sequential-storage", branch = "feat/map_iterator", features = ["defmt-03"] } +sequential-storage = { version = "3.0.1", git = "https://github.com/tweedegolf/sequential-storage", features = ["defmt-03"] } serde = { version = "1", default-features = false, features = ["derive"] } postcard = { version = "1", features = ["experimental-derive", "use-defmt"] } From f4f34a05ae374d6981dc2fa67f612c77ab852a54 Mon Sep 17 00:00:00 2001 From: H <19694277+gnullme@users.noreply.github.com> Date: Tue, 24 Dec 2024 16:46:27 +0100 Subject: [PATCH 06/25] fix(config) check if either board or chip is set --- rmk-macro/src/keyboard_config.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rmk-macro/src/keyboard_config.rs b/rmk-macro/src/keyboard_config.rs index 1861f7ae..407c9edc 100644 --- a/rmk-macro/src/keyboard_config.rs +++ b/rmk-macro/src/keyboard_config.rs @@ -186,7 +186,7 @@ impl KeyboardConfig { /// /// The chip model can be either configured to a board or a microcontroller chip. pub(crate) fn get_chip_model(config: &KeyboardTomlConfig) -> Result { - if config.keyboard.board.is_none() ^ config.keyboard.board.is_none() { + if config.keyboard.board.is_none() ^ config.keyboard.chip.is_none() { let message = format!( "Either \"board\" or \"chip\" should be set in keyboard.toml, but not both" ); From 884cef4e20c54ea42c67a24a6a005ca482cab01d Mon Sep 17 00:00:00 2001 From: Haobo Gu Date: Wed, 25 Dec 2024 11:03:12 +0800 Subject: [PATCH 07/25] fix(macro): fix the chip & board check in macro Signed-off-by: Haobo Gu --- rmk-macro/src/keyboard_config.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rmk-macro/src/keyboard_config.rs b/rmk-macro/src/keyboard_config.rs index 407c9edc..70c40309 100644 --- a/rmk-macro/src/keyboard_config.rs +++ b/rmk-macro/src/keyboard_config.rs @@ -186,7 +186,7 @@ impl KeyboardConfig { /// /// The chip model can be either configured to a board or a microcontroller chip. pub(crate) fn get_chip_model(config: &KeyboardTomlConfig) -> Result { - if config.keyboard.board.is_none() ^ config.keyboard.chip.is_none() { + if config.keyboard.board.is_none() == config.keyboard.chip.is_none() { let message = format!( "Either \"board\" or \"chip\" should be set in keyboard.toml, but not both" ); From 494b82f000af70c599d8b9334ac0dd43d7adb224 Mon Sep 17 00:00:00 2001 From: Haobo Gu Date: Wed, 25 Dec 2024 11:38:39 +0800 Subject: [PATCH 08/25] ci(esp): simplify esp ci script Signed-off-by: Haobo Gu --- .github/workflows/build esp.yml | 108 ++++---------------------------- 1 file changed, 12 insertions(+), 96 deletions(-) diff --git a/.github/workflows/build esp.yml b/.github/workflows/build esp.yml index 2c92e266..586e9fd7 100644 --- a/.github/workflows/build esp.yml +++ b/.github/workflows/build esp.yml @@ -21,8 +21,17 @@ env: CARGO_TERM_COLOR: always jobs: - build_esp32c3_ble: + build_esp_example: runs-on: ubuntu-22.04 + strategy: + matrix: + chip: + - esp32c3_ble + - esp32c6_ble + - esp32s3_ble + example_type: + - use_rust + - use_config steps: - uses: cargo-bins/cargo-binstall@main - uses: actions/checkout@v3 @@ -30,101 +39,8 @@ jobs: run: cargo binstall ldproxy espup -y - name: Install esp toolchain run: espup install - - name: Build esp32c3_ble - working-directory: ./examples/use_rust/esp32c3_ble - run: | - cargo +esp build --release - cargo clean - build_esp32c3_ble_with_config: - runs-on: ubuntu-22.04 - steps: - - uses: cargo-bins/cargo-binstall@main - - uses: actions/checkout@v3 - - name: Install ldproxy and espup - run: cargo binstall ldproxy espup -y - - name: Install esp toolchain - run: espup install - - name: Build esp32c3_ble with config - working-directory: ./examples/use_config/esp32c3_ble - run: | - cargo +esp build --release - cargo clean - build_esp32c6_ble: - runs-on: ubuntu-22.04 - steps: - - uses: cargo-bins/cargo-binstall@main - - uses: actions/checkout@v3 - - name: Install ldproxy and espup - run: cargo binstall ldproxy espup -y - - name: Install esp toolchain - run: espup install - - name: Build esp32c6_ble - working-directory: ./examples/use_rust/esp32c6_ble - run: | - cargo +esp build --release - cargo clean - build_esp32c6_ble_with_config: - runs-on: ubuntu-22.04 - steps: - - uses: cargo-bins/cargo-binstall@main - - uses: actions/checkout@v3 - - name: Install ldproxy and espup - run: cargo binstall ldproxy espup -y - - name: Install esp toolchain - run: espup install - - name: Build esp32c6_ble with config - working-directory: ./examples/use_config/esp32c6_ble - run: | - cargo +esp build --release - cargo clean - - build_esp32s3_ble: - runs-on: ubuntu-22.04 - steps: - - uses: cargo-bins/cargo-binstall@main - - uses: actions/checkout@v3 - - uses: actions/cache@v3 - id: cache-cargo - with: - path: | - ~/.cargo/bin/ - ~/.cargo/registry/index/ - ~/.cargo/registry/cache/ - ~/.cargo/git/db/ - ./examples/use_rust/esp32s3_ble/target/ - ./examples/use_rust/esp32s3_ble/.embuild/ - key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - - name: Install ldproxy and espup - run: cargo binstall ldproxy espup -y - - name: Install esp toolchain - run: espup install - - name: Build esp32s3_ble - working-directory: ./examples/use_rust/esp32s3_ble - run: | - cargo +esp build --release - cargo clean - build_esp32s3_ble_with_config: - runs-on: ubuntu-22.04 - steps: - - uses: cargo-bins/cargo-binstall@main - - uses: actions/checkout@v3 - - uses: actions/cache@v3 - id: cache-cargo - with: - path: | - ~/.cargo/bin/ - ~/.cargo/registry/index/ - ~/.cargo/registry/cache/ - ~/.cargo/git/db/ - ./examples/use_rust/esp32s3_ble/target/ - ./examples/use_rust/esp32s3_ble/.embuild/ - key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - - name: Install ldproxy and espup - run: cargo binstall ldproxy espup -y - - name: Install esp toolchain - run: espup install - - name: Build esp32s3_ble with config - working-directory: ./examples/use_config/esp32s3_ble + - name: Build + working-directory: ./examples/${{ matrix.example_type }}/${{ matrix.chip }}_ble run: | cargo +esp build --release cargo clean From 74e20cc96884fd8c16da857ca5d76ada14063c53 Mon Sep 17 00:00:00 2001 From: Haobo Gu Date: Wed, 25 Dec 2024 11:54:58 +0800 Subject: [PATCH 09/25] ci: fix ci errors in PRs Signed-off-by: Haobo Gu --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2e1ce5df..a96fb914 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -34,7 +34,7 @@ jobs: with: primary-runner: "self-hosted" fallback-runner: "ubuntu-latest" - github-token: ${{ vars.RMK_GITHUB_TOKEN }} + github-token: "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" build_rmk: needs: determine-runner From e16d14194f331fc40fb8f5e03d6920b01ad81c83 Mon Sep 17 00:00:00 2001 From: Haobo Gu Date: Wed, 25 Dec 2024 11:58:48 +0800 Subject: [PATCH 10/25] ci: fix esp32 ci script Signed-off-by: Haobo Gu --- .github/workflows/build esp.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build esp.yml b/.github/workflows/build esp.yml index 586e9fd7..bfc3f088 100644 --- a/.github/workflows/build esp.yml +++ b/.github/workflows/build esp.yml @@ -26,9 +26,9 @@ jobs: strategy: matrix: chip: - - esp32c3_ble - - esp32c6_ble - - esp32s3_ble + - esp32c3 + - esp32c6 + - esp32s3 example_type: - use_rust - use_config From 3da1b8044e9968b6a4b8fb9b3659e29a21ed7dad Mon Sep 17 00:00:00 2001 From: Haobo Gu Date: Wed, 25 Dec 2024 12:01:07 +0800 Subject: [PATCH 11/25] ci: fix ci error Signed-off-by: Haobo Gu --- .github/workflows/build esp.yml | 2 +- .github/workflows/build.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build esp.yml b/.github/workflows/build esp.yml index bfc3f088..553d48f7 100644 --- a/.github/workflows/build esp.yml +++ b/.github/workflows/build esp.yml @@ -21,7 +21,7 @@ env: CARGO_TERM_COLOR: always jobs: - build_esp_example: + build_esp: runs-on: ubuntu-22.04 strategy: matrix: diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a96fb914..51073c60 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -34,7 +34,7 @@ jobs: with: primary-runner: "self-hosted" fallback-runner: "ubuntu-latest" - github-token: "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" + github-token: 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 build_rmk: needs: determine-runner From be0d313b162fd9fe3d1326241b2045aaf7df4d49 Mon Sep 17 00:00:00 2001 From: Haobo Gu Date: Wed, 25 Dec 2024 14:33:27 +0800 Subject: [PATCH 12/25] ci: simplify ci script, use matrix Signed-off-by: Haobo Gu --- .github/workflows/build.yml | 282 +++--------------------------------- 1 file changed, 21 insertions(+), 261 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 51073c60..fb9e670b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,281 +19,41 @@ concurrency: env: CARGO_TERM_COLOR: always - # By default, RUSTFLAGS with “-D warnings” turns warnings into errors. - RUSTFLAGS: jobs: - determine-runner: + build_examples: runs-on: ubuntu-latest - outputs: - runner: ${{ steps.set-runner.outputs.use-runner }} - steps: - - name: Determine which runner to use - id: set-runner - uses: jimmygchen/runner-fallback-action@v1 - with: - primary-runner: "self-hosted" - fallback-runner: "ubuntu-latest" - github-token: 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 - - build_rmk: - needs: determine-runner - runs-on: ${{ fromJson(needs.determine-runner.outputs.runner) }} + strategy: + matrix: + example: + - nrf52832_ble + - nrf52840_ble + - nrf52840_ble_split + - rp2040 + - rp2040_split + - rp2040_direct_pin + - stm32f1 + - stm32f4 + - stm32h7 + example_type: + - use_rust + - use_config steps: - uses: actions/setup-python@v5 with: python-version: '3.11' - - uses: actions-rust-lang/setup-rust-toolchain@v1 - - name: Install cargo-make - run: cargo install cargo-make + - uses: cargo-bins/cargo-binstall@main - uses: actions/checkout@v3 - - name: Build rmk - working-directory: ./rmk - run: cargo build --release - build_rp2040: - needs: determine-runner - runs-on: ${{ fromJson(needs.determine-runner.outputs.runner) }} - steps: - - uses: actions/setup-python@v5 - with: - python-version: '3.11' - - uses: actions-rust-lang/setup-rust-toolchain@v1 - name: Install cargo-make - run: cargo install cargo-make - - uses: actions/checkout@v3 + run: cargo binstall cargo-make - name: Install target - run: rustup target add thumbv6m-none-eabi + run: rustup target add thumbv6m-none-eabi thumbv7em-none-eabihf thumbv7m-none-eabi - name: Build rp2040 - working-directory: ./examples/use_rust/rp2040 - run: cargo make uf2 --release - build_rp2040_with_config: - needs: determine-runner - runs-on: ${{ fromJson(needs.determine-runner.outputs.runner) }} - steps: - - uses: actions/setup-python@v5 - with: - python-version: '3.11' - - uses: actions-rust-lang/setup-rust-toolchain@v1 - - name: Install cargo-make - run: cargo install cargo-make - - uses: actions/checkout@v3 - - name: Install target - run: rustup target add thumbv6m-none-eabi - - name: Build rp2040 with config - working-directory: ./examples/use_config/rp2040 - run: cargo make uf2 --release - build_stm32h7: - needs: determine-runner - runs-on: ${{ fromJson(needs.determine-runner.outputs.runner) }} - steps: - - uses: actions/setup-python@v5 - with: - python-version: '3.11' - - uses: actions-rust-lang/setup-rust-toolchain@v1 - - name: Install cargo-make - run: cargo install cargo-make - - uses: actions/checkout@v3 - - name: Install target - run: rustup target add thumbv7em-none-eabihf - - name: Build stm32h7 - working-directory: ./examples/use_rust/stm32h7 - run: cargo make uf2 --release - build_stm32h7_with_config: - needs: determine-runner - runs-on: ${{ fromJson(needs.determine-runner.outputs.runner) }} - steps: - - uses: actions/setup-python@v5 - with: - python-version: '3.11' - - uses: actions-rust-lang/setup-rust-toolchain@v1 - - name: Install cargo-make - run: cargo install cargo-make - - uses: actions/checkout@v3 - - name: Install target - run: rustup target add thumbv7em-none-eabihf - - name: Build stm32h7 with config - working-directory: ./examples/use_config/stm32h7 - run: cargo make uf2 --release - build_stm32f1: - needs: determine-runner - runs-on: ${{ fromJson(needs.determine-runner.outputs.runner) }} - steps: - - uses: actions/setup-python@v5 - with: - python-version: '3.11' - - uses: actions-rust-lang/setup-rust-toolchain@v1 - - name: Install cargo-make - run: cargo install cargo-make - - uses: actions/checkout@v3 - - name: Install target - run: rustup target add thumbv7m-none-eabi - - name: Build stm32f1 - working-directory: ./examples/use_rust/stm32f1 - run: cargo make uf2 --release - build_stm32f1_with_config: - needs: determine-runner - runs-on: ${{ fromJson(needs.determine-runner.outputs.runner) }} - steps: - - uses: actions/setup-python@v5 - with: - python-version: '3.11' - - uses: actions-rust-lang/setup-rust-toolchain@v1 - - name: Install cargo-make - run: cargo install cargo-make - - uses: actions/checkout@v3 - - name: Install target - run: rustup target add thumbv7m-none-eabi - - name: Build stm32f1 with config - working-directory: ./examples/use_config/stm32f1 - run: cargo make uf2 --release - build_stm32f4: - needs: determine-runner - runs-on: ${{ fromJson(needs.determine-runner.outputs.runner) }} - steps: - - uses: actions/setup-python@v5 - with: - python-version: '3.11' - - uses: actions-rust-lang/setup-rust-toolchain@v1 - - name: Install cargo-make - run: cargo install cargo-make - - uses: actions/checkout@v3 - - name: Install target - run: rustup target add thumbv7em-none-eabihf - - name: Build stm32f4 - working-directory: ./examples/use_rust/stm32f4 - run: cargo make uf2 --release - build_stm32f4_with_config: - needs: determine-runner - runs-on: ${{ fromJson(needs.determine-runner.outputs.runner) }} - steps: - - uses: actions/setup-python@v5 - with: - python-version: '3.11' - - uses: actions-rust-lang/setup-rust-toolchain@v1 - - name: Install cargo-make - run: cargo install cargo-make - - uses: actions/checkout@v3 - - name: Install target - run: rustup target add thumbv7em-none-eabihf - - name: Build stm32f4 with config - working-directory: ./examples/use_config/stm32f4 - run: cargo make uf2 --release - build_nrf52840_ble: - needs: determine-runner - runs-on: ${{ fromJson(needs.determine-runner.outputs.runner) }} - steps: - - uses: actions/setup-python@v5 - with: - python-version: '3.11' - - uses: actions-rust-lang/setup-rust-toolchain@v1 - - name: Install cargo-make - run: cargo install cargo-make - - uses: actions/checkout@v3 - - name: Install target - run: rustup target add thumbv7em-none-eabihf - - name: Build nrf52840_ble - working-directory: ./examples/use_rust/nrf52840_ble - run: cargo make uf2 --release - build_nrf52832_ble: - needs: determine-runner - runs-on: ${{ fromJson(needs.determine-runner.outputs.runner) }} - steps: - - uses: actions/setup-python@v5 - with: - python-version: '3.11' - - uses: actions-rust-lang/setup-rust-toolchain@v1 - - name: Install cargo-make - run: cargo install cargo-make - - uses: actions/checkout@v3 - - name: Install target - run: rustup target add thumbv7em-none-eabihf - - name: Build nrf52832_ble - working-directory: ./examples/use_rust/nrf52832_ble - run: cargo make uf2 --release - build_nrf52832_ble_with_config: - needs: determine-runner - runs-on: ${{ fromJson(needs.determine-runner.outputs.runner) }} - steps: - - uses: actions/setup-python@v5 - with: - python-version: '3.11' - - uses: actions-rust-lang/setup-rust-toolchain@v1 - - name: Install cargo-make - run: cargo install cargo-make - - uses: actions/checkout@v3 - - name: Install target - run: rustup target add thumbv7em-none-eabihf - - name: Build nrf52832_ble with config - working-directory: ./examples/use_config/nrf52832_ble - run: cargo make uf2 --release - build_rp2040_split: - needs: determine-runner - runs-on: ${{ fromJson(needs.determine-runner.outputs.runner) }} - steps: - - uses: actions/setup-python@v5 - with: - python-version: '3.11' - - uses: actions-rust-lang/setup-rust-toolchain@v1 - - name: Install cargo-make - run: cargo install cargo-make - - uses: actions/checkout@v3 - - name: Install target - run: rustup target add thumbv6m-none-eabi - - name: Build rp2040 split - working-directory: ./examples/use_rust/rp2040_split - run: cargo make uf2 --release - build_rp2040_split_with_config: - needs: determine-runner - runs-on: ${{ fromJson(needs.determine-runner.outputs.runner) }} - steps: - - uses: actions/setup-python@v5 - with: - python-version: '3.11' - - uses: actions-rust-lang/setup-rust-toolchain@v1 - - name: Install cargo-make - run: cargo install cargo-make - - uses: actions/checkout@v3 - - name: Install target - run: rustup target add thumbv6m-none-eabi - - name: Build rp2040 split with config - working-directory: ./examples/use_config/rp2040_split - run: cargo make uf2 --release - build_nrf52840: - needs: determine-runner - runs-on: ${{ fromJson(needs.determine-runner.outputs.runner) }} - steps: - - uses: actions/setup-python@v5 - with: - python-version: '3.11' - - uses: actions-rust-lang/setup-rust-toolchain@v1 - - name: Install cargo-make - run: cargo install cargo-make - - uses: actions/checkout@v3 - - name: Install target - run: rustup target add thumbv7em-none-eabihf - - name: Build nrf52840 split - working-directory: ./examples/use_rust/nrf52840_ble_split - run: cargo make uf2 --release - build_nrf52840_split_with_config: - needs: determine-runner - runs-on: ${{ fromJson(needs.determine-runner.outputs.runner) }} - steps: - - uses: actions/setup-python@v5 - with: - python-version: '3.11' - - uses: actions-rust-lang/setup-rust-toolchain@v1 - - name: Install cargo-make - run: cargo install cargo-make - - uses: actions/checkout@v3 - - name: Install target - run: rustup target add thumbv7em-none-eabihf - - name: Build nrf52840 split with config - working-directory: ./examples/use_config/nrf52840_ble_split + working-directory: ./examples/${{ matrix.example_type }}/${{ matrix.example }} run: cargo make uf2 --release binary-size: # Copied from sequential-storage: https://github.com/tweedegolf/sequential-storage/blob/master/.github/workflows/ci.yaml - needs: determine-runner - runs-on: ${{ fromJson(needs.determine-runner.outputs.runner) }} + runs-on: ubuntu-latest permissions: actions: read pull-requests: write From 2f7b0c9e099077ed0c8489f787af92f4e75055a9 Mon Sep 17 00:00:00 2001 From: Haobo Gu Date: Wed, 25 Dec 2024 14:40:52 +0800 Subject: [PATCH 13/25] ci: add use workflow Signed-off-by: Haobo Gu --- .github/workflows/build.yml | 6 ++--- .github/workflows/user_build.yml | 42 ++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/user_build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fb9e670b..f061f160 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -41,7 +41,7 @@ jobs: steps: - uses: actions/setup-python@v5 with: - python-version: '3.11' + python-version: "3.11" - uses: cargo-bins/cargo-binstall@main - uses: actions/checkout@v3 - name: Install cargo-make @@ -78,7 +78,7 @@ jobs: - name: Check out the repo with the full git history uses: actions/checkout@v3 with: - fetch-depth: '0' + fetch-depth: "0" - name: Build new binary working-directory: ./examples/use_config/nrf52840_ble run: | @@ -114,4 +114,4 @@ jobs: owner: context.repo.owner, repo: context.repo.repo, body: `## PR build size\n \`\`\`\n${{ join(steps.new-size.outputs.*, '\n') }}\n\`\`\`\n ### Diff\n\`\`\`\n${{ steps.bloaty-comparison.outputs.bloaty-output-encoded }}\`\`\`\n` - }) + }) diff --git a/.github/workflows/user_build.yml b/.github/workflows/user_build.yml new file mode 100644 index 00000000..ac02cdc0 --- /dev/null +++ b/.github/workflows/user_build.yml @@ -0,0 +1,42 @@ +name: Build firmware according to user config file + +on: + workflow_call: + inputs: + keyboard_toml_path: + description: "Path to the keyboard.toml" + default: "keyboard.toml" + required: false + type: string + vial_json_path: + description: "Path to the vial.json" + default: "vial.json" + required: false + type: string + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: cargo-bins/cargo-binstall@main + - name: Install rmkit and cargo-make + run: cargo binstall cargo-make rmkit -y + - uses: actions/checkout@v3 + - name: Install libssl + run: wget http://nz2.archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_amd64.deb && sudo dpkg -i libssl1.1_1.1.1f-1ubuntu2_amd64.deb + - name: Create firmware project + working-directory: . + run: rmkit create --keyboard-toml-path ${{ inputs.keyboard_toml_path }} --vial-json-path ${{ inputs.vial_json_path }} --target-dir rmk + - name: Build firmware + working-directory: ./rmk + run: cargo make uf2 --release + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: firmware_uf2 + path: rmk/*.uf2 + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: firmware_hex + path: rmk/*.hex From d0ab5432b0f1c5eba47123e4861cc24b7c3cd34b Mon Sep 17 00:00:00 2001 From: Haobo Gu Date: Wed, 25 Dec 2024 14:44:27 +0800 Subject: [PATCH 14/25] ci: fix ci error Signed-off-by: Haobo Gu --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f061f160..d73694ae 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -70,7 +70,7 @@ jobs: ./example/target/ key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - name: Install flip-link - run: cargo install flip-link + run: cargo install flip-link --force - run: rustup target add thumbv7em-none-eabihf - run: rustup component add rust-src llvm-tools - if: steps.cache-cargo.outputs.cache-hit != 'true' From 31f9cc23a84bcb187c4e54732b8f2412bb779a7f Mon Sep 17 00:00:00 2001 From: Haobo Gu Date: Wed, 25 Dec 2024 16:12:27 +0800 Subject: [PATCH 15/25] ci: update user_build script, support esp32 Signed-off-by: Haobo Gu --- .github/workflows/user_build.yml | 65 ++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) diff --git a/.github/workflows/user_build.yml b/.github/workflows/user_build.yml index ac02cdc0..486f886e 100644 --- a/.github/workflows/user_build.yml +++ b/.github/workflows/user_build.yml @@ -15,8 +15,33 @@ on: type: string jobs: + get_chip_name: + runs-on: ubuntu-latest + outputs: + chip_name: ${{ steps.capture.outputs.chip_name }} + steps: + - uses: cargo-bins/cargo-binstall@main + - name: Install rmkit + run: cargo binstall rmkit -y + - name: Get chip name + id: capture + working-directory: ./rmk + run: | + # Run rmkit command to get the chip name + OUTPUT=$(rmkit get-chip --keyboard-toml-path ${{ inputs.keyboard_toml_path }}) + + # Print the output to confirm + echo "Command output: $OUTPUT" + + # Save the output as a GitHub Actions output variable + echo "chip=$OUTPUT" >> $GITHUB_ENV + + # Set chip_name output + echo "::set-output name=chip_name::$OUTPUT" build: runs-on: ubuntu-latest + needs: get_chip_name + if: needs.get_chip_name.outputs.chip_name != 'esp32c3' && needs.get_chip_name.outputs.chip_name != 'esp32s3' && needs.get_chip_name.outputs.chip_name != 'esp32c6' steps: - uses: cargo-bins/cargo-binstall@main - name: Install rmkit and cargo-make @@ -40,3 +65,43 @@ jobs: with: name: firmware_hex path: rmk/*.hex + build_esp: + runs-on: ubuntu-latest + needs: get_chip_name + if: needs.get_chip_name.outputs.chip_name == 'esp32c3' || needs.get_chip_name.outputs.chip_name == 'esp32s3' || needs.get_chip_name.outputs.chip_name == 'esp32c6' + steps: + - uses: cargo-bins/cargo-binstall@main + - name: Install rmkit and espflash + run: cargo binstall rmkit espflash -y + - uses: actions/checkout@v3 + - name: Install libssl + run: wget http://nz2.archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_amd64.deb && sudo dpkg -i libssl1.1_1.1.1f-1ubuntu2_amd64.deb + - name: Prepare esp environment + run: | + cargo binstall ldproxy espup -y + espup install + - name: Build firmware for esp32 + working-directory: ./rmk + run: cargo +esp build --release + - name: Get target arch + id: arch + run: | + if [ "${{ needs.get_chip_name.outputs.chip_name }}" == "esp32c3" ]; then + ARCH="riscv32imc-esp-espidf" + elif [ "${{ needs.get_chip_name.outputs.chip_name }}" == "esp32s3" ]; then + ARCH="riscv32imac-esp-espidf" + elif [ "${{ needs.get_chip_name.outputs.chip_name }}" == "esp32c6" ]; then + ARCH="xtensa-esp32s3-espidf" + else + ARCH="" + fi + echo "::set-output name=arch::$ARCH" + - name: convert firmware to bin + working-directory: ./rmk + run: espflash save-image --chip ${{ needs.get_chip_name.outputs.chip_name }} target/${{ steps.arch.outputs.arch }}/release/rmk-${{ needs.get_chip_name.outputs.chip_name }} ./rmk.bin + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: firmware_bin + path: rmk/*.bin + From c066d50e9f5fc7538e0ec04bbee1b05957a13a24 Mon Sep 17 00:00:00 2001 From: Haobo Gu Date: Wed, 25 Dec 2024 16:16:57 +0800 Subject: [PATCH 16/25] ci: fix ci error Signed-off-by: Haobo Gu --- .github/workflows/user_build.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/user_build.yml b/.github/workflows/user_build.yml index 486f886e..6c21598d 100644 --- a/.github/workflows/user_build.yml +++ b/.github/workflows/user_build.yml @@ -25,7 +25,6 @@ jobs: run: cargo binstall rmkit -y - name: Get chip name id: capture - working-directory: ./rmk run: | # Run rmkit command to get the chip name OUTPUT=$(rmkit get-chip --keyboard-toml-path ${{ inputs.keyboard_toml_path }}) From f16f157284520bd22b8c6e7747477e6da40b5e49 Mon Sep 17 00:00:00 2001 From: Haobo Gu Date: Wed, 25 Dec 2024 16:19:58 +0800 Subject: [PATCH 17/25] ci: fix ci error Signed-off-by: Haobo Gu --- .github/workflows/user_build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/user_build.yml b/.github/workflows/user_build.yml index 6c21598d..366f38ed 100644 --- a/.github/workflows/user_build.yml +++ b/.github/workflows/user_build.yml @@ -21,6 +21,7 @@ jobs: chip_name: ${{ steps.capture.outputs.chip_name }} steps: - uses: cargo-bins/cargo-binstall@main + - uses: actions/checkout@v3 - name: Install rmkit run: cargo binstall rmkit -y - name: Get chip name From 27f4085236f90c82c1deb4ae1c264d2e22fd63f6 Mon Sep 17 00:00:00 2001 From: Haobo Gu Date: Wed, 25 Dec 2024 16:28:56 +0800 Subject: [PATCH 18/25] ci: improve ci variable saving Signed-off-by: Haobo Gu --- .github/workflows/user_build.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/user_build.yml b/.github/workflows/user_build.yml index 366f38ed..3907c62d 100644 --- a/.github/workflows/user_build.yml +++ b/.github/workflows/user_build.yml @@ -34,10 +34,8 @@ jobs: echo "Command output: $OUTPUT" # Save the output as a GitHub Actions output variable - echo "chip=$OUTPUT" >> $GITHUB_ENV + echo "chip=$OUTPUT" >> $GITHUB_OUTPUT - # Set chip_name output - echo "::set-output name=chip_name::$OUTPUT" build: runs-on: ubuntu-latest needs: get_chip_name @@ -80,6 +78,9 @@ jobs: run: | cargo binstall ldproxy espup -y espup install + - name: Create firmware project + working-directory: . + run: rmkit create --keyboard-toml-path ${{ inputs.keyboard_toml_path }} --vial-json-path ${{ inputs.vial_json_path }} --target-dir rmk - name: Build firmware for esp32 working-directory: ./rmk run: cargo +esp build --release From bbc48d73cbb6723b8b91a0b59793286a0be15d1e Mon Sep 17 00:00:00 2001 From: Haobo Gu Date: Wed, 25 Dec 2024 16:34:25 +0800 Subject: [PATCH 19/25] ci: fix var name Signed-off-by: Haobo Gu --- .github/workflows/user_build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/user_build.yml b/.github/workflows/user_build.yml index 3907c62d..0884ee91 100644 --- a/.github/workflows/user_build.yml +++ b/.github/workflows/user_build.yml @@ -34,7 +34,7 @@ jobs: echo "Command output: $OUTPUT" # Save the output as a GitHub Actions output variable - echo "chip=$OUTPUT" >> $GITHUB_OUTPUT + echo "chip_name=$OUTPUT" >> $GITHUB_OUTPUT build: runs-on: ubuntu-latest From ff79ce5bb697eeb7c327d7af3fa17bd609986f3e Mon Sep 17 00:00:00 2001 From: Haobo Gu Date: Wed, 25 Dec 2024 16:42:44 +0800 Subject: [PATCH 20/25] ci: try to fix esp user build error Signed-off-by: Haobo Gu --- .github/workflows/user_build.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/user_build.yml b/.github/workflows/user_build.yml index 0884ee91..47ea449c 100644 --- a/.github/workflows/user_build.yml +++ b/.github/workflows/user_build.yml @@ -96,7 +96,11 @@ jobs: else ARCH="" fi - echo "::set-output name=arch::$ARCH" + # Save the arch as a GitHub Actions output variable + echo "arch=$ARCH" >> $GITHUB_OUTPUT + - name: echo project name + working-directory: ./rmk + run: ls target/${{ steps.arch.outputs.arch }}/release - name: convert firmware to bin working-directory: ./rmk run: espflash save-image --chip ${{ needs.get_chip_name.outputs.chip_name }} target/${{ steps.arch.outputs.arch }}/release/rmk-${{ needs.get_chip_name.outputs.chip_name }} ./rmk.bin From 58c2ff0d30dc1f70d8878c72cff52f7d94e8d41a Mon Sep 17 00:00:00 2001 From: Haobo Gu Date: Wed, 25 Dec 2024 16:51:08 +0800 Subject: [PATCH 21/25] ci: add project name parsing for esp user build Signed-off-by: Haobo Gu --- .github/workflows/user_build.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/user_build.yml b/.github/workflows/user_build.yml index 47ea449c..18cb75ae 100644 --- a/.github/workflows/user_build.yml +++ b/.github/workflows/user_build.yml @@ -98,12 +98,23 @@ jobs: fi # Save the arch as a GitHub Actions output variable echo "arch=$ARCH" >> $GITHUB_OUTPUT + - name: get project name + id: project_name + run: | + # Run rmkit command to get the chip name + OUTPUT=$(rmkit get-project-name --keyboard-toml-path ${{ inputs.keyboard_toml_path }}) + + # Print the output to confirm + echo "Command output: $OUTPUT" + + # Save the output as a GitHub Actions output variable + echo "project_name=$OUTPUT" >> $GITHUB_OUTPUT - name: echo project name working-directory: ./rmk run: ls target/${{ steps.arch.outputs.arch }}/release - name: convert firmware to bin working-directory: ./rmk - run: espflash save-image --chip ${{ needs.get_chip_name.outputs.chip_name }} target/${{ steps.arch.outputs.arch }}/release/rmk-${{ needs.get_chip_name.outputs.chip_name }} ./rmk.bin + run: espflash save-image --chip ${{ needs.get_chip_name.outputs.chip_name }} target/${{ steps.arch.outputs.arch }}/release/${{ steps.project_name.outputs.project_name }} ./rmk.bin - name: Upload artifacts uses: actions/upload-artifact@v4 with: From 43ded390b253f9eada3862e15d7f8807fab102a0 Mon Sep 17 00:00:00 2001 From: Haobo Gu Date: Wed, 25 Dec 2024 17:28:28 +0800 Subject: [PATCH 22/25] doc: add project-template url Signed-off-by: Haobo Gu --- docs/src/user_guide/2-1_cloud_compilation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/user_guide/2-1_cloud_compilation.md b/docs/src/user_guide/2-1_cloud_compilation.md index 4e0bd1ee..60cf94f7 100644 --- a/docs/src/user_guide/2-1_cloud_compilation.md +++ b/docs/src/user_guide/2-1_cloud_compilation.md @@ -4,7 +4,7 @@ RMK provides a [project-template](https://github.com/HaoboGu/rmk-project-templat ## Steps -1. To get started, click `Use this template` button and choose `Create a new repository`: +1. To get started, open [project-template](https://github.com/HaoboGu/rmk-project-template), click `Use this template` button and choose `Create a new repository`: ![use_template](../images/use_template.png) From 9ecc833b459ec158033cbf836068533534521791 Mon Sep 17 00:00:00 2001 From: Haobo Gu Date: Wed, 25 Dec 2024 18:05:52 +0800 Subject: [PATCH 23/25] ci: update uesr build script Signed-off-by: Haobo Gu --- .github/workflows/user_build.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/user_build.yml b/.github/workflows/user_build.yml index 18cb75ae..50536529 100644 --- a/.github/workflows/user_build.yml +++ b/.github/workflows/user_build.yml @@ -98,7 +98,7 @@ jobs: fi # Save the arch as a GitHub Actions output variable echo "arch=$ARCH" >> $GITHUB_OUTPUT - - name: get project name + - name: Get project name id: project_name run: | # Run rmkit command to get the chip name @@ -109,9 +109,6 @@ jobs: # Save the output as a GitHub Actions output variable echo "project_name=$OUTPUT" >> $GITHUB_OUTPUT - - name: echo project name - working-directory: ./rmk - run: ls target/${{ steps.arch.outputs.arch }}/release - name: convert firmware to bin working-directory: ./rmk run: espflash save-image --chip ${{ needs.get_chip_name.outputs.chip_name }} target/${{ steps.arch.outputs.arch }}/release/${{ steps.project_name.outputs.project_name }} ./rmk.bin From 34e03de707b81cffa7abca77dfa1f53a612f4446 Mon Sep 17 00:00:00 2001 From: Haobo Gu Date: Wed, 25 Dec 2024 18:19:59 +0800 Subject: [PATCH 24/25] refactor: add row2col to matrix config Signed-off-by: Haobo Gu --- rmk-macro/src/config/mod.rs | 9 ++++++++- rmk-macro/src/keyboard.rs | 6 ++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/rmk-macro/src/config/mod.rs b/rmk-macro/src/config/mod.rs index 4be0dc62..f6cb6d17 100644 --- a/rmk-macro/src/config/mod.rs +++ b/rmk-macro/src/config/mod.rs @@ -56,6 +56,7 @@ pub enum MatrixType { direct_pin, } +#[allow(unused)] #[derive(Clone, Debug, Default, Deserialize)] pub struct MatrixConfig { #[serde(default)] @@ -65,6 +66,8 @@ pub struct MatrixConfig { pub direct_pins: Option>>, #[serde(default = "default_true")] pub direct_pin_low_active: bool, + #[serde(default = "default_false")] + pub row2col: bool, } /// Config for storage @@ -200,7 +203,11 @@ pub struct SerialConfig { #[derive(Clone, Debug, Deserialize)] pub struct DurationMillis(#[serde(deserialize_with = "parse_duration_millis")] pub u64); -fn default_true() -> bool { +const fn default_true() -> bool { + true +} + +const fn default_false() -> bool { true } diff --git a/rmk-macro/src/keyboard.rs b/rmk-macro/src/keyboard.rs index 8e79918a..7f431376 100644 --- a/rmk-macro/src/keyboard.rs +++ b/rmk-macro/src/keyboard.rs @@ -40,6 +40,12 @@ pub(crate) fn parse_keyboard_mod(item_mod: ItemMod) -> TokenStream2 { Err(e) => return e, }; + if let Some(m) = toml_config.clone().matrix { + if m.row2col { + eprintln!("row2col is enabled, please ensure that you have updated your Cargo.toml, disabled default features(col2row is enabled as default feature)"); + } + } + let keyboard_config = match KeyboardConfig::new(toml_config) { Ok(c) => c, Err(e) => return e, From 44ba0df010f6b26a7e7205220153629e51f23c95 Mon Sep 17 00:00:00 2001 From: Haobo Gu Date: Wed, 25 Dec 2024 18:46:07 +0800 Subject: [PATCH 25/25] fix: fix typo Signed-off-by: Haobo Gu --- rmk-macro/src/config/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rmk-macro/src/config/mod.rs b/rmk-macro/src/config/mod.rs index f6cb6d17..6e7a6a8d 100644 --- a/rmk-macro/src/config/mod.rs +++ b/rmk-macro/src/config/mod.rs @@ -208,7 +208,7 @@ const fn default_true() -> bool { } const fn default_false() -> bool { - true + false } fn parse_duration_millis<'de, D: de::Deserializer<'de>>(deserializer: D) -> Result {