r-rust / hellorust

Template R package with rust bindings
Other
259 stars 20 forks source link

Availability of rust/cargo in the R ecosystem #6

Closed clauswilke closed 4 years ago

clauswilke commented 4 years ago

I'm seriously considering using Rust for an R package, but before I embark on this project I'd find it helpful if you could provide some clarifications of when and where I can assume cargo is available. I can use the template provided here to create an R package that I can build on my own machine, but can I then also submit this to CRAN? The gifski package is on CRAN, so I assume the answer is "yes", but I haven't been able to find any documentation that affirms this.

Also, related, if rust is generally available, which version(s) can I rely on? And can I assume it's available on all architectures CRAN supports, or only on some?

jeroen commented 4 years ago

I obviously cannot speak for CRAN. My experience is that rust / cargo is installed on the cran Linux check servers. The version they use is the one that ships with Fedora / Debian:

The last time I checked, rust was also installed on the Mac builder, but I can't say this for sure because the server was cleaned recently. You would need to ask in r-sig-mac.

I'm quite sure cargo is not available on the cran windows machines. You can easily test this yourself via the public winbuilder: https://win-builder.r-project.org/

As a workaround, for the CRAN version of gifski I am using recompiled binaries from rwinlib.

clauswilke commented 4 years ago

Thanks for the information! You may want to add this to the README, since it's a major impediment to anybody who isn't in a position to provide recompiled windows binaries for their rust code.

jeroen commented 4 years ago

It will get there, we just need to be patient.

Providing precompiled binaries is really easy, you can just store the binaries from an appveyor build of your R package and publish them on any webserver.