Skip to content

doc: build local package #50

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
JosiahParry opened this issue Apr 12, 2025 · 2 comments
Open

doc: build local package #50

JosiahParry opened this issue Apr 12, 2025 · 2 comments

Comments

@JosiahParry
Copy link
Contributor

The vignette https://r-wasm.github.io/rwasm/articles/rwasm.html shows how to use build() to build an existing CRAN package or you can use a remote url. However, using build(".") to install a package as one would do with pak does not work.

It would be great if it could be documented how to build a package locally.

@JosiahParry
Copy link
Contributor Author

For further context / reproducibility, this is the workflow I've got going so far:

  • clone b64 and cd into it
  • mkdir output
  • docker pull ghcr.io/r-wasm/webr:main
  • docker run -it --rm -v ${PWD}/output:/output -w /output ghcr.io/r-wasm/webr:main R
install.packages("pak")
pak::pak("r-wasm/rwasm")

Now from here is where we would build the package. But each various invocation of build() i can come up with ends up with this error:

build("b64=local::.")
Error in if (startsWith(url, "file:")) "internal" else "libcurl" :
  missing value where TRUE/FALSE needed

@JosiahParry
Copy link
Contributor Author

Got it. So the approach here is to use a "normal" R session and build the tar.gz either with devtools::build() or R CMD build then inside of webR using rwasm::build("./path/to/pkg_ver.tar.gz")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant