build_for_cran {cargo} | R Documentation |
Build a Source Package for Submission to CRAN
Description
This function builds a source package in preparation for submission to
The Comprehensive R Archive Network (CRAN).
and saved it in the root of a package.
In particular, Rust crates upon which the package depends are “vendored”
within the source package in the archive file src/rust/vendor.tar.xz
, so
that lacking internet access will not give a check warning nor error on CRAN.
The package's configure
script tests for the existence of this archive
file and, when present, runs Cargo (Rust's package manager) in compliance with the
CRAN Repository Policies
in that Cargo will only use two CPU cores and will clean-up cached values (i.e.,
remove detritus).
Usage
build_for_cran(...)
Arguments
... |
Options passed to |
Details
Since depending crates are vendored, the authorship and copyright must be
declared in the DESCRIPTION
file prior to building the source package
for CRAN. See the authors
function for help in attribution.
This function will rebuild roxygen2 documentation if the DESCRIPTION file indicates that roxygen2 is used and the package is installed.
This function does not test the package. The developer is strongly encouraged to both inspect and test the package before submitting to CRAN.
Value
The exit status codeR CMD build, invisibly.