toku-mac opened a new pull request, #3522:
URL: https://github.com/apache/nuttx-apps/pull/3522

   ## Summary
   
   This updates the Rust example Makefiles so Cargo builds participate in 
normal Make dependency tracking.
   
   The change adds a `RUST_CARGO_SRCS` helper in `tools/Rust.mk` to collect 
crate input files. The `hello` and `slint` Rust examples now use that file list 
as prerequisites for their generated static libraries.
   
   The examples also hook the generated Rust library into both `context` and 
`all`.
   As a result, editing Rust sources, manifests, build scripts, causes Cargo to 
rebuild when `make` is run again.
   
   ## Testing
   
   I confirm that changes are verified on local setup and works as intended:
   * Build Host(s): OS (macOS 26.5), CPU(Apple M1), compiler(Apple clang 
version 21.0.0)
   * Target(s): arch(sim)
   * Ensure your PATH environment variable is properly configured to allow 
execution of: menuconfig, olddefconfig, savedefconfig, and setconfig.
   * Use the Rust toolchain version prior to nightly-2026-04-29 to avoid errors 
related to 
lib/rustlib/src/rust/library/std/src/sys/net/connection/socket/unix.rs.
   
   Configuration and Build:
   
   ```
   make distclean
   ./tools/configure.sh sim:nsh
   make menuconfig
   # Quit using the `Q` command.
   
   printf 'CONFIG_SYSTEM_TIME64=y
   CONFIG_FS_LARGEFILE=y
   CONFIG_TLS_NELEM=16
   CONFIG_DEV_URANDOM=y
   CONFIG_EXAMPLES_HELLO_RUST_CARGO=y
   CONFIG_EXAMPLES_HELLO_RUST_CARGO_STACKSIZE=8192
   ' >> .config
   
   make olddefconfig
   make
   
   LN: platform/board to /Users/toku/nuttxspace/apps/platform/dummy
   Register: gpio
   Register: hello
   Register: hello_rust_cargo
   Register: dd
   Register: dumpstack
   Register: nsh
   Register: sh
   Register: ostest
   CP:  /Users/toku/nuttxspace/nuttx/include/nuttx/config.h
   CP:  /Users/toku/nuttxspace/nuttx/include/nuttx/fs/hostfs.h
   Building Rust code with cargo...
       Finished `dev` profile [unoptimized + debuginfo] target(s) in 1.26s
   LD:  nuttx
   ld: warning: -ld_classic is deprecated and will be removed in a future 
release
   ld: warning: -ld_classic is deprecated and will be removed in a future 
release
   ```
   
   ## PR verification Self-Check
   
   * [x] My PR adheres to Contributing 
[Guidelines](https://github.com/apache/nuttx/blob/master/CONTRIBUTING.md) and 
[Documentation](https://nuttx.apache.org/docs/latest/contributing/index.html) 
(git commit title and message, coding standard, etc).
   * [x] My PR is ready for review and can be safely merged into a codebase.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to