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.
Hi, actually when we use a function like:
The values
a
andb
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!