Skip to content

Add Kotoba language binding (Protocol 2.0 codec) - #695

Closed
com-junkawasaki wants to merge 1 commit into
ROBOTIS-GIT:mainfrom
kotoba-lang:cursor/kotoba-protocol2-binding-e56f
Closed

com-junkawasaki wants to merge 1 commit into
ROBOTIS-GIT:mainfrom
kotoba-lang:cursor/kotoba-protocol2-binding-e56f

Conversation

@com-junkawasaki

Copy link
Copy Markdown

Adds a kotoba/ tree next to python/ as another supported language.

Kotoba guest programs cannot load the C dynamic library. This binding follows the Python model (protocol implemented in-language), not the C# / Java dylib wrap.

v1 surface

  • Protocol 2.0 instruction encode: ping, read, write (1/2/4 byte), reg_write, action, sync_read, sync_write, reboot
  • Status packet decode (header, INST_STATUS, CRC-16, error bits)
  • Constants from robotis_def
  • Example kotoba/example/ping_write.kotoba builds a ping and a write packet with no device
  • Fixture tests vs vendored goldens derived from this repo's Python Protocol2PacketHandler

Not in this PR

  • Protocol 1.0
  • easy_sdk / control tables
  • Real serial/USB port_handler — host capability. Tests use a mock pipe only. No hardware in CI.

Fork PR (same branch): kotoba-lang#1

Kotoba guest code cannot load the C dylib, so this tree mirrors Python:
in-language Protocol 2.0 encode/decode with a mock byte pipe. Serial I/O
stays a host concern. Fixture tests compile each case to import-free wasm.

Co-authored-by: Jun Kawasaki <04.feasts_minded@icloud.com>
@com-junkawasaki
com-junkawasaki deleted the cursor/kotoba-protocol2-binding-e56f branch August 30, 2026 13:30
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