apps/cmake: Make hello_rust_cargo buildable with cmake#3479
Conversation
* Resolve APPDIR. * Remove "debug" from RUST_PROFILE_FLAG. * Add JSON specification compatibility to RUST_PROFILE_FLAG. * Correct the directory structure for RUST_LIB_PATH. Signed-off-by: Shoji Tokunaga <toku@mac.com>
|
@no1wudi Could you help to review this PR? Thanks :-) |
|
@toku-mac The CI Check failed with this error: https://github.com/apache/nuttx-apps/actions/runs/25782691618/job/75736117186?pr=3479#step:4:84 Could you remove the Execute Permission from nuttx_add_rust.cmake? Thanks :-) |
|
Sorry, can you check commit 89b0558? |
* Correct the permissions of `nuttx_add_rust.cmake` to 644. Signed-off-by: Shoji Tokunaga <toku@mac.com>
|
@toku-mac Sorry there's a CMake formatting problem: https://github.com/apache/nuttx-apps/actions/runs/25786185066/job/75745216835?pr=3479#step:4:85 Could you run this then commit the the updated CMakefile, remember to add "Signed-off-by" to the commit: cd cmake
python3 -m venv .
source ./bin/activate
python3 -m pip install cmake-format
cmake-format nuttx_add_rust.cmake -o nuttx_add_rust.cmakeHere are the changes: |
* Apply cmake-format. Signed-off-by: Shoji Tokunaga <toku@mac.com>
|
Sorry to bother you again. |
|
Yep NuttX CI is happy now thanks :-) |
| set(RUST_PROFILE "release") | ||
| set(RUST_PANIC_FLAGS "-Zunstable-options -Cpanic=immediate-abort") | ||
| else() | ||
| set(RUST_PROFILE_FLAG "-Zjson-target-spec") |
There was a problem hiding this comment.
is it really needed for non x86 target?
There was a problem hiding this comment.
Yes, currently APPDIR is only required for "x86_64" and "x86" architectures.
Should I put it inside the if hierarchy?
There was a problem hiding this comment.
I guess if it's essential for x86 target and acceptable for other targets, you can move it to line 166 instead of dup them here?
|
@toku-mac While you're making changes, please squash all commits into One Single Commit. Thanks :-) |
Summary
Impact
Testing
I confirm that changes are verified on local setup and works as intended:
Configuration:
Testing logs before change:
Testing logs after change:
PR verification Self-Check