extendr / rextendr

An R package that helps scaffolding extendr-enabled packages or compiling Rust code dynamically
https://extendr.github.io/rextendr/
Other
186 stars 27 forks source link

Support extendr options in rust_function() #131

Closed yutannihilation closed 1 year ago

yutannihilation commented 3 years ago

I think we should wait until we figure out what kind of macro options are provided, but the feature needs to be supported on rust_function() for consistency anyway.

e.g.

rust_function(
  r"(
fn test_i32(val: i32) -> i32 {
    val
}
)",
  extendr_macro_options = list(use_try_from = TRUE),
  patch.crates_io = list(`extendr-api` = list(git = "https://github.com/extendr/extendr"))
)