README.md

Calling rust from R

Duncan wrote a small demonstrator of writing rust code, compiling it and dynamically loading it into R. This package acts as a demonstrator of fitting rust code inside an R package, and how seamless the result can look for the end user.

Dependencies

At the moment, crater has a lot of dependencies on Duncan's old, variably-available bindings and foreign function interfaces - it's not intended to be production ready and in fact we probably need to do a lot to rebuild those FFIs before it could be. But you'll need:

  1. Rffi and libffi
  2. RAutoGenRuntime
  3. rust

Use

devtools::install_github("ironholds/crater")
library(crater)
multiply_by_100(12)
multiply_by_10(12)


Ironholds/crater documentation built on May 7, 2019, 6:39 a.m.