Skip to content
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

How to compile webr with the needed packages #393

Open
isbool opened this issue Mar 27, 2024 · 1 comment
Open

How to compile webr with the needed packages #393

isbool opened this issue Mar 27, 2024 · 1 comment
Labels
question Further information is requested

Comments

@isbool
Copy link

isbool commented Mar 27, 2024

Hey,
I saw this

WebR packages must be installed before use, which in practice means copying binaries into the webR virtual filesystem in some way, either as part of the webR build process or during runtime by downloading packages from a repository or mounting filesystem data.

I wanted to ask if its possible / or how to compile maybe webr with the libraries, to improve performance in the sense that they wont have to get mounted or loaded each time.

Lets say that in my app in / public i have a /r-scripts directory and a /libraries directory (that has folders of extracted packages)

i tried making a .data and .js file with file_packer but i cant seem to connect it successfully , would it be possible for you to give us an example of mounting .R scripts and libraries?

Also i wanted to ask if its possible that you could create a discord server or a slack server of the people involved here.

thanks for your time

@georgestagg
Copy link
Member

I wanted to ask if its possible / or how to compile maybe webr with the libraries.

Yes, if you compile webR from source you can either place extracted webR binary packages in the source directory packages, or set the environment variable WEBR_LIB to point to a directory containing extracted binary packages. In either case the packages should be bundled in the resulting default virtual filesystem and available by default.

I tried making a .data and .js file with file_packer but i cant seem to connect it successfully

Please try working through the documentation here: https://r-wasm.github.io/rwasm/articles/mount-fs-image.html
Let me know if you're unable to make the specific instructions at that URL work, and I'll take a closer look at any issues you come across.

Also i wanted to ask if its possible that you could create a discord server or a slack server of the people involved here.

I'm not entirely sure about an external service such as Discord or Slack. Such things often require a significant effort in maintenance and administration. Currently the best place to ask questions is GitHub Issues, but as the webR community grows and discussion expands I might enable the Discussions tab in GitHub for this repo, with the caveat that it will be monitored less than the Issues section.

@georgestagg georgestagg added the question Further information is requested label Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants