-
Notifications
You must be signed in to change notification settings - Fork 33
Closed
Description
Currently when running R CMD CHECK on a repository using extendr, it flags up a NOTE on package size:
* checking installed package size ... NOTE
installed size is 6.6Mb
sub-directories of 1Mb or more:
libs 6.2Mb
This libs directory refers to the directory where the compiled Rust code is stored as a .dll or .so file. Rust by default generates huge executables, and the size can be reduced to no longer create the issue by adding some compiler options (here added to Cargo.toml, as in PR #226 ):
[profile.release]
opt-level = 'z'
lto = true
While this isn't generally an issue for extendr use, it is an issue for users who prefer/require their packages to be available on CRAN - R CMD CHECK is expected to return no errors, warnings or notes whatsoever. There are a couple choices I'd consider:
- adding these compiler options, as in added optimisations to Cargo.toml #226 - in particular,
ltofeels like a 'safe' option to add (in C++ projects it's pretty standard at this point). - add some information for those who would like to add packages to CRAN (such as in r-rust/faq for those who would like to upload to CRAN. make this FAQ more visible from the extendr page.
Metadata
Metadata
Assignees
Labels
No labels