Skip to content

Rynk host library#873

Draft
HaoboGu wants to merge 1 commit into
feat/rynk_protocolfrom
feat/rynk-pr6-host-library
Draft

Rynk host library#873
HaoboGu wants to merge 1 commit into
feat/rynk_protocolfrom
feat/rynk-pr6-host-library

Conversation

@HaoboGu

@HaoboGu HaoboGu commented Jun 4, 2026

Copy link
Copy Markdown
Owner

No description provided.

@HaoboGu HaoboGu force-pushed the feat/rynk-pr6-host-library branch 3 times, most recently from f8b4530 to 73ec477 Compare June 4, 2026 12:53
@HaoboGu HaoboGu mentioned this pull request Jun 4, 2026
@HaoboGu HaoboGu force-pushed the feat/rynk-pr6-host-library branch 8 times, most recently from 5e801a1 to be7e4a2 Compare June 8, 2026 02:12
@liyang8246

Copy link
Copy Markdown
Collaborator

我的想法是这样的, 把 rynk-host 做成纯协议库, 不内封 usb/ble/web 什么的支持, 也不内置 runtime

  • 移除整个 transports/, 设备 连接 断开 读写 什么的交给外部处理

    感觉用 web_sys 在 rust 里做这些费力不讨好啊, 更麻烦不说, 而且其实也还是js胶水

  • 移除 tokio 和 wasmtimer, 超时重试什么的交给上层自行处理, 或者 Transport trait 加个 timer 之类的?
  • 移除 wasm-bindgen, web 应用里自己开个 crate 套一层就好了

这样可能更干净方便点

@HaoboGu

HaoboGu commented Jun 8, 2026

Copy link
Copy Markdown
Owner Author

我的想法是这样的, 把 rynk-host 做成纯协议库, 不内封 usb/ble/web 什么的支持, 也不内置 runtime

纯协议层面在rmk-types,host是一个library,这部分可以是host侧的core,作为独立的一个crate。设备 连接 断开 读写这些仍然需要实现在rmk-host下面作为子crate或者独立的crate。

也就是说,可以构造成 rmk-host crate + transport crates 这种组合形态,类似embedded-hal + hal implementation。但是最上层的应用里,还是需要同时引用 rmk-host crate + specific transport才能够构建起应用。

@HaoboGu HaoboGu force-pushed the feat/rynk-pr6-host-library branch 4 times, most recently from de1ebe4 to 81fa8a9 Compare June 8, 2026 12:44
@HaoboGu

HaoboGu commented Jun 8, 2026

Copy link
Copy Markdown
Owner Author

@liyang8246 Updated, and web demo is in #876

@liyang8246

Copy link
Copy Markdown
Collaborator

@liyang8246 Updated, and web demo is in #876

LGTM :)

@HaoboGu HaoboGu force-pushed the feat/rynk-pr6-host-library branch 2 times, most recently from 29d1242 to 706093c Compare June 9, 2026 08:46
@liyang8246 liyang8246 marked this pull request as ready for review June 9, 2026 08:48
@liyang8246

Copy link
Copy Markdown
Collaborator

我擦点错了

@liyang8246 liyang8246 marked this pull request as draft June 9, 2026 08:50
@HaoboGu HaoboGu force-pushed the feat/rynk-pr6-host-library branch 2 times, most recently from d298dcf to 207f90b Compare June 9, 2026 10:26
@liyang8246

Copy link
Copy Markdown
Collaborator

感觉这个库好像还可以, 让 ai 跑了一下好像效果还行, 但是还没仔细研究(
https://github.com/Aleph-Alpha/ts-rs

@HaoboGu HaoboGu force-pushed the feat/rynk-pr6-host-library branch 2 times, most recently from 0d0e7d0 to 8d0bcfe Compare June 10, 2026 03:54
@HaoboGu HaoboGu force-pushed the feat/rynk-pr6-host-library branch 9 times, most recently from 7b1d523 to 9e6faa3 Compare June 11, 2026 15:19
Add a runtime-free host client crate for the Rynk protocol, plus native serial and BLE transport crates.

Extend firmware-side Rynk protocol handling for host clients and cover the wire format, loopback path, hardware validation example, and host CI checks.

Signed-off-by: Haobo Gu <haobogu@outlook.com>
@HaoboGu HaoboGu force-pushed the feat/rynk-pr6-host-library branch from 9e6faa3 to 2424070 Compare June 11, 2026 15:32
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.

2 participants