RFC rust abstractions for interacting with sysfs
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest3 patches 10 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | rust: kernel: types: add mode wrapperrust/ | +17 | 2 replies | |
| 2/3 | rust: kernel: kobject: basic sysfs implementationrust/ rust/ | +273 | 3 replies | |
| 3/3 | samples: rust: add kobject samplesamples/ samples/ samples/ | +75 | 2 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [RFC PATCH 0/3] rust abstractions for interacting with sysfs
Hello,
For now, there are no facilities for the Rust side to tune modules written in Rust in runtime or for just simple debug output/statistics from the module. For exactly this purpose, the C has the sysfs. In this patch series, I implemented a minimal sysfs wrapper utilizing kobject API.
I would like to collect your thoughts on whether:
- Do we want something like this in the rust part of the kernel?
- Do we want to support all sysfs capabilities?
I implemented a sample to present the API I have chosen for the Rust part. It is a straightforward example that does not represent all capabilities of the sysfs. The documentation will be potentially improved, but I would like to first settle the abstractions.
Thank you
Daniel
Daniel Sedlak (3):
rust: kernel: types: add mode wrapper
rust: kernel: kobject: basic sysfs implementation
samples: rust: add kobject sample
rust/kernel/kobject.rs | 271 ++++++++++++++++++++++++++++++++ rust/kernel/lib.rs | 2 + rust/kernel/types.rs | 17 ++ samples/rust/Kconfig | 8 + samples/rust/Makefile | 1 + samples/rust/kobject_example.rs | 66 ++++++++ 6 files changed, 365 insertions(+) create mode 100644 rust/kernel/kobject.rs create mode 100644 samples/rust/kobject_example.rs
base-commit: 40384c840ea1944d7c5a392e8975ed088ecf0b37
Signature · 1 line
2.47.1