[PATCH preview 0/1] rust: add Rust bindings/funcs for I2C bus

0 views
Skip to first unread message

Chao Liu

unread,
Oct 21, 2025, 11:10:30 PM (2 days ago) Oct 21
to chen...@openatom.club, luo...@openatom.club, dz...@openatom.club, plu...@openatom.club, hust-os-ker...@googlegroups.com, Chao Liu
Hi, Chenmiao:

This patch series adds Rust bindings and functions for the I2C bus in QEMU.
It includes the following changes:

- Add Rust bindings for the `I2CBus` struct and its associated functions.
- Implement safe Rust wrappers around the C functions for I2C bus operations.
- Update the build configuration to include the new Rust source file.

Please review the changes and let me know if you have any questions or need
further modifications.

This patch is a foundation—you can build on it for I2CSlave and subsequent work.

Best regards,
Chao

Chao Liu (1):
rust: add rust bindings/funcs for i2c bus

rust/hw/core/meson.build | 1 +
rust/hw/core/src/i2cbus.rs | 172 +++++++++++++++++++++++++++++++++++++
rust/hw/core/src/lib.rs | 3 +
rust/hw/core/src/qdev.rs | 18 +++-
rust/hw/core/wrapper.h | 1 +
5 files changed, 194 insertions(+), 1 deletion(-)
create mode 100644 rust/hw/core/src/i2cbus.rs

--
2.51.0
Reply all
Reply to author
Forward
0 new messages