Skip to content

New Protocol - V2#848

Open
HaoboGu wants to merge 69 commits into
mainfrom
feat/rynk_protocol
Open

New Protocol - V2#848
HaoboGu wants to merge 69 commits into
mainfrom
feat/rynk_protocol

Conversation

@HaoboGu

@HaoboGu HaoboGu commented May 13, 2026

Copy link
Copy Markdown
Owner

@github-actions

github-actions Bot commented May 13, 2026

Copy link
Copy Markdown

Size Report

Example main PR Diff .text .data .bss
use_config/nrf52832_ble 394.4 KiB 394.5 KiB +0.01% ⬆️ +264 0 -208
use_config/nrf52840_ble 443.5 KiB 443.9 KiB +0.10% ⬆️ +424 -8 +40
use_config/nrf52840_ble_split (central) 493.2 KiB 494.9 KiB +0.34% ⬆️ +1492 0 +256
use_config/nrf52840_ble_split (peripheral) 317.3 KiB 317.2 KiB -0.04% ⬇️ -140 0 +8
use_config/pi_pico_w_ble 667.9 KiB 669.0 KiB +0.15% ⬆️ +804 0 +240
use_config/rp2040 149.3 KiB 146.8 KiB -1.66% ⬇️ -2288 0 -256
use_config/rp2040_split (central) 162.8 KiB 160.4 KiB -1.46% ⬇️ -2280 0 -168
use_config/rp2040_split (peripheral) 27.8 KiB 27.8 KiB +0.15% ⬆️ +36 0 +8
use_config/stm32f1 63.1 KiB 63.5 KiB +0.50% ⬆️ +116 0 +208
use_config/stm32h7 100.2 KiB 100.7 KiB +0.53% ⬆️ +728 0 -184
use_rust/nrf52832_ble 382.4 KiB 381.8 KiB -0.15% ⬇️ -188 0 -400
use_rust/nrf52840_ble 439.8 KiB 439.3 KiB -0.10% ⬇️ -508 0 +32
use_rust/nrf52840_ble_split (central) 503.3 KiB 503.2 KiB -0.02% ⬇️ -160 0 +56
use_rust/nrf52840_ble_split (peripheral) 313.7 KiB 313.7 KiB +0.00% ⬇️ -36 0 +8
use_rust/pi_pico_w_ble 668.2 KiB 668.5 KiB +0.05% ⬆️ +328 0 +48
use_rust/rp2040 148.7 KiB 146.1 KiB -1.79% ⬇️ -2288 0 -448
use_rust/rp2040_split (central) 161.5 KiB 158.8 KiB -1.65% ⬇️ -2368 0 -368
use_rust/rp2040_split (peripheral) 28.2 KiB 28.2 KiB +0.15% ⬆️ +36 0 +8
use_rust/stm32f1 62.7 KiB 62.7 KiB +0.07% ⬆️ +32 0 +16
use_rust/stm32h7 122.4 KiB 120.2 KiB -1.82% ⬇️ -1836 0 -448
use_config/nrf52832_ble — 394.4 KiB → 394.5 KiB (+0.01% ⬆️)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
 364712	   4588	  34632	 403932	  629dc	rmk-nrf52832

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
 364448	   4588	  34840	 403876	  629a4	rmk-nrf52832

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.4% +1.29Ki  [ = ]       0    .strtab
  +0.1%    +256  [ = ]       0    .debug_ranges
  +0.1%    +212  +0.1%    +212    .text
  +0.1%     +64  [ = ]       0    .symtab
  +0.1%     +52  +0.1%     +52    .rodata
  +0.1%     +48  [ = ]       0    .debug_aranges
  +0.1%     +44  [ = ]       0    .debug_frame
  -1.5%      -1  [ = ]       0    [Unmapped]
  -0.2%     -18  [ = ]       0    .debug_abbrev
  [ = ]       0  -0.6%    -208    .bss
  -0.2%    -578  [ = ]       0    .debug_line
  -0.2% -1.59Ki  [ = ]       0    .debug_loc
  -0.5% -9.95Ki  [ = ]       0    .debug_info
  -0.6% -21.5Ki  [ = ]       0    .debug_str
  -0.4% -31.7Ki  +0.0%     +56    TOTAL
use_config/nrf52840_ble — 443.5 KiB → 443.9 KiB (+0.10% ⬆️)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
 398464	   4588	  51536	 454588	  6efbc	rmk-nrf52840

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
 398040	   4596	  51496	 454132	  6edf4	rmk-nrf52840

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.8% +1.76Ki  [ = ]       0    .debug_ranges
  +0.2% +1.20Ki  [ = ]       0    .debug_loc
  +0.3%    +368  [ = ]       0    .symtab
  +0.1%    +332  +0.1%    +332    .text
  +0.3%    +128  [ = ]       0    .debug_aranges
  +0.2%     +92  +0.2%     +92    .rodata
  +0.1%     +52  [ = ]       0    .debug_frame
  [ = ]       0  +0.1%     +40    .bss
  -2.8%      -2  [ = ]       0    [Unmapped]
  -0.2%      -8  -0.2%      -8    .data
  -0.2%     -21  [ = ]       0    .debug_abbrev
  -0.1%    -234  [ = ]       0    .strtab
  -0.4% -1.37Ki  [ = ]       0    .debug_line
  -0.4% -9.45Ki  [ = ]       0    .debug_info
  -0.6% -26.3Ki  [ = ]       0    .debug_str
  -0.4% -33.5Ki  +0.1%    +456    TOTAL
