xiaoxiang781216 commented on a change in pull request #1021:
URL: 
https://github.com/apache/incubator-nuttx-apps/pull/1021#discussion_r813116368



##########
File path: examples/hello_rust/hello_rust_main.rs
##########
@@ -33,6 +40,20 @@ extern "C"
     pub fn printf(format: *const u8, ...) -> i32;
 }
 
+/****************************************************************************
+ * Private functions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Panic handler (needed for [no_std] compilation)

Review comment:
       > Definitely a good point. I followed the NuttX style to have a starting 
point, knowing, that this is most likely no the best solution.
   > 
   > May I ask you to provide more details, so we can go a step ahead on this 
point:
   > 
   > * Is there a good official documentation on the Rust style, we can 
reference in NuttX?
   
   No, NuttX just define C/C++ style
   
   > * Can we check this, similar to checkpatch.sh and can be used in CI?
   
   Yes, we can modify nuttx/tools/checkpatch.sh to check the suffix and invoke 
rustfmt for *.rs.
   
   > * Is the rust style compatible to current NuttX style, checked from 
checkpatch.sh?
   
   Since rust toolchain contain rustfmt which mean rust has the authoritative 
style guide we should be followed.




-- 
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: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to