Skip to content

RFC rust: tty: introduce TTY subsystem abstractions and rttyprintk

SeungJong Ha b4-sent lkml oe-kbuild-all rust-for-linux 1 version In review

Get series with b4
b4 am [email protected] change-id 20260126-rust-tty-printk-driver-ccdca3263d61

Versions newest first

  1. v1 RFC Latest3 patches 8 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3rust: bindings: add TTY subsystem headersrust/bindings/bindings_helper.h+3 -00 replies
2/3rust: tty: add TTY subsystem abstractionsrust/kernel/lib.rs rust/kernel/tty.rs rust/kernel/tty/driver.rs +1 more+801 -02 replies
3/3char: rttyprintk: add Rust TTY printk driverdrivers/char/Kconfig drivers/char/Makefile drivers/char/rttyprintk.rs+194 -02 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH RFC 0/3] rust: tty: introduce TTY subsystem abstractions and rttyprintk

Hello,

This RFC patch series introduces Rust abstractions for the TTY subsystem and implements a sample driver, rttyprintk.

Currently, TTY abstractions are missing in the
Rust for Linux implementation. This series aims to fill that gap.

It consists of two main parts:
- Rust TTY abstractions
- The rttyprintk driver
rttyprintk serves as the first example of a Rust TTY driver. I chose to port ttyprintk because its simplicity makes it and ideal candidate for validating the new abstractions and demonstrating their usage.

Thank you!

---
SeungJong Ha (3):
rust: bindings: add TTY subsystem headers
rust: tty: add TTY subsystem abstractions
char: rttyprintk: add Rust TTY printk driver

 drivers/char/Kconfig            |  13 ++
 drivers/char/Makefile           |   1 +
 drivers/char/rttyprintk.rs      | 180 +++++++++++++++
 rust/bindings/bindings_helper.h |   3 +
 rust/kernel/lib.rs              |   2 +
 rust/kernel/tty.rs              | 173 +++++++++++++++
 rust/kernel/tty/driver.rs       | 478 ++++++++++++++++++++++++++++++++++++++++
 rust/kernel/tty/port.rs         | 148 +++++++++++++
 8 files changed, 998 insertions(+)

---
base-commit: e741e19d7691c5e6f5c2bbff980d835dccb86054
change-id: 20260126-rust-tty-printk-driver-ccdca3263d61

Best regards,

Signature · 1 line
SeungJong Ha <[email protected]>