Skip to content

Rynk Protocol - #962

Merged
HaoboGu merged 25 commits into
mainfrom
feat/rynk
Jul 31, 2026
Merged

Rynk Protocol#962
HaoboGu merged 25 commits into
mainfrom
feat/rynk

Conversation

@HaoboGu

@HaoboGu HaoboGu commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator

successor of #848, cleaned the commit history

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 16, 2026

Copy link
Copy Markdown

Deploying rmk-rs with  Cloudflare Pages  Cloudflare Pages

Latest commit: e33ef73
Status: ✅  Deploy successful!
Preview URL: https://7d16592c.rmk-4a2.pages.dev
Branch Preview URL: https://feat-rynk.rmk-4a2.pages.dev

View logs

@HaoboGu HaoboGu mentioned this pull request Jul 16, 2026
15 tasks
@github-actions

github-actions Bot commented Jul 16, 2026

Copy link
Copy Markdown

Size Report

Example main PR Diff .text .data .bss
use_config/nrf52832_ble 397.5 KiB 397.5 KiB +0.00% ⬇️ -4 0 0
use_config/nrf52840_ble 438.1 KiB 438.1 KiB +0.00% ⬇️ -4 0 0
use_config/nrf52840_ble_split (central) 500.9 KiB 500.9 KiB +0.00% 0 0 0
use_config/nrf52840_ble_split (peripheral) 320.6 KiB 320.6 KiB +0.00% 0 0 0
use_config/pi_pico_w_ble 671.1 KiB 671.1 KiB +0.00% ⬆️ +4 0 0
use_config/rp2040 145.8 KiB 145.8 KiB +0.00% ⬇️ -4 0 0
use_config/rp2040_split (central) 159.4 KiB 159.4 KiB +0.00% ⬆️ +4 0 0
use_config/rp2040_split (peripheral) 27.9 KiB 27.9 KiB +0.00% 0 0 0
use_config/stm32f1 62.6 KiB 62.5 KiB +0.00% ⬇️ -4 0 0
use_config/stm32h7 100.8 KiB 100.8 KiB +0.00% 0 0 0
use_rust/nrf52832_ble 387.0 KiB 385.5 KiB -0.40% ⬇️ +196 0 -1792
use_rust/nrf52840_ble 441.9 KiB 435.6 KiB -1.43% ⬇️ +92 0 -6608
use_rust/nrf52840_ble_split (central) 508.0 KiB 504.9 KiB -0.61% ⬇️ +224 0 -3432
use_rust/nrf52840_ble_split (peripheral) 318.4 KiB 318.4 KiB +0.02% ⬆️ +72 0 +8
use_rust/pi_pico_w_ble 672.8 KiB 671.1 KiB -0.24% ⬇️ -172 0 -1488
use_rust/rp2040 150.2 KiB 144.9 KiB -3.48% ⬇️ -3520 0 -1832
use_rust/rp2040_split (central) 162.7 KiB 158.0 KiB -2.93% ⬇️ -3144 0 -1752
use_rust/rp2040_split (peripheral) 28.2 KiB 28.2 KiB +0.30% ⬆️ +80 0 +8
use_rust/stm32f1 61.8 KiB 61.8 KiB +0.00% 0 0 0
use_rust/stm32h7 118.4 KiB 118.4 KiB +0.00% ⬆️ +4 0 0
use_config/nrf52832_ble — 397.5 KiB → 397.5 KiB (+0.00% ⬇️)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
 365036	   8620	  33344	 407000	  635d8	rmk-nrf52832

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
 365040	   8620	  33344	 407004	  635dc	rmk-nrf52832

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.0%     +10  [ = ]       0    .debug_loc
  +7.5%      +4  [ = ]       0    [Unmapped]
  -0.0%      -4  -0.0%      -4    .text
  -0.0%    -216  [ = ]       0    .debug_info
  -0.1%    -240  [ = ]       0    .debug_line
  -0.1%    -424  [ = ]       0    .strtab
  -0.1% -3.71Ki  [ = ]       0    .debug_str
  -0.1% -4.56Ki  -0.0%      -4    TOTAL
