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>
Mon, 17 Jan 2022 02:24:19 +0000 (03:24 +0100)
commitaea6c5d53e0cce73fb4705c20de141ebc589036a
tree3fd6c7b7ca28cce8f9cabeaa5b29202c2f5a0c03
parent5d287d7e9c9bd455f8eb9abf80f320927433e168
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]