use_config/nrf52840_ble_split (central) — 493.2 KiB → 494.9 KiB (+0.34% ⬆️)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
 454960	   4652	  47152	 506764	  7bb8c	central

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
 453468	   4652	  46896	 505016	  7b4b8	central

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +1.8% +14.3Ki  [ = ]       0    .debug_loc
  +3.6% +1.70Ki  [ = ]       0    .debug_aranges
  +0.3% +1.35Ki  +0.3% +1.35Ki    .text
  +0.7% +1.03Ki  [ = ]       0    .symtab
  +0.2%    +729  [ = ]       0    .strtab
  +0.8%    +436  [ = ]       0    .debug_frame
  +0.1%    +376  [ = ]       0    .debug_ranges
  [ = ]       0  +0.6%    +256    .bss
  +0.3%    +112  +0.3%    +112    .rodata
  +0.5%     +39  [ = ]       0    .debug_abbrev
   +25%     +10  [ = ]       0    [Unmapped]
  +0.9%      +8  [ = ]       0    .defmt
  -0.0%    -168  [ = ]       0    .debug_line
  -0.0% -1.76Ki  [ = ]       0    .debug_str
  -0.3% -6.58Ki  [ = ]       0    .debug_info
  +0.1% +11.5Ki  +0.3% +1.71Ki    TOTAL
use_config/nrf52840_ble_split (peripheral) — 317.3 KiB → 317.2 KiB (-0.04% ⬇️)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
 293152	   4468	  27160	 324780	  4f4ac	peripheral

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
 293292	   4468	  27152	 324912	  4f530	peripheral

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.8% +26.9Ki  [ = ]       0    .debug_str
  +0.2% +3.35Ki  [ = ]       0    .debug_info
  +3.7% +1.50Ki  [ = ]       0    .debug_aranges
  +0.1%    +177  [ = ]       0    .strtab
  +0.2%    +160  [ = ]       0    .symtab
  +0.3%     +92  [ = ]       0    .debug_frame
  +0.0%     +16  +0.0%     +16    .rodata
   +22%     +11  [ = ]       0    [Unmapped]
  [ = ]       0  +0.0%      +8    .bss
  -0.0%     -80  [ = ]       0    .debug_line
  -0.1%    -156  -0.1%    -156    .text
  -0.3%    -560  [ = ]       0    .debug_ranges
  -0.4% -2.06Ki  [ = ]       0    .debug_loc
  +0.5% +29.4Ki  -0.0%    -132    TOTAL
use_config/pi_pico_w_ble — 667.9 KiB → 669.0 KiB (+0.15% ⬆️)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
 630076	      0	  54940	 685016	  a73d8	rmk-pi-pico-w

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
 629272	      0	  54700	 683972	  a6fc4	rmk-pi-pico-w

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.2% +7.23Ki  [ = ]       0    .debug_str
  +0.3% +3.53Ki  [ = ]       0    .debug_loc
  +3.9% +1.59Ki  [ = ]       0    .debug_aranges
  +0.1% +1.25Ki  [ = ]       0    .debug_info
  +0.2%    +772  [ = ]       0    .strtab
  +0.2%    +748  +0.2%    +748    .text
  +0.1%    +368  [ = ]       0    .debug_ranges
  +0.1%    +289  [ = ]       0    .debug_line
  [ = ]       0  +0.4%    +240    .bss
  +0.2%    +128  [ = ]       0    .symtab
  +0.0%     +56  +0.0%     +56    .rodata
  +0.9%      +8  [ = ]       0    .defmt
  -8.6%      -5  [ = ]       0    [Unmapped]
  -0.1%      -8  [ = ]       0    .debug_abbrev
  -0.1%     -36  [ = ]       0    .debug_frame
  +0.2% +15.9Ki  +0.2% +1.02Ki    TOTAL
use_config/rp2040 — 149.3 KiB → 146.8 KiB (-1.66% ⬇️)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
 135016	      0	  15356	 150372	  24b64	rmk-rp2040

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
 137304	      0	  15612	 152916	  25554	rmk-rp2040

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +3.3%    +536  [ = ]       0    .debug_aranges
 -27.8%     -15  [ = ]       0    [Unmapped]
  -1.5%    -115  [ = ]       0    .debug_abbrev
  -0.9%    -164  -0.9%    -164    .rodata
  [ = ]       0  -1.8%    -256    .bss
  -1.8%    -320  [ = ]       0    .debug_frame
  -1.0%    -320  [ = ]       0    .symtab
  -0.9% -1.09Ki  [ = ]       0    .strtab
  -2.0% -1.62Ki  [ = ]       0    .debug_ranges
  -1.8% -2.07Ki  -1.8% -2.07Ki    .text
  -1.9% -3.08Ki  [ = ]       0    .debug_line
  -1.0% -3.13Ki  [ = ]       0    .debug_loc
  -2.1% -20.9Ki  [ = ]       0    .debug_info
  -3.1% -51.9Ki  [ = ]       0    .debug_str
  -2.4% -84.2Ki  -1.7% -2.48Ki    TOTAL