use_config/nrf52840_ble — 438.1 KiB → 438.1 KiB (+0.00% ⬇️)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
 396596	   8628	  43368	 448592	  6d850	rmk-nrf52840

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
 396600	   8628	  43368	 448596	  6d854	rmk-nrf52840

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.0%     +12  [ = ]       0    .debug_str
  +0.0%     +10  [ = ]       0    .debug_loc
  +0.0%      +3  [ = ]       0    .strtab
  -0.0%      -4  -0.0%      -4    .text
 -37.3%     -25  [ = ]       0    [Unmapped]
  -0.0%    -216  [ = ]       0    .debug_info
  -0.1%    -240  [ = ]       0    .debug_line
  -0.0%    -460  -0.0%      -4    TOTAL
use_config/nrf52840_ble_split (central) — 500.9 KiB → 500.9 KiB (+0.00%)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
 455612	   8684	  48576	 512872	  7d368	central

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
 455612	   8684	  48576	 512872	  7d368	central

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.0%     +12  [ = ]       0    .debug_str
  +0.0%      +3  [ = ]       0    .strtab
  -2.6%      -1  [ = ]       0    [Unmapped]
  -0.0%    -216  [ = ]       0    .debug_info
  -0.1%    -234  [ = ]       0    .debug_line
  -0.0%    -436  [ = ]       0    TOTAL
use_config/nrf52840_ble_split (peripheral) — 320.6 KiB → 320.6 KiB (+0.00%)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
 292344	   8500	  27472	 328316	  5027c	peripheral

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
 292344	   8500	  27472	 328316	  5027c	peripheral

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.0%     +32  [ = ]       0    .debug_str
  +0.0%     +16  [ = ]       0    .strtab
  +0.0%      +1  [ = ]       0    .debug_line
  -0.0%      -2  [ = ]       0    .debug_info
  -4.2%      -3  [ = ]       0    [Unmapped]
  +0.0%     +44  [ = ]       0    TOTAL
use_config/pi_pico_w_ble — 671.1 KiB → 671.1 KiB (+0.00% ⬆️)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
 634352	      0	  52904	 687256	  a7c98	rmk-pi-pico-w

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
 634348	      0	  52904	 687252	  a7c94	rmk-pi-pico-w

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.0%     +10  [ = ]       0    .debug_loc
  +0.0%      +4  +0.0%      +4    .text
  -3.0%      -2  [ = ]       0    [Unmapped]
  -0.0%     -24  [ = ]       0    .debug_info
  -0.4%     -39  [ = ]       0    .debug_abbrev
  -0.0%     -79  [ = ]       0    .debug_line
  -0.1%    -372  [ = ]       0    .strtab
  -0.1% -2.55Ki  [ = ]       0    .debug_str
  -0.0% -3.04Ki  +0.0%      +4    TOTAL
use_config/rp2040 — 145.8 KiB → 145.8 KiB (+0.00% ⬇️)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
 135384	      0	  13892	 149276	  2471c	rmk-rp2040

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
 135388	      0	  13892	 149280	  24720	rmk-rp2040

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.1%    +137  [ = ]       0    .debug_line
  +0.0%     +46  [ = ]       0    .debug_info
  +0.0%     +29  [ = ]       0    .debug_str
  +1.8%      +1  [ = ]       0    [Unmapped]
  -0.0%      -2  [ = ]       0    .debug_loc
  -0.0%      -4  -0.0%      -4    .text
  -0.0%      -7  [ = ]       0    .strtab
  +0.0%    +200  -0.0%      -4    TOTAL
