Savvy - A simple R extension interface using Rust
savvy is a simple R extension interface using Rust, like the
extendr framework. The name “savvy” comes
from the Japanese word “錆” (pronounced as sàbí
), which means “Rust”.
With savvy, you can automatically generate R functions from Rust code. This is an example of what a savvy-powered function would look like:
Rust
use savvy;
/// Convert to Upper-case
///
/// @param x A character vector.
/// @export
R
#> [1] "A" "B" "C"
Documents
- user guide
- savvy 入門 (Japanese)
Contributing
Examples
A toy example R package can be found in R-package/
directory.
Savvy is used in the following R packages:
Thanks
Savvy is not quite unique. This project is made possible by heavily taking inspiration from other great projects:
- The basic idea is of course based on extendr. Savvy would not exist without extendr.
- cpp11’s “writable” concept influenced the design a lot. Also, I learned a lot from the great implementation such as the protection mechanism.
- PyO3 made me realize that the FFI crate doesn’t need to be a “sys” crate.