andrie,
@andrie@fosstodon.org avatar

CRAN has published a policy for using code in an package. https://cran.r-project.org/web/packages/using_rust.html

jonthegeek,
@jonthegeek@fosstodon.org avatar

@andrie As someone who's been thinking about learning specifically for use in packages (but who has not yet done so and thus isn't sure about what things in this post mean)... how chilling is this? Does this make it really hard to use Rust, slightly hard, or is this just best practice anyway?

brodriguesco,
@brodriguesco@fosstodon.org avatar

@jonthegeek @andrie I don’t know Rust nor I plan to learn it, but what is said in that document seems reasonable to me.

andrie,
@andrie@fosstodon.org avatar

@brodriguesco @jonthegeek I've used just enough Rust to be able to write some apps, but haven't yet used Rust inside an R package of my own.
That said, the policy seems reasonable to me. Somebody who might have a strong view on this is @josiah , author of the {valve} package that wraps Rust.

josiah,

@brodriguesco @jonthegeek @andrie it makes it almost impossible to publish rust based packages on CRAN. Polars will never be on CRAN with this policy. This is like saying you have to include the source code for all R packages you depend upon (and their deps) inside the tarball of your R package. It’s 100% unreasonable and untenable

josiah,

@jonthegeek @brodriguesco @andrie another way of thinking about this is like not being able to get your dependencies from CRAN and having CRAN handle them. They’re essentially saying they will not use the Rust package manager

josiah,

@jonthegeek @brodriguesco @andrie they can, though, choose to vendor their own “trusted” cargo crates but that would be silly. A better solution would be to only allow crates directly from crates.io limiting what internet conns are available during build time (which I think they already do?)

josiah,

@jonthegeek @brodriguesco @andrie at the end of the day this is a bad move for the health and longevity of R as a language. Rust in R packages will be as revolutionary, if not more, than Rcpp is/was.

eitsupi,
@eitsupi@fosstodon.org avatar

@josiah @jonthegeek @brodriguesco @andrie FYI, prqlr, one of the package currently on CRAN that contains the Rust source code, has only very simple functionality, but when bundled with the Rust dependencies, its size is 12 MB even at the highest level of compression and does not fit within the 10 MB limit.

I agree that the 10MB limit is unrealistic.
The script used for the bundle can be found here.
https://github.com/eitsupi/prqlr/pull/152

brodriguesco,
@brodriguesco@fosstodon.org avatar

@josiah @jonthegeek @andrie but they also say that the code could be downloaded, so isn’t that an option then?

josiah,

@jonthegeek @andrie @brodriguesco you’d have to create an entirely new build process for rust crates that isn’t supported by rust. Seems untenable imo

rmflight,
@rmflight@mastodon.social avatar

@josiah @jonthegeek @andrie @brodriguesco Yep. It seems weird. One should be able to install the underlying software using the normal process supported by the language. For rust, that's installing the dependencies (crates) from the web. Just because rust uses a different repository structure than CRAN, doesn't mean its bad.

brodriguesco,
@brodriguesco@fosstodon.org avatar

@rmflight @josiah @jonthegeek @andrie interesting thanks! but how is that handled with other languages? Does the code get systematically bundled then?

etam,
@etam@im-in.space avatar

@josiah @jonthegeek @andrie @brodriguesco
That's not entirely true. For example openSUSE build service builds packages for openSUSE Linux distribution in an offline environment. No matter if it's Rust or Go, it cannot download dependencies from the internet during build time. Using "cargo vendor" or "go vendor" is normal in such places.

josiah,

@andrie @jonthegeek @etam @brodriguesco “Source package tarballs should if possible not exceed 10MB” is the part of the CRAN policy that makes this reallyyyy challenging

heaths,
@heaths@fosstodon.org avatar

@brodriguesco @jonthegeek @andrie Even "CRAN does not regard github.com ... as sufficiently reliable."?

As a fully-funded and supported entity on which so much more already depends, I'd put more trust in github.com.

brodriguesco,
@brodriguesco@fosstodon.org avatar

@heaths @jonthegeek @andrie that indeed surprised me, but I guess the issue is that there’s no long term archive of any code. So if a repo gets deleted, it’s over. I guess that might be the issue?

heaths,
@heaths@fosstodon.org avatar

@brodriguesco @jonthegeek @andrie That's a good point. Perhaps the lack of trust is more on the repo than the site. Thank you for your perspective!

  • All
  • Subscribed
  • Moderated
  • Favorites
  • rust
  • ethstaker
  • DreamBathrooms
  • InstantRegret
  • tacticalgear
  • magazineikmin
  • Youngstown
  • thenastyranch
  • mdbf
  • slotface
  • rosin
  • modclub
  • kavyap
  • cubers
  • osvaldo12
  • megavids
  • khanakhh
  • cisconetworking
  • Durango
  • everett
  • ngwrru68w68
  • Leos
  • normalnudes
  • GTA5RPClips
  • tester
  • provamag3
  • anitta
  • JUstTest
  • lostlight
  • All magazines