use_config/rp2040_split (central) — 159.4 KiB → 159.4 KiB (+0.00% ⬆️)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
 148396	      0	  14844	 163240	  27da8	central

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
 148392	      0	  14844	 163236	  27da4	central

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.0%      +4  +0.0%      +4    .text
  -7.9%      -3  [ = ]       0    [Unmapped]
  -0.0%      -6  [ = ]       0    .strtab
  -0.0%     -37  [ = ]       0    .debug_info
  -0.0%    -106  [ = ]       0    .debug_str
  -0.1%    -124  [ = ]       0    .debug_line
  -0.0%    -272  +0.0%      +4    TOTAL
use_config/rp2040_split (peripheral) — 27.9 KiB → 27.9 KiB (+0.00%)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
  25696	     60	   2804	  28560	   6f90	peripheral

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
  25696	     60	   2804	  28560	   6f90	peripheral

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +2.0%      +1  [ = ]       0    [Unmapped]
  -0.2%     -39  [ = ]       0    .strtab
  -0.1%    -714  [ = ]       0    .debug_str
  -0.1%    -752  [ = ]       0    TOTAL
use_config/stm32f1 — 62.6 KiB → 62.5 KiB (+0.00% ⬇️)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
  57684	     28	   6336	  64048	   fa30	rmk-stm32f1

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
  57688	     28	   6336	  64052	   fa34	rmk-stm32f1

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.1% +1.05Ki  [ = ]       0    .debug_str
  +0.3%    +117  [ = ]       0    .strtab
  +0.0%      +6  [ = ]       0    .debug_line
  +3.3%      +2  [ = ]       0    [Unmapped]
  -0.0%      -4  -0.0%      -4    .text
  +0.1% +1.17Ki  -0.0%      -4    TOTAL
use_config/stm32h7 — 100.8 KiB → 100.8 KiB (+0.00%)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
  94840	    264	   8112	 103216	  19330	rmk-stm32h7

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
  94840	    264	   8112	 103216	  19330	rmk-stm32h7

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  [ = ]       0  [ = ]       0    TOTAL
use_rust/nrf52832_ble — 387.0 KiB → 385.5 KiB (-0.40% ⬇️)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
 352776	   8620	  33320	 394716	  605dc	rmk-nrf52832

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
 352580	   8620	  35112	 396312	  60c18	rmk-nrf52832

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.4% +1.08Ki  [ = ]       0    .strtab
  +0.2%    +448  [ = ]       0    .debug_ranges
  +0.1%    +160  +0.1%    +160    .text
  +0.1%     +36  +0.1%     +36    .rodata
  +1.5%      +7  [ = ]       0    .defmt
  -7.8%      -5  [ = ]       0    [Unmapped]
  -0.7%     -60  [ = ]       0    .debug_abbrev
  -0.5%    -192  [ = ]       0    .debug_aranges
  -0.1%    -384  [ = ]       0    .debug_line
  -1.0%    -440  [ = ]       0    .debug_frame
  -0.7%    -832  [ = ]       0    .symtab
  [ = ]       0  -5.3% -1.75Ki    .bss
  -0.4% -2.54Ki  [ = ]       0    .debug_loc
  -0.3% -6.43Ki  [ = ]       0    .debug_info
  -0.6% -22.8Ki  [ = ]       0    .debug_str
  -0.4% -31.9Ki  -0.4% -1.56Ki    TOTAL
use_rust/nrf52840_ble — 441.9 KiB → 435.6 KiB (-1.43% ⬇️)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
 396796	   8628	  40616	 446040	  6ce58	rmk-nrf52840

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
 396704	   8628	  47224	 452556	  6e7cc	rmk-nrf52840

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.2%    +670  [ = ]       0    .strtab
  +0.2%     +96  +0.2%     +96    .rodata
  +0.3%     +29  [ = ]       0    .debug_abbrev
   +13%      +8  [ = ]       0    [Unmapped]
  -0.0%      -4  -0.0%      -4    .text
  -0.5%    -248  [ = ]       0    .debug_aranges
  -1.1%    -548  [ = ]       0    .debug_frame
  -0.2%    -732  [ = ]       0    .debug_line
  -0.6%    -816  [ = ]       0    .symtab
  -0.7% -1.62Ki  [ = ]       0    .debug_ranges
  [ = ]       0 -14.3% -6.45Ki    .bss
  -0.3% -6.74Ki  [ = ]       0    .debug_info
  -1.0% -7.39Ki  [ = ]       0    .debug_loc
  -0.5% -22.0Ki  [ = ]       0    .debug_str
  -0.5% -39.3Ki  -1.4% -6.36Ki    TOTAL
