r-wasm / webr

The statistical language R compiled to WebAssembly via Emscripten, for use in web browsers and Node.
https://docs.r-wasm.org/webr/latest/
Other
805 stars 54 forks source link

How to make it work webR editor by cloning repository. #395

Closed minhaj57sorder closed 2 months ago

minhaj57sorder commented 3 months ago

I want to be able to run webR editor on my local server and then customize the UI for my website where user will write R code and get output similar to R web editor. I cloned the repository and try to run react code but it failed. Could you give me solution or steps to follow?

georgestagg commented 3 months ago

I cloned the repository and try to run react code but it failed

Can you be more specific, what exactly did you try and what exactly went wrong?

The app at src/repl/App.tsx relies on a local copy of webR built from source. The instructions to build webR from source are here: https://github.com/r-wasm/webr?tab=readme-ov-file#building-webr-from-source

Note that this will build LLVM flang from scratch, which takes a lot of resources and a long time. If this a problem, a Docker image containing LLVM flang is also provided. See here for details.

minhaj57sorder commented 2 months ago

Your instruction is pretty obvious. It failed because I didn't install other dependencies.

Thanks for your help.