use_config/rp2040_split (central) — 162.8 KiB → 160.4 KiB (-1.46% ⬇️)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
 148004	      0	  16292	 164296	  281c8	central

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
 150284	      0	  16460	 166744	  28b58	central

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +3.5%    +592  [ = ]       0    .debug_aranges
  +1.8%      +8  [ = ]       0    .defmt
  +2.3%      +4  +2.9%      +4    .data
   +10%      +4  [ = ]       0    [Unmapped]
  -0.3%     -20  [ = ]       0    .debug_abbrev
  -0.8%    -164  -0.8%    -164    .rodata
  [ = ]       0  -1.1%    -168    .bss
  -1.4%    -268  [ = ]       0    .debug_frame
  -1.1%    -384  [ = ]       0    .symtab
  -0.3%    -440  [ = ]       0    .strtab
  -2.0% -1.77Ki  [ = ]       0    .debug_ranges
  -1.6% -2.07Ki  -1.6% -2.07Ki    .text
  -1.3% -2.31Ki  [ = ]       0    .debug_line
  -3.0% -10.6Ki  [ = ]       0    .debug_loc
  -1.4% -15.7Ki  [ = ]       0    .debug_info
  -1.7% -34.2Ki  [ = ]       0    .debug_str
  -1.7% -67.4Ki  -1.5% -2.39Ki    TOTAL
use_config/rp2040_split (peripheral) — 27.8 KiB → 27.8 KiB (+0.15% ⬆️)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
  25648	     60	   2804	  28512	   6f60	peripheral

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
  25612	     60	   2796	  28468	   6f34	peripheral

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +1.6% +13.2Ki  [ = ]       0    .debug_str
  +0.8% +3.20Ki  [ = ]       0    .debug_info
  +1.1%    +791  [ = ]       0    .debug_loc
  +5.0%    +672  [ = ]       0    .debug_aranges
  +0.3%    +187  [ = ]       0    .debug_line
  +0.8%    +144  [ = ]       0    .debug_ranges
  +0.2%     +36  +0.2%     +36    .text
  [ = ]       0  +0.5%      +8    .bss
 -14.6%      -6  [ = ]       0    [Unmapped]
  -0.2%     -44  [ = ]       0    .strtab
  +1.3% +18.2Ki  +0.2%     +44    TOTAL
use_config/stm32f1 — 63.1 KiB → 63.5 KiB (+0.50% ⬆️)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
  57164	     28	   7796	  64988	   fddc	rmk-stm32f1

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
  57048	     28	   7588	  64664	   fc98	rmk-stm32f1

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.3% +3.00Ki  [ = ]       0    .debug_str
  +0.2% +1.14Ki  [ = ]       0    .debug_info
  +0.5%    +638  [ = ]       0    .debug_loc
  +0.5%    +216  [ = ]       0    .debug_ranges
  [ = ]       0  +2.7%    +208    .bss
  +0.2%    +116  +0.2%    +116    .text
  +0.1%    +111  [ = ]       0    .debug_line
  +0.3%     +64  [ = ]       0    .symtab
  +0.2%     +32  [ = ]       0    .debug_frame
  +0.4%     +24  [ = ]       0    .debug_aranges
  +0.0%     +12  [ = ]       0    .strtab
 -39.7%     -25  [ = ]       0    [Unmapped]
  +0.3% +5.29Ki  +0.5%    +324    TOTAL
use_config/stm32h7 — 100.2 KiB → 100.7 KiB (+0.53% ⬆️)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
  93236	    264	   9632	 103132	  192dc	rmk-stm32h7

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
  92508	    264	   9816	 102588	  190bc	rmk-stm32h7

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +3.6% +6.11Ki  [ = ]       0    .debug_loc
  +5.2% +3.41Ki  [ = ]       0    .debug_ranges
  +3.7% +1.20Ki  [ = ]       0    .debug_aranges
  +4.1%    +512  +4.1%    +512    .rodata
  +0.3%    +216  +0.3%    +216    .text
   +21%      +9  [ = ]       0    [Unmapped]
  -5.8%      -9  [ = ]       0    .defmt
  -0.6%     -92  [ = ]       0    .debug_frame
  -1.7%    -113  [ = ]       0    .debug_abbrev
  [ = ]       0  -1.9%    -184    .bss
  -1.3%    -368  [ = ]       0    .symtab
  -0.3%    -385  [ = ]       0    .debug_line
  -4.2% -2.78Ki  [ = ]       0    .strtab
  -0.3% -2.79Ki  [ = ]       0    .debug_info
  -0.6% -11.8Ki  [ = ]       0    .debug_str
  -0.2% -6.91Ki  +0.5%    +544    TOTAL