use_rust/nrf52840_ble_split (central) — 508.0 KiB → 504.9 KiB (-0.61% ⬇️)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
 457784	   8684	  50544	 517012	  7e394	central

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
 457560	   8684	  53976	 520220	  7f01c	central

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.2% +1.32Ki  [ = ]       0    .debug_loc
  +0.5% +1.29Ki  [ = ]       0    .debug_ranges
  +0.0%    +128  +0.0%    +128    .text
  +0.2%     +96  +0.2%     +96    .rodata
  +0.9%      +8  [ = ]       0    .defmt
  -2.1%      -1  [ = ]       0    [Unmapped]
  -0.4%     -31  [ = ]       0    .debug_abbrev
  -0.0%     -41  [ = ]       0    .strtab
  -0.0%     -92  [ = ]       0    .debug_line
  -0.4%    -216  [ = ]       0    .debug_aranges
  -0.9%    -504  [ = ]       0    .debug_frame
  -0.6%    -864  [ = ]       0    .symtab
  [ = ]       0  -6.5% -3.35Ki    .bss
  -0.1% -3.52Ki  [ = ]       0    .debug_info
  -0.4% -17.9Ki  [ = ]       0    .debug_str
  -0.2% -20.3Ki  -0.6% -3.13Ki    TOTAL
use_rust/nrf52840_ble_split (peripheral) — 318.4 KiB → 318.4 KiB (+0.02% ⬆️)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
 290340	   8500	  27240	 326080	  4f9c0	peripheral

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
 290268	   8500	  27232	 326000	  4f970	peripheral

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.0%     +52  +0.0%     +52    .text
  +0.0%     +41  [ = ]       0    .debug_info
  +0.1%     +20  +0.1%     +20    .rodata
  +0.0%     +16  [ = ]       0    .symtab
  [ = ]       0  +0.0%      +8    .bss
 -12.3%      -8  [ = ]       0    [Unmapped]
  -0.0%     -15  [ = ]       0    .strtab
  -0.1%     -36  [ = ]       0    .debug_frame
  -1.5%    -112  [ = ]       0    .debug_abbrev
  -0.1%    -169  [ = ]       0    .debug_line
  -0.2%    -256  [ = ]       0    .debug_ranges
  -0.2% -1.11Ki  [ = ]       0    .debug_loc
  -0.1% -2.50Ki  [ = ]       0    .debug_str
  -0.1% -4.06Ki  +0.0%     +80    TOTAL
use_rust/pi_pico_w_ble — 672.8 KiB → 671.1 KiB (-0.24% ⬇️)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
 634228	      0	  53008	 687236	  a7c84	rmk-pi-pico-w

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
 634400	      0	  54496	 688896	  a8300	rmk-pi-pico-w

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.2%    +624  [ = ]       0    .strtab
  +0.1%    +368  [ = ]       0    .debug_ranges
  +0.0%     +68  +0.0%     +68    .rodata
   +25%     +12  [ = ]       0    [Unmapped]
  -0.1%      -8  [ = ]       0    .debug_abbrev
  -0.0%     -16  [ = ]       0    .debug_aranges
  -0.2%     -84  [ = ]       0    .debug_frame
  -0.2%    -160  [ = ]       0    .symtab
  -0.1%    -240  -0.1%    -240    .text
  -0.1%    -392  [ = ]       0    .debug_line
  [ = ]       0  -2.8% -1.45Ki    .bss
  -0.2% -2.43Ki  [ = ]       0    .debug_loc
  -0.4% -8.51Ki  [ = ]       0    .debug_info
  -0.6% -25.7Ki  [ = ]       0    .debug_str
  -0.4% -36.4Ki  -0.2% -1.62Ki    TOTAL
