This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git


The following commit(s) were added to refs/heads/master by this push:
     new 14fa7d272 examples/rust: Rename hello_rust to rust/baremetal
14fa7d272 is described below

commit 14fa7d27269cb088035d4a0ec34636b178a76eee
Author: Huang Qi <[email protected]>
AuthorDate: Tue Jan 14 22:53:02 2025 +0800

    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 <[email protected]>
---
 examples/{hello_rust => rust/baremetal}/Kconfig            | 3 ++-
 examples/{hello_rust => rust/baremetal}/Make.defs          | 4 ++--
 examples/{hello_rust => rust/baremetal}/Makefile           | 2 +-
 examples/{hello_rust => rust/baremetal}/hello_rust_main.rs | 2 +-
 4 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/examples/hello_rust/Kconfig b/examples/rust/baremetal/Kconfig
similarity index 84%
rename from examples/hello_rust/Kconfig
rename to examples/rust/baremetal/Kconfig
index 92e3b1f34..a1b391bee 100644
--- a/examples/hello_rust/Kconfig
+++ b/examples/rust/baremetal/Kconfig
@@ -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
 
diff --git a/examples/hello_rust/Make.defs b/examples/rust/baremetal/Make.defs
similarity index 91%
rename from examples/hello_rust/Make.defs
rename to examples/rust/baremetal/Make.defs
index 7cb3099d2..9ea1b9f9f 100644
--- a/examples/hello_rust/Make.defs
+++ b/examples/rust/baremetal/Make.defs
@@ -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
diff --git a/examples/hello_rust/Makefile b/examples/rust/baremetal/Makefile
similarity index 97%
rename from examples/hello_rust/Makefile
rename to examples/rust/baremetal/Makefile
index b1ac1824c..55e98ce7b 100644
--- a/examples/hello_rust/Makefile
+++ b/examples/rust/baremetal/Makefile
@@ -1,5 +1,5 @@
 ############################################################################
-# apps/examples/hello_rust/Makefile
+# apps/examples/rust/baremetal/Makefile
 #
 # SPDX-License-Identifier: Apache-2.0
 #
diff --git a/examples/hello_rust/hello_rust_main.rs 
b/examples/rust/baremetal/hello_rust_main.rs
similarity index 98%
rename from examples/hello_rust/hello_rust_main.rs
rename to examples/rust/baremetal/hello_rust_main.rs
index fa24671cd..3d7a3eceb 100644
--- a/examples/hello_rust/hello_rust_main.rs
+++ b/examples/rust/baremetal/hello_rust_main.rs
@@ -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
  *

Reply via email to