use_rust/nrf52832_ble — 382.4 KiB → 381.8 KiB (-0.15% ⬇️)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
 352932	   4588	  33424	 390944	  5f720	rmk-nrf52832

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
 353120	   4588	  33824	 391532	  5f96c	rmk-nrf52832

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.7% +1.78Ki  [ = ]       0    .strtab
  +0.2% +1.14Ki  [ = ]       0    .debug_loc
  +0.0%     +12  +0.0%     +12    .rodata
  +1.7%      +8  [ = ]       0    .defmt
  -7.4%      -5  [ = ]       0    [Unmapped]
  -0.4%     -34  [ = ]       0    .debug_abbrev
  -0.2%     -80  [ = ]       0    .debug_aranges
  -0.2%    -192  [ = ]       0    .symtab
  -0.1%    -200  -0.1%    -200    .text
  -0.5%    -204  [ = ]       0    .debug_frame
  [ = ]       0  -1.2%    -400    .bss
  -0.3%    -576  [ = ]       0    .debug_ranges
  -0.3%    -773  [ = ]       0    .debug_line
  -0.4% -6.85Ki  [ = ]       0    .debug_info
  -0.6% -21.1Ki  [ = ]       0    .debug_str
  -0.4% -27.0Ki  -0.2%    -588    TOTAL
use_rust/nrf52840_ble — 439.8 KiB → 439.3 KiB (-0.10% ⬇️)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
 398272	   4588	  47008	 449868	  6dd4c	rmk-nrf52840

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
 398780	   4588	  46976	 450344	  6df28	rmk-nrf52840

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.5% +1.57Ki  [ = ]       0    .strtab
  +0.4%    +544  [ = ]       0    .symtab
  +0.3%    +164  [ = ]       0    .debug_frame
  +0.3%    +128  [ = ]       0    .debug_aranges
  +0.2%     +80  +0.2%     +80    .rodata
  [ = ]       0  +0.1%     +32    .bss
  -0.2%     -18  [ = ]       0    .debug_abbrev
  -0.0%     -19  [ = ]       0    .debug_line
  -0.2%    -588  -0.2%    -588    .text
  -0.3%    -824  [ = ]       0    .debug_ranges
  -0.1%   -1003  [ = ]       0    .debug_loc
  -0.3% -7.21Ki  [ = ]       0    .debug_info
  -0.5% -21.1Ki  [ = ]       0    .debug_str
  -0.3% -28.2Ki  -0.1%    -476    TOTAL
use_rust/nrf52840_ble_split (central) — 503.3 KiB → 503.2 KiB (-0.02% ⬇️)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
 457904	   4652	  52696	 515252	  7dcb4	central

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
 458064	   4652	  52640	 515356	  7dd1c	central

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.2%    +771  [ = ]       0    .strtab
  +0.4%    +640  [ = ]       0    .symtab
  +0.3%    +184  [ = ]       0    .debug_frame
  +0.3%    +128  [ = ]       0    .debug_aranges
  +0.2%     +96  +0.2%     +96    .rodata
  [ = ]       0  +0.1%     +56    .bss
  -5.3%      -3  [ = ]       0    [Unmapped]
  -0.1%    -256  -0.1%    -256    .text
  -0.2%    -640  [ = ]       0    .debug_line
  -0.3%    -704  [ = ]       0    .debug_ranges
  -0.1% -1.17Ki  [ = ]       0    .debug_loc
  -0.3% -8.26Ki  [ = ]       0    .debug_info
  -0.6% -28.8Ki  [ = ]       0    .debug_str
  -0.4% -38.0Ki  -0.0%    -104    TOTAL
use_rust/nrf52840_ble_split (peripheral) — 313.7 KiB → 313.7 KiB (+0.00% ⬇️)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
 291320	   4468	  25408	 321196	  4e6ac	peripheral

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
 291356	   4468	  25400	 321224	  4e6c8	peripheral

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.1%    +192  [ = ]       0    .debug_ranges
  +0.1%     +24  [ = ]       0    .debug_aranges
  +0.0%     +10  [ = ]       0    .debug_line
  [ = ]       0  +0.0%      +8    .bss
  +7.9%      +5  [ = ]       0    [Unmapped]
  -0.0%     -16  [ = ]       0    .debug_frame
  -0.0%     -32  [ = ]       0    .symtab
  -0.0%     -36  -0.0%     -36    .text
  -0.1%    -147  [ = ]       0    .strtab
  -0.3% -1.70Ki  [ = ]       0    .debug_loc
  -0.1% -2.34Ki  [ = ]       0    .debug_info
  -0.2% -6.95Ki  [ = ]       0    .debug_str
  -0.2% -11.0Ki  -0.0%     -28    TOTAL
