Description Usage Arguments Details References See Also Examples
Create a skeleton for a new source package with Rust support.
1 2 3 4 | rustr_init(name, path = ".", force = FALSE, code_files = character(),
rust_files = character(), author = "Your Name", maintainer = if
(missing(author)) "Your Name" else author, email = "your@email.com",
license = "MIT")
|
name |
A character string: the package name and directory name for your package. |
path |
A path to put the package directory in. |
force |
See package.skeleton |
code_files |
See package.skeleton |
rust_files |
A character vector with the paths to Rust source files to add to the package. |
author |
Author of the package. |
maintainer |
Maintainer of the package. |
email |
Email of the package maintainer. |
license |
License of the package. |
There is a folder name rustlib
in the created package src
path. This folder is a rust library which will be compiled and linked by R. Just write Rust code in ./src/rustlib/src/
.
./src/rustlib/src/export.rs
, ./src/REXPORT.c
and ./R/REXPORT.R
are generated by rustrize()
, and they should not be edited by hand. Before building the package, run rustrize()
to generate these three files.
Read the Writing R Extensions manual for more details.
https://book.rustr.org/create-a-rust-r-package.html
1 2 3 4 5 | ## Not run:
rustr_init("test-pkg")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.