use_rust/rp2040 — 150.2 KiB → 144.9 KiB (-3.48% ⬇️)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
 134676	      0	  13732	 148408	  243b8	rmk-rp2040

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
 138196	      0	  15564	 153760	  258a0	rmk-rp2040

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +1.7%      +1  [ = ]       0    [Unmapped]
  -0.3%     -20  [ = ]       0    .debug_abbrev
  -0.3%     -56  [ = ]       0    .debug_aranges
  -0.1%    -169  [ = ]       0    .strtab
  -1.1%    -188  -1.2%    -188    .rodata
  -1.2%    -200  [ = ]       0    .debug_frame
  -1.2%    -400  [ = ]       0    .symtab
  -2.0% -1.68Ki  [ = ]       0    .debug_ranges
  [ = ]       0 -12.6% -1.79Ki    .bss
  -1.8% -2.96Ki  [ = ]       0    .debug_line
  -2.7% -3.25Ki  -2.7% -3.25Ki    .text
  -1.6% -4.77Ki  [ = ]       0    .debug_loc
  -2.5% -24.5Ki  [ = ]       0    .debug_info
  -3.6% -60.1Ki  [ = ]       0    .debug_str
  -2.8% -98.3Ki  -3.5% -5.23Ki    TOTAL
use_rust/rp2040_split (central) — 162.7 KiB → 158.0 KiB (-2.93% ⬇️)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
 147160	      0	  14588	 161748	  277d4	central

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
 150304	      0	  16340	 166644	  28af4	central

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +3.8%    +656  [ = ]       0    .debug_aranges
   +12%      +6  [ = ]       0    [Unmapped]
  +2.3%      +4  +2.9%      +4    .data
  -0.0%      -4  [ = ]       0    .strtab
  -0.3%     -20  [ = ]       0    .debug_abbrev
  -0.9%    -168  [ = ]       0    .debug_frame
  -0.9%    -168  -0.9%    -168    .rodata
  -0.5%    -176  [ = ]       0    .symtab
  [ = ]       0 -11.4% -1.71Ki    .bss
  -1.9% -1.76Ki  [ = ]       0    .debug_ranges
  -0.5% -1.82Ki  [ = ]       0    .debug_loc
  -1.4% -2.57Ki  [ = ]       0    .debug_line
  -2.3% -2.91Ki  -2.3% -2.91Ki    .text
  -1.2% -13.3Ki  [ = ]       0    .debug_info
  -1.3% -25.5Ki  [ = ]       0    .debug_str
  -1.2% -47.8Ki  -2.9% -4.78Ki    TOTAL
use_rust/rp2040_split (peripheral) — 28.2 KiB → 28.2 KiB (+0.30% ⬆️)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
  25796	     60	   3068	  28924	   70fc	peripheral

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
  25716	     60	   3060	  28836	   70a4	peripheral

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +1.5% +12.3Ki  [ = ]       0    .debug_str
  +0.8% +2.92Ki  [ = ]       0    .debug_info
  +5.2%    +696  [ = ]       0    .debug_aranges
  +0.7%    +485  [ = ]       0    .debug_loc
  +0.3%     +64  +0.3%     +64    .text
  +0.6%     +32  [ = ]       0    .debug_frame
  +0.4%     +32  [ = ]       0    .symtab
  +0.3%     +16  +0.3%     +16    .rodata
  [ = ]       0  +0.4%      +8    .bss
  +0.0%      +6  [ = ]       0    .strtab
 -23.8%     -15  [ = ]       0    [Unmapped]
  -0.3%     -18  [ = ]       0    .debug_abbrev
  -0.2%     -32  [ = ]       0    .debug_ranges
  +1.1% +16.4Ki  +0.3%     +88    TOTAL
use_rust/stm32f1 — 61.8 KiB → 61.8 KiB (+0.00%)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
  57012	     28	   6272	  63312	   f750	rmk-stm32f1

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
  57012	     28	   6272	  63312	   f750	rmk-stm32f1

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  -0.0%      -1  [ = ]       0    .debug_str
  -4.5%      -3  [ = ]       0    [Unmapped]
  -0.0%      -4  [ = ]       0    TOTAL
use_rust/stm32h7 — 118.4 KiB → 118.4 KiB (+0.00% ⬆️)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
 106908	    320	  14012	 121240	  1d998	rmk-stm32h7

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
 106904	    320	  14012	 121236	  1d994	rmk-stm32h7

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.1%    +124  [ = ]       0    .debug_line
  +0.0%    +100  [ = ]       0    .debug_str
  +0.0%     +37  [ = ]       0    .debug_info
  +0.0%      +4  +0.0%      +4    .text
  -5.7%      -3  [ = ]       0    [Unmapped]
  -0.0%     -10  [ = ]       0    .debug_loc
  +0.0%    +252  +0.0%      +4    TOTAL

@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: 0d170130ff

ℹ️ 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 rynk/rynk-kle/src/to_kle.rs
@HaoboGu
HaoboGu force-pushed the feat/rynk branch 11 times, most recently from c56fde3 to aa3398e Compare July 19, 2026 13:58

Copy link
Copy Markdown
Contributor

I tested the Rynk USB path from this PR at aa3398ea on a Glove80 (nRF52840, split keyboard).

CDC OUT worked: the firmware received and decoded requests. CDC IN did not complete on the host, even though the firmware's write future returned successfully. I tried asserting DTR, starting the host read before sending, direct libusb access, 64-byte packets, and changing interface/endpoint order and numbers; none changed the result.

Using Rynk's existing 32-byte HID framing on the same build worked reliably. I could read all eight 6×14 keymap layers, and the split central and peripheral both remained connected.

This may be specific to the nRF52840/Embassy CDC path rather than Rynk itself, so I don't think the PR should simply replace CDC everywhere. Would a selectable USB HID transport be useful here? I have the firmware and native Linux host changes working and can extract a small patch if that direction makes sense.

@HaoboGu

HaoboGu commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator Author

I tested the Rynk USB path from this PR at aa3398ea on a Glove80 (nRF52840, split keyboard).

CDC OUT worked: the firmware received and decoded requests. CDC IN did not complete on the host, even though the firmware's write future returned successfully. I tried asserting DTR, starting the host read before sending, direct libusb access, 64-byte packets, and changing interface/endpoint order and numbers; none changed the result.

Using Rynk's existing 32-byte HID framing on the same build worked reliably. I could read all eight 6×14 keymap layers, and the split central and peripheral both remained connected.

This may be specific to the nRF52840/Embassy CDC path rather than Rynk itself, so I don't think the PR should simply replace CDC everywhere. Would a selectable USB HID transport be useful here? I have the firmware and native Linux host changes working and can extract a small patch if that direction makes sense.

I think it might be a linux specific descriptor bug.

Comment thread .github/workflows/ci.yml Dismissed
@HaoboGu
HaoboGu force-pushed the feat/rynk branch 4 times, most recently from 999e0fe to e7f61ab Compare July 28, 2026 11:31
@HaoboGu
HaoboGu force-pushed the feat/rynk branch 3 times, most recently from ea6f7bc to c09015e Compare July 30, 2026 14:13
HaoboGu added 4 commits July 31, 2026 22:10
Replace the placeholder rmk protocol module with the Rynk wire format: command, endpoint, and topic tables, error and message types, layout and system payloads, plus wire snapshots. Add tsify-based TypeScript type generation for host reuse.
…[keymap.layer]]

Separate the physical key map from the keymap: drop the legacy matrix_map/keymap path and its codegen, and add the macro codegen for the new schema.
… handler

Route USB and BLE host access through one handler and replace the vial_lock feature with host_lock.
HaoboGu added 21 commits July 31, 2026 22:10
Includes the lock gate, device-info and layout-blob endpoints, and keymap bulk transfer across layer boundaries.
Generates the TypeScript type bindings consumed by the web demo.
… examples

Add rp2040_rynk and qemu-riscv-rynk, adapt example sources, and regenerate Cargo.lock files.
Signed-off-by: Haobo Gu <haobogu@outlook.com>
Store each tap-hold's timing profile as a u8 index into a small,
deduplicated `taphold_profiles` table rather than an inline 4-byte
`MorseProfile`. `KeyAction::TapHold` shrinks from 12 to 7 bytes, which
also drops the u32's 4-byte alignment padding across every
KeyAction-sized RAM buffer (keymap array, held-key buffer, combos,
forks, morse cache).

Measured on the nrf52840 example at a 5x14x5 (350-key) board:
.bss -2408 bytes, .text -4 bytes (no flash cost). Savings scale with
board size; the table cost (CAP*4, default CAP=16 -> 64 B) is fixed.

- keyboard.toml: named profiles are interned automatically by the
  proc-macro; users keep referencing them by name.
- pure-Rust: default macros (th!/mt!/lt!/tt!) are unchanged; the
  custom-profile macros (thp!/mtp!/ltp!/ttp!) now take a table index
  and the user populates `behavior.morse.taphold_profiles`.