use_rust/pi_pico_w_ble — 668.2 KiB → 668.5 KiB (+0.05% ⬆️)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
 629692	      0	  54892	 684584	  a7228	rmk-pi-pico-w

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
 629364	      0	  54844	 684208	  a70b0	rmk-pi-pico-w

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.1% +1.24Ki  [ = ]       0    .debug_loc
  +0.3%    +955  [ = ]       0    .strtab
  +0.1%    +276  +0.1%    +276    .text
  +0.0%    +194  [ = ]       0    .debug_line
  +0.0%     +64  [ = ]       0    .debug_ranges
  +0.0%     +52  +0.0%     +52    .rodata
  [ = ]       0  +0.1%     +48    .bss
  +0.1%      +8  [ = ]       0    .debug_abbrev
  +0.9%      +8  [ = ]       0    .defmt
  -0.0%      -8  [ = ]       0    .debug_aranges
 -16.7%     -10  [ = ]       0    [Unmapped]
  -0.1%     -48  [ = ]       0    .symtab
  -0.2%     -88  [ = ]       0    .debug_frame
  -0.3% -6.90Ki  [ = ]       0    .debug_info
  -0.6% -23.6Ki  [ = ]       0    .debug_str
  -0.3% -27.9Ki  +0.1%    +376    TOTAL
use_rust/rp2040 — 148.7 KiB → 146.1 KiB (-1.79% ⬇️)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
 134532	      0	  15036	 149568	  24840	rmk-rp2040

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
 136820	      0	  15484	 152304	  252f0	rmk-rp2040

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.3%    +240  [ = ]       0    .debug_ranges
 -27.4%     -17  [ = ]       0    [Unmapped]
  -0.6%     -96  [ = ]       0    .debug_aranges
  -1.5%    -115  [ = ]       0    .debug_abbrev
  -0.9%    -164  -1.0%    -164    .rodata
  -0.9%    -288  [ = ]       0    .symtab
  -1.8%    -320  [ = ]       0    .debug_frame
  [ = ]       0  -3.1%    -448    .bss
  -0.9% -1.08Ki  [ = ]       0    .strtab
  -1.8% -2.07Ki  -1.8% -2.07Ki    .text
  -1.8% -3.03Ki  [ = ]       0    .debug_line
  -1.1% -3.32Ki  [ = ]       0    .debug_loc
  -2.5% -24.5Ki  [ = ]       0    .debug_info
  -3.6% -59.7Ki  [ = ]       0    .debug_str
  -2.7% -94.4Ki  -1.8% -2.67Ki    TOTAL
use_rust/rp2040_split (central) — 161.5 KiB → 158.8 KiB (-1.65% ⬇️)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
 146764	      0	  15876	 162640	  27b50	central

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
 149132	      0	  16244	 165376	  28600	central

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +3.5%    +592  [ = ]       0    .debug_aranges
  +1.8%      +8  [ = ]       0    .defmt
  +2.3%      +4  +2.9%      +4    .data
  +5.7%      +2  [ = ]       0    [Unmapped]
  -0.3%     -20  [ = ]       0    .debug_abbrev
  -0.9%    -168  -0.9%    -168    .rodata
  -0.5%    -192  [ = ]       0    .symtab
  -1.4%    -268  [ = ]       0    .debug_frame
  -0.3%    -358  [ = ]       0    .strtab
  [ = ]       0  -2.4%    -368    .bss
  -1.9% -1.68Ki  [ = ]       0    .debug_ranges
  -1.7% -2.15Ki  -1.7% -2.15Ki    .text
  -1.4% -2.59Ki  [ = ]       0    .debug_line
  -2.5% -8.58Ki  [ = ]       0    .debug_loc
  -1.4% -15.6Ki  [ = ]       0    .debug_info
  -1.5% -29.3Ki  [ = ]       0    .debug_str
  -1.5% -60.3Ki  -1.7% -2.67Ki    TOTAL
use_rust/rp2040_split (peripheral) — 28.2 KiB → 28.2 KiB (+0.15% ⬆️)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
  25748	     60	   3068	  28876	   70cc	peripheral

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
  25712	     60	   3060	  28832	   70a0	peripheral

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +1.6% +13.2Ki  [ = ]       0    .debug_str
  +0.8% +3.20Ki  [ = ]       0    .debug_info
  +1.4%    +940  [ = ]       0    .debug_loc
  +5.0%    +672  [ = ]       0    .debug_aranges
  +0.3%    +199  [ = ]       0    .debug_line
  +0.9%    +152  [ = ]       0    .debug_ranges
  +0.2%     +36  +0.2%     +36    .text
   +59%     +23  [ = ]       0    [Unmapped]
  [ = ]       0  +0.4%      +8    .bss
  -0.2%     -45  [ = ]       0    .strtab
  +1.3% +18.4Ki  +0.2%     +44    TOTAL
