samples: add Rust examples
authorMiguel Ojeda <ojeda@kernel.org>
Sat, 3 Jul 2021 15:21:12 +0000 (17:21 +0200)
committerMiguel Ojeda <ojeda@kernel.org>
Fri, 11 Feb 2022 19:43:14 +0000 (20:43 +0100)
commit0ba49d473c95df8bd7a6f6cca07cdf39bc2bd967
treedc4be5522c37fbc0622587a4382a16f546147159
parent17295a6760d551958a773a8342cff03630f3bff8
samples: add Rust examples

A set of Rust modules that showcase how Rust modules look like
and how to use the abstracted kernel features.

These samples also double as tests in the CI.

The semaphore sample comes with a C version for comparison.

Co-developed-by: Alex Gaynor <alex.gaynor@gmail.com>
Signed-off-by: Alex Gaynor <alex.gaynor@gmail.com>
Co-developed-by: Finn Behrens <me@kloenk.de>
Signed-off-by: Finn Behrens <me@kloenk.de>
Co-developed-by: Wedson Almeida Filho <wedsonaf@google.com>
Signed-off-by: Wedson Almeida Filho <wedsonaf@google.com>
Co-developed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Co-developed-by: Sven Van Asbroeck <thesven73@gmail.com>
Signed-off-by: Sven Van Asbroeck <thesven73@gmail.com>
Co-developed-by: Gary Guo <gary@garyguo.net>
Signed-off-by: Gary Guo <gary@garyguo.net>
Co-developed-by: Boris-Chengbiao Zhou <bobo1239@web.de>
Signed-off-by: Boris-Chengbiao Zhou <bobo1239@web.de>
Co-developed-by: Ayaan Zaidi <zaidi.ayaan@gmail.com>
Signed-off-by: Ayaan Zaidi <zaidi.ayaan@gmail.com>
Co-developed-by: Milan Landaverde <milan@mdaverde.com>
Signed-off-by: Milan Landaverde <milan@mdaverde.com>
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
15 files changed:
samples/Kconfig
samples/Makefile
samples/rust/Kconfig [new file with mode: 0644]
samples/rust/Makefile [new file with mode: 0644]
samples/rust/rust_chrdev.rs [new file with mode: 0644]
samples/rust/rust_minimal.rs [new file with mode: 0644]
samples/rust/rust_miscdev.rs [new file with mode: 0644]
samples/rust/rust_module_parameters.rs [new file with mode: 0644]
samples/rust/rust_platform.rs [new file with mode: 0644]
samples/rust/rust_print.rs [new file with mode: 0644]
samples/rust/rust_random.rs [new file with mode: 0644]
samples/rust/rust_semaphore.rs [new file with mode: 0644]
samples/rust/rust_semaphore_c.c [new file with mode: 0644]
samples/rust/rust_stack_probing.rs [new file with mode: 0644]
samples/rust/rust_sync.rs [new file with mode: 0644]