[R-pkg-devel] R, Rust and CRAN

Simon Urbanek @|mon@urb@nek @end|ng |rom R-project@org
Sat Nov 12 00:49:05 CET 2022


Florian,

this does not directly address your question, but I think it would make a lot of sense to standardize the process, given how many issues there were with packages using Rust (mainly not detecting compilers correctly, not supplying source code, unsolicited writing into user's directories, not checking binaries etc.). Doing this right is not entirely trivial which is presumably where the "friction" comes from. I'm not a Rust user myself, but just based on the other languages that have interfaces from R I would think that Rust users could coalesce and write a package that does the heavy lifting and can be used by packages that contain Rust code as a foundation - that's what most other language interfaces do. (It's quite possible that some of the projects you listed would be a good start). I would not recommend putting that burden onto each package author as it screams maintenance nightmare.

Cheers,
Simon


> On Nov 12, 2022, at 12:31 AM, Florian Rupprecht <floruppr using gmail.com> wrote:
> 
> Hi all,
> 
> Are there any current recommendations on integrating Rust (and Cargo, its
> official package manager) in an R package complying to CRAN's policies?
> 
> To be clear: This question is not about how to integrate Rust in the
> package, it is about how to do it without creating friction with the CRAN
> team and infrastructure. I want to write the Rust-C-R interface and build
> scripts myself.
> 
> To me, Rust seems like a very good fit for R interop as it has a native C
> FFI, and has address and UB safety guarantees that top the strictest C++
> compiler warnings. However Rust's standard library is very small by design,
> so Cargo integration would be needed.
> 
> I know there is:
> 
> - rextendr (https://cran.r-project.org/package=rextendr):
> I don't think there is a package using this on CRAN yet.
> 
> - cargo-framework (https://CRAN.R-project.org/package=cargo)
> Removed from CRAN.
> 
> - r-rust/gifski (https://cran.r-project.org/package=gifski)
> Downloads precompiled binaries on windows for CRAN (which is, as I
> understand it, strongly discouraged for a number of reasons:
> https://stat.ethz.ch/pipermail/r-devel/2022-September/082027.html).
> 
> Thank you very much for your time,
> Florian
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-package-devel using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel
> 



More information about the R-package-devel mailing list