- Table capacity is configurable via `[rmk] taphold_profile_max_num`.
- Vial wire format is unchanged (profile isn't carried); the stored
  KeyAction encoding changes but auto-migrates via the build-hash guard.

Regenerated the rmk_protocol keymap endpoint snapshots (KeyAction
schema change propagates to keymap/combo/encoder/fork endpoints).
* refactor: redesign core rynk traits, achieve full-duplex communication

Signed-off-by: Haobo Gu <haobogu@outlook.com>

* refactor: update rynk crates to use the new contract

Signed-off-by: Haobo Gu <haobogu@outlook.com>

* chore(rynk): trim comments

* refactor(rynk): third simplification pass

- rynk-wasm: drop the label round-trip (JS already owns the picker name)
  and the WebDevice wrapper — JsByteLink is a local wasm-bindgen type, so
  it implements RynkDevice directly; device.rs deleted
- qemu_behavior: drop six request_raw calls duplicating the typed calls
  right above them (request delegates to request_raw, same code path)
- driver/tests: drop three tests subsumed by supersets (cmd mismatch,
  topic-during-request, cancelled-request recovery)
- rynk-serial: declare the tokio feature actually used (io-util, not time)

Signed-off-by: Haobo Gu <haobogu@outlook.com>

---------

Signed-off-by: Haobo Gu <haobogu@outlook.com>
Signed-off-by: Haobo Gu <haobogu@outlook.com>
Rebasing onto origin/main linearized away the merge commit 9b8d64c,
which carried hand-made changes not present in either parent: the
nrf54lm20_ble example tweaks, the rynk_loopback fixture downsize, and
the rynk/Cargo.lock removal. Restore them to match the pre-rebase tree.
Signed-off-by: Haobo Gu <haobogu@outlook.com>
- features/rynk.md: drop the non-existent `bulk` Cargo feature (the
  `features = ["bulk"]` snippet failed to compile); bulk is always on with
  `rynk`, sized by `rynk_buffer_size`. Note the tool-author example needs
  `embassy-futures`.
- migration/v08_v09.md: fix the fabricated `bulk_transfer` -> `bulk` rename
  (removed, folded into `rynk`); document the `KeyAction::TapHold` u8-index
  break, the removed `[rmk].protocol_max_bulk_size` key, and the new
  unknown-key strictness.
- configuration/layout.md: remove the `PDF(n)` action (unsupported in
  keyboard.toml — the keymap grammar has no rule for it), document the `Trns`
  transparent form, and split two examples that shared one toml fence.
- rmk/CHANGELOG.md: add the Rynk feature entry and the BREAKING `keyboard.toml`
  layout-schema change.
A USB bulk-IN transfer completes on the host only once it sees a packet shorter than the max packet size. A device-to-host frame whose length is a multiple of that size (64 at Full-Speed) ends on a full packet, so the host read stays pending. Wrap the CDC Sender in a small Write adapter that appends a zero-length packet after such a frame.

Scoped to the USB transport; run_session, UART, and BLE are untouched. This is an independent robustness fix, not the root cause of the nRF52840 "CDC IN never completes" report — there even the short handshake response and raw libusb hung, which a ZLP cannot explain.

Signed-off-by: Haobo Gu <haobogu@outlook.com>
Signed-off-by: Haobo Gu <haobogu@outlook.com>
run_session now mutes topics until the client requests GetCapabilities
(b0c4ec7), so the topic loopback tests hung waiting for frames that were
drained. Handshake first, as every real host does at connect.

Signed-off-by: Haobo Gu <haobogu@outlook.com>
Claude-Session: https://claude.ai/code/session_015SYk627CMYYUUoctAryhzP
Signed-off-by: Haobo Gu <haobogu@outlook.com>
* feat(rynk): use cobs encoding in Rynk protocol

Signed-off-by: Haobo Gu <haobogu@outlook.com>

* fix(rynk): complete COBS transport migration

Signed-off-by: Haobo Gu <haobogu@outlook.com>

* refactor(rynk): remove frame_capacity helper

RYNK_FRAME_BUFFER_SIZE computes its size directly; the host and test
call sites inline the one-line arithmetic.

Claude-Session: https://claude.ai/code/session_01M6bs9ZKV8i61EYAAquxjYn
Signed-off-by: Haobo Gu <haobogu@outlook.com>

* refactor: improve frame encoding and deframer

Signed-off-by: Haobo Gu <haobogu@outlook.com>

* refactor: use physical buffer size in config

Signed-off-by: Haobo Gu <haobogu@outlook.com>

* test(rynk): reproduce concurrent request loss in QEMU

* test(rynk): use unmodified QEMU transport

Signed-off-by: Haobo Gu <haobogu@outlook.com>

* fix(rynk): serve every frame of a coalesced read

The session served one frame per read cycle and reset the Deframer,
dropping any pipelined tail: a second request coalescing into the same
read was silently lost and its caller hung forever (byte streams give no
write boundaries, so even sequential reboot -> get_version hit this).

- Deframer::park_pending/unpark_pending move the undecoded tail to the
  buffer end while the in-place reply encodes, so nothing is dropped
- dispatch returns Result; error envelopes encode into a small stack
  buffer, so every request is answered even when a parked tail leaves
  almost no reply window
- a reply that fails to encode beside a parked tail answers with the new
  RynkError::Busy instead of Internal
- bulk GET pages size to the actual reply window, and answer Busy rather
  than an empty page when squeezed to zero (an empty page means EOF)

* feat(rynk): route replies by SEQ for concurrent requests

Replace the single-slot reply Signal with a slot pool: up to four
requests run concurrently (no-alloc builds keep one slot), each reply is
routed to the slot claiming its SEQ, and an unmatched reply — a
cancelled request's late echo, a fire-and-forget answer — is dropped.
SEQs are claimed before the frame is sent so a reply always finds its
slot, and a dropped request future frees its slot on the way out, so
cancellation needs no special casing.

* style: add missing trailing newline in channel.rs

* docs(rynk): add bulk throughput plan

* refactor: optimize the throughput

Signed-off-by: Haobo Gu <haobogu@outlook.com>

* refactor: optimize Rynk host data reading flow

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 merged commit 9448f7a into main Jul 31, 2026
58 checks passed
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.

3 participants