r-wasm / rwasm

Build R packages for WebAssembly and create a CRAN-like repo for distribution.
https://r-wasm.github.io/rwasm/
Other
54 stars 4 forks source link

Restrict building webR binaries to a specific version, e.g. v0.3.3 #33

Closed coatless closed 3 months ago

coatless commented 3 months ago

When building an R WASM binary with rwasm, the latest version of the webR repo is used. This usually is fine except when the portions between R and webR release differ, e.g. R 4.4.0 != R 4.3.3.

So, when attempting to install from a custom repository via install.packages() or webr::install(), there is an issue with retrieving the R/4.3 directory as it isn't built since the R version used for the compilation is R/4.4

georgestagg commented 3 months ago

It should be possible to build R packages for an older version of webR by following the Getting Started Docker Instructions, but replacing the given tag main with an older tagged version, e.g. v0.3.3, available in the list of released webR docker containers.

If using r-wasm/actions, rather than building locally, the Docker container can be set using the webr-image parameter. See https://github.com/r-wasm/actions/issues/22 for further info.

coatless commented 3 months ago

Ahh, wonderful! Missed the webr-image option :'(