Build a geohash R package using Rust

Поділитися
Вставка
  • Опубліковано 7 січ 2025

КОМЕНТАРІ • 7

  • @brentonbills5946
    @brentonbills5946 7 місяців тому

    Nice library 🎉.

  • @梁卓其-i2i
    @梁卓其-i2i 8 місяців тому

    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?

    • @josiahparry
      @josiahparry  8 місяців тому

      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
    @JordiRosell 8 місяців тому

    2:02, 16:19, etc What are you typing here to autocomplete typing? Is it some VS code Rust extension?

    • @josiahparry
      @josiahparry  8 місяців тому +1

      Are you referring to the type hints? That’s the inlay hints from the rust analyzer!

    • @JordiRosell
      @JordiRosell 8 місяців тому

      ​@@josiahparry yeah. I'm just starting / willing to start in rust, so this is why I ask newie questions.

    • @josiahparry
      @josiahparry  8 місяців тому +2

      @@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)