extendr / rextendr

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

Document i32 and f64 as copied values from R #345

Open latot opened 3 months ago

latot commented 3 months ago

Hi, actually when we use a function like:

rust_function("fn add(a:f64, b:f64) -> f64 { a + b }")

The values a and b are copied, but if we interpret it from Rust, we would think the library moved the values from R to Rust, so they should not be available now.

An option would be document this behavior, other one, which I think is a lot more clear is use &i32 and &f64.

Thx!