How does one document functions exported from rextendr::document() so the document is readable and can be a reference used in Rstudio? Seeing the arguments are referred to as C objects?
I'm not sure I follow with the last part of "arguments are referred to as C objects" There's a couple ways to do this. Personally, I like to write wrappers around my Rust functions so I can do better argument validation with {rlang}. So I use roxygen comments like normal. But you can also use roxygen comments in rust too!! You just add `///` which is a doc comment in rust. For example above the function write /// This is my function title /// /// this is my function description /// @param x a list /// @export
@@JordiRosell would a video on setting up VS Code for Rust help? TL;DR install the following extensions - rust-analyzer - Better Toml - todo tree (personal opinion on this one)
Nice library 🎉.
How does one document functions exported from rextendr::document() so the document is readable and can be a reference used in Rstudio? Seeing the arguments are referred to as C objects?
I'm not sure I follow with the last part of "arguments are referred to as C objects"
There's a couple ways to do this. Personally, I like to write wrappers around my Rust functions so I can do better argument validation with {rlang}. So I use roxygen comments like normal.
But you can also use roxygen comments in rust too!!
You just add `///` which is a doc comment in rust.
For example above the function write
/// This is my function title
///
/// this is my function description
/// @param x a list
/// @export
2:02, 16:19, etc What are you typing here to autocomplete typing? Is it some VS code Rust extension?
Are you referring to the type hints? That’s the inlay hints from the rust analyzer!
@@josiahparry yeah. I'm just starting / willing to start in rust, so this is why I ask newie questions.
@@JordiRosell would a video on setting up VS Code for Rust help?
TL;DR install the following extensions
- rust-analyzer
- Better Toml
- todo tree (personal opinion on this one)