use_rust/stm32f1 — 62.7 KiB → 62.7 KiB (+0.07% ⬆️)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
  56612	     28	   7572	  64212	   fad4	rmk-stm32f1

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
  56580	     28	   7556	  64164	   faa4	rmk-stm32f1

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.3% +2.50Ki  [ = ]       0    .debug_str
  +0.2% +1.33Ki  [ = ]       0    .debug_info
  +0.2%    +248  [ = ]       0    .debug_loc
  +0.3%    +112  [ = ]       0    .debug_ranges
  +0.1%     +99  [ = ]       0    .debug_line
  +0.1%     +32  +0.1%     +32    .text
  [ = ]       0  +0.2%     +16    .bss
  +0.1%     +16  [ = ]       0    .debug_frame
  +0.2%      +8  [ = ]       0    .debug_aranges
  -2.0%      -1  [ = ]       0    [Unmapped]
  -0.1%     -28  [ = ]       0    .strtab
  +0.2% +4.30Ki  +0.1%     +48    TOTAL
use_rust/stm32h7 — 122.4 KiB → 120.2 KiB (-1.82% ⬇️)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
 107440	    320	  15316	 123076	  1e0c4	rmk-stm32h7

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
 109276	    320	  15764	 125360	  1e9b0	rmk-stm32h7

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.5% +12.8Ki  [ = ]       0    .debug_str
  +8.9% +3.32Ki  [ = ]       0    .debug_aranges
   +19%     +10  [ = ]       0    [Unmapped]
  -1.3%     -89  [ = ]       0    .debug_abbrev
  -1.1%    -228  [ = ]       0    .debug_frame
  [ = ]       0  -3.0%    -448    .bss
  -1.2%    -464  [ = ]       0    .symtab
  -0.9% -1.33Ki  [ = ]       0    .debug_line
  -1.6% -1.59Ki  [ = ]       0    .strtab
  -1.8% -1.79Ki  -1.8% -1.79Ki    .text
  -3.0% -2.42Ki  [ = ]       0    .debug_ranges
  -0.3% -3.97Ki  [ = ]       0    .debug_info
  -2.9% -6.88Ki  [ = ]       0    .debug_loc
  -0.1% -2.66Ki  -1.8% -2.23Ki    TOTAL

Comment thread rmk-types/src/protocol/rynk/message.rs Outdated
Comment thread rmk/src/host/rynk/handlers/combo.rs Outdated
Comment thread rmk/src/host/rynk/handlers/system.rs Outdated
Comment thread rmk/src/host/rynk/handlers/system.rs Outdated
Comment thread rmk/src/host/rynk/mod.rs Outdated
@pcasotti pcasotti marked this pull request as ready for review May 26, 2026 12:43
@pcasotti pcasotti marked this pull request as draft May 26, 2026 12:43
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 4, 2026

Copy link
Copy Markdown

Deploying rmk-rs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 87fb488
Status: ✅  Deploy successful!
Preview URL: https://0964a461.rmk-4a2.pages.dev
Branch Preview URL: https://feat-rynk-protocol.rmk-4a2.pages.dev

View logs

@Schievel1

Schievel1 commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Iirc this is also used as the protocol between central and peripheral.
If we want to flash the peripheral via the central we can't loose any message during transfer.

I can count a sequence number and simply not start the update if a message went missing. Or we need flow control e.g. with a sliding window for rynk. For the latter I would say it's better to have that reusable in the protocols instead of my firmware update cooking up its own flow control.

@HaoboGu

HaoboGu commented Jun 12, 2026

Copy link
Copy Markdown
Owner Author

Iirc this is also used as the protocol between central and peripheral. If we want to flash the peripheral via the central we can't loose any message during transfer.

I can count a sequence number and simply not start the update if a message went missing. Or we need flow control e.g. with a sliding window for rynk. For the latter I would say it's better to have that reusable in the protocols instead of my firmware update cooking up its own flow control.

In the current design Rynk is not used between central and peripheral, but I hope it can be used in the future. Now it has only a SEQ number. Could you explain further about the "flow control" mechanism?

@Schievel1

Copy link
Copy Markdown
Contributor

Iirc this is also used as the protocol between central and peripheral. If we want to flash the peripheral via the central we can't loose any message during transfer.

I can count a sequence number and simply not start the update if a message went missing. Or we need flow control e.g. with a sliding window for rynk. For the latter I would say it's better to have that reusable in the protocols instead of my firmware update cooking up its own flow control.

In the current design Rynk is not used between central and peripheral, but I hope it can be used in the future. Now it has only a SEQ number. Could you explain further about the "flow control" mechanism?

