examples/rust: Rename hello_rust to rust/baremetal

Summary:
- Renamed hello_rust example to rust/baremetal to better reflect its purpose
- Updated file headers and Makefile paths
- Maintained all existing Kconfig options and functionality
- Prepares for future Rust development patterns where Cargo will be the
mainstream approach, with baremetal demonstrating traditional build method
- Creates clearer structure for Rust examples as we expand Rust support

Impact:
- No functional changes to the example itself
- Better organization of Rust examples under examples/rust/
- Existing configurations using this example will continue to work
- Build system will now look for the example in the new location

Testing:
- Confirmed Kconfig options remain unchanged
- GitHub CI passed and local build tested

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
This commit is contained in:
Huang Qi 2025-01-14 22:53:02 +08:00 committed by Xiang Xiao
parent a3049aae56
commit 14fa7d2726
4 changed files with 6 additions and 5 deletions

View file

@ -7,7 +7,8 @@ config EXAMPLES_HELLO_RUST
tristate "\"Hello, Rust!\" example"
default n
---help---
Enable the \"Hello, Rust!\" example
Enable the \"Hello, Rust!\" example to show how to build
and run a baremetal Rust application with rustc.
if EXAMPLES_HELLO_RUST

View file

@ -1,5 +1,5 @@
############################################################################
# apps/examples/hello_rust/Make.defs
# apps/examples/rust/baremetal/Make.defs
#
# SPDX-License-Identifier: Apache-2.0
#
@ -21,5 +21,5 @@
############################################################################
ifneq ($(CONFIG_EXAMPLES_HELLO_RUST),)
CONFIGURED_APPS += $(APPDIR)/examples/hello_rust
CONFIGURED_APPS += $(APPDIR)/examples/rust/baremetal
endif

View file

@ -1,5 +1,5 @@
############################################################################
# apps/examples/hello_rust/Makefile
# apps/examples/rust/baremetal/Makefile
#
# SPDX-License-Identifier: Apache-2.0
#

View file

@ -1,5 +1,5 @@
/****************************************************************************
* apps/examples/hello_rust/hello_rust_main.rs
* apps/examples/rust/baremetal/hello_rust_main.rs
*
* SPDX-License-Identifier: Apache-2.0
*