use_extendr: Set up a package for use with Rust extendr code

Description Usage Arguments Details Value

View source: R/use_extendr.R

Description

Create the scaffolding needed to add Rust extendr code to an R package. use_extendr() adds a small Rust library with a single Rust function that returns the string "Hello world!". It also adds wrapper code so this Rust function can be called from R with hello_world().

Usage

1
use_extendr(path = ".", quiet = getOption("usethis.quiet", FALSE))

Arguments

path

File path to the package for which to generate wrapper code.

quiet

Logical indicating whether any progress messages should be generated or not. Also checks the usethis.quiet option.

Details

To avoid possibly messing up your R package, use_extendr() will not do anything if either a directory src or a file R/extendr-wrappers.R is already present in your package source.

Value

A logical value (invisible) indicating whether any package files were generated or not.


rextendr documentation built on June 15, 2021, 5:06 p.m.