What I mean with flow control is basically what I already did for the split protocol in #886. So mostly checking if the data is correct and resending a packet if it isn't.
But after considering this a bit longer I tend towards a solution where this is on the application layer. (What I already did in #886)
If we later on find out we use similar implementations for this across different connections (I mean firmware via ble, firmware via uart from central to split, some different thing that sends data over rynk and must have consistency etc.) we can still merge all those into a unified solution and put it into rynk.

1 similar comment
@Schievel1

Copy link
Copy Markdown
Contributor

Iirc this is also used as the protocol between central and peripheral. If we want to flash the peripheral via the central we can't loose any message during transfer.

I can count a sequence number and simply not start the update if a message went missing. Or we need flow control e.g. with a sliding window for rynk. For the latter I would say it's better to have that reusable in the protocols instead of my firmware update cooking up its own flow control.

In the current design Rynk is not used between central and peripheral, but I hope it can be used in the future. Now it has only a SEQ number. Could you explain further about the "flow control" mechanism?

What I mean with flow control is basically what I already did for the split protocol in #886. So mostly checking if the data is correct and resending a packet if it isn't.
But after considering this a bit longer I tend towards a solution where this is on the application layer. (What I already did in #886)
If we later on find out we use similar implementations for this across different connections (I mean firmware via ble, firmware via uart from central to split, some different thing that sends data over rynk and must have consistency etc.) we can still merge all those into a unified solution and put it into rynk.

@HaoboGu HaoboGu force-pushed the feat/rynk_protocol branch 3 times, most recently from 9047ce5 to 8ea6723 Compare June 25, 2026 03:29
@HaoboGu HaoboGu force-pushed the feat/rynk_protocol branch from c387d14 to b78964e Compare July 2, 2026 11:11
@HaoboGu HaoboGu force-pushed the feat/rynk_protocol branch 3 times, most recently from 28b17bd to 9768858 Compare July 9, 2026 14:55
@HaoboGu HaoboGu marked this pull request as ready for review July 9, 2026 15:21

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ff7c9c7309

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread rmk-config/src/lib.rs
Comment on lines +1004 to +1005
#[serde_inline_default(false)]
pub rynk_enabled: bool,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Default HostConfig to the default Rynk protocol

With rmk/Cargo.toml now defaulting to the rynk feature, a keyboard.toml that omits [host] still resolves to vial_enabled = true and this newly added rynk_enabled = false. The macro’s validate_feature_config_parity requires the TOML flags to match the enabled Cargo features, so default-feature builds fail unless every project explicitly adds vial_enabled = false and rynk_enabled = true. The config defaults should match the crate defaults, or the parity check should derive the omitted host protocol from enabled features.

Useful? React with 👍 / 👎.

Comment thread rynk/src/api.rs
/// Jump to the bootloader (DFU mode) — fire-and-forget, same contract as
/// [`reboot`](Self::reboot).
pub async fn bootloader_jump(&mut self) -> Result<(), RynkHostError> {
self.send_no_reply::<command::BootloaderJump>(&()).await

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Report locked bootloader jumps instead of fire-and-forget

When the device is still locked, firmware gates BootloaderJump in RynkService::requires_unlock and sends Err(Locked) instead of jumping, but this client path uses send_no_reply and returns Ok(()) as soon as the frame is written. In that locked scenario tooling reports that DFU mode was requested successfully even though the firmware rejected it; handle the locked/rejected path before using the fire-and-forget behavior needed for the successful jump case.

Useful? React with 👍 / 👎.

@HaoboGu HaoboGu force-pushed the feat/rynk_protocol branch 3 times, most recently from 38f5948 to 4111105 Compare July 10, 2026 13:08
HaoboGu added 8 commits July 10, 2026 22:48
Adds new rynk/ protocol module (buffer, cmd, header, fingerprint, mod)
with the new wire format. Migrates per-domain modules (combo, encoder,
fork, keymap, macro_data, morse, status, system) from the previous
rmk/ namespace, and removes the old endpoint/topic snapshot-based
layout. Also drops unused derives/imports across rmk-types/src/*.rs.

Signed-off-by: Haobo Gu <haobogu@outlook.com>
Signed-off-by: Haobo Gu <haobogu@outlook.com>
Adds GetWpm (0x0805), GetSleepState (0x0806), GetLedIndicator (0x0807)
in the Status group. These let the host probe the latest value of the
three pure event-stream topics whose state isn't otherwise queryable
(layer/connection/battery/ble already have getters).

The snapshot source-of-truth lives in pr2; handlers land in pr3.
Drops the `Header` struct + `Header::decode`/`encode_into` in favour of
`Frame` (a type alias for `[u8]`) and the `FrameOps` trait that adds
in-place wire-header accessors (`cmd`, `seq`, `payload_len`, `payload`,
plus their setters).

Callers stop parsing a `Header` value out of the bytes and re-encoding
it back — they hand the buffer through and access fields via the trait.
The trait re-uses `RynkError::InvalidParameter` for "short buffer" /
"unknown CMD" instead of a separate `DecodeError`.

Wire layout unchanged: `[CMD u16 LE | SEQ u8 | LEN u16 LE | payload]`.

Used by pr2's dispatch refactor (single buffer in/out) and the handler
signature update in pr3.
Aliases `Result<T, RynkError>` (with `T = ()` default) so handler
modules can write `RynkResult` for empty-status responses without
re-declaring the alias in every file. Used by pr3's handlers.
Introduces rmk/src/host/rynk/{mod, codec, topics} as the dispatcher
scaffold for the on-device rynk service. Wires it into host/context
and host/mod, exposes channel hooks in src/channel.rs, and updates
src/keymap.rs and src/lib.rs to expose the new entry points.
Handlers and transports land in subsequent PRs.

Signed-off-by: Haobo Gu <haobogu@outlook.com>
These statics are only consumed by the BLE transport added in pr4.
Move them out of the service-core PR so pr2 stays free of transport
concerns; they'll be re-introduced alongside the BLE transport.
HaoboGu added 8 commits July 10, 2026 23:24
Signed-off-by: Haobo Gu <haobogu@outlook.com>
Signed-off-by: Haobo Gu <haobogu@outlook.com>
Wire the six bulk handlers (keymap/combo/morse Get+Set) with up-front
whole-request validation, advertise real bulk capabilities
(max_bulk_keys, bulk_transfer_supported), and pin BULK_SIZE <= u8::MAX
for the u8 wire field.
A bulk keymap run was confined to a single layer, forcing a host to
restart the run at every layer boundary. The keymap is stored as one
flat, layer-major array (`layer * rows * cols + row * cols + col`) — the
same index space `get_action_flat`/`set_action_by_flat_index` already
use — so a run is naturally just a contiguous slice of the whole keymap.

`check_keymap_run` now computes the global flat offset and bounds against
the keymap's total size instead of one layer's, letting a run cross both
row and layer boundaries and stop only at the end of the keymap. Get
reads via `get_action_flat`; Set decomposes the flat offset back to
`(layer, row, col)` to keep the durable per-key persist. This lets a host
stream the entire keymap as one contiguous BULK_SIZE-chunked sequence.

Combo and morse bulk are already flat contiguous slot lists (no analogous
sub-boundary) and macro buffer transfer is bounds-clamped; audited, no
change needed.

Adds a cross-layer round-trip test and corrects the now-stale
"never wraps across layers" comments.
One `BULK_SIZE` governed all three bulk endpoints, but the item sizes
differ ~17×: a KeyAction is 16 B, a Combo 83 B. The RYNK buffer
auto-sizes to `BULK_SIZE × largest_item`, so it was dominated by the
combo response (665 B at defaults) while the keymap response used only
129 of the 671 B buffer. Keymap — the one endpoint with hundreds of
entries to stream — was throttled to 8 keys/message; combos and morses,
capped at their slot counts (8), gained nothing from a larger chunk.

Split the knob in two:
- `BULK_KEYMAP_SIZE` (protocol_max_bulk_keymap_size, default 32) — keys
  per keymap message. 32 keys encode to 513 B, still under the
  combo-dominated 665 B, so RYNK_MIN_BUFFER_SIZE stays 671 B — 4× the
  keymap throughput at zero extra RAM.
- `BULK_SIZE` (protocol_max_bulk_size, default 8) — combos/morses per
  message, unchanged.

DeviceCapabilities now advertises both budgets: `max_bulk_keys`
(keymap) and the new `max_bulk_configs` (combo/morse). Wire snapshots
regenerated for the added field (DeviceCapabilities only).

Loopback bulk tests move to a 48-key 4-layer fixture so a full
BULK_KEYMAP_SIZE run (and one past it) fits without the keymap span
being the limiter; bulk_action() widened to distinct keycodes.
Signed-off-by: Haobo Gu <haobogu@outlook.com>
Signed-off-by: Haobo Gu <haobogu@outlook.com>
Signed-off-by: Haobo Gu <haobogu@outlook.com>
@HaoboGu HaoboGu force-pushed the feat/rynk_protocol branch 2 times, most recently from 73761d1 to 0dff9a7 Compare July 10, 2026 15:44
Signed-off-by: Haobo Gu <haobogu@outlook.com>
@HaoboGu HaoboGu force-pushed the feat/rynk_protocol branch 2 times, most recently from c952ee0 to 5ffdabf Compare July 10, 2026 16:40
Signed-off-by: Haobo Gu <haobogu@outlook.com>
@HaoboGu HaoboGu force-pushed the feat/rynk_protocol branch from 5ffdabf to 62a9432 Compare July 10, 2026 17:03
HaoboGu added 11 commits July 11, 2026 09:54
Signed-off-by: Haobo Gu <haobogu@outlook.com>
Signed-off-by: Haobo Gu <haobogu@outlook.com>
fix: align docs.rs features with rynk
fix: expose rynk layout API to wasm
fix: model rynk macros as a flat buffer
Runtime conversions in GetCapabilities were unreachable: every constant
is provably in range at build time (BULK_* are capped at 255 by
BULK_COUNT_CEILING, MACRO_DATA_SIZE by MAX_MACRO_DATA_SIZE, and
RYNK_BUFFER_SIZE - RYNK_HEADER_SIZE cannot underflow thanks to the
RYNK_MIN_BUFFER_SIZE const assert in rynk/mod.rs), so revert the handler
to plain casts.

Trim the build_constants checks to the values no other bound covers:
morse_max_num and split_peripherals_num (auto-raised after
deserialization), ble_profiles_num, macro_space_size, and
rynk_buffer_size. combo_max_length, max_patterns_per_key, and
protocol_macro_chunk_size are already bounded by the protocol ceilings
checked directly above.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants