[R-pkg-devel] Best way to build CRAN packages that include Rust source?

David Norris d@v|d @end|ng |rom prec|@|onmethod@@guru
Mon May 3 20:43:48 CEST 2021


I am appreciating 2 distinct approaches currently used to compile Rust code in R packages:

1. LinkingTo: cargo, as done in https://CRAN.R-project.org/package=salso

2. A more ‘traditional’-looking approach built on Autoconf & Automake https://CRAN.R-project.org/package=gifski

Is there any reason why one or the other would be preferred for a CRAN submission?
Would one or the other design better facilitate Rust’s eventual elevation to ‘first-class’ status (like C++, Fortran) for compiling code in R packages?

In favor of (1), it seems to me that the “Reverse linking to:” entry at https://CRAN.R-project.org/package=cargo nicely advertises packages that use Rust, which could be useful for example code, etc.
In favor of (2), it seems completely idiomatic—and so potentially more conducive to achieving first-class status for Rust.


	[[alternative HTML version deleted]]



More information about the R-package-devel mailing list