@r-universe/webr 0.1.2-dev → 2023.4.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -39
- package/dist/R.bin.data +346 -365
- package/dist/R.bin.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,43 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
# webr bundle for r-universe
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
This project aims to compile the statistical language R (https://www.r-project.org/) into WebAssembly for use with a browser, via Emscripten (https://emscripten.org/). The repo includes patches to R's source code so that it can work in the browser environment provided by Emscripten and also includes a web-based REPL through the use of [xterm.js](https://xtermjs.org/).
|
|
3
|
+
Custom build of [webr](https://github.com/r-wasm/webr) used in r-universe. Published to: https://www.npmjs.com/package/@r-universe/webr
|
|
5
4
|
|
|
6
|
-
##
|
|
7
|
-
A demo of the resulting R REPL can be found at https://webr.r-wasm.org/latest/. Please be patient as the Wasm runtime downloads and executes. R will display a banner message when it is ready to use.
|
|
5
|
+
## Extra packages:
|
|
8
6
|
|
|
9
|
-
|
|
10
|
-
Documentation showing how to use webR in your own projects can be found at
|
|
11
|
-
https://docs.r-wasm.org/webr/latest/
|
|
7
|
+
This bundle contains the following packages preinstalled:
|
|
12
8
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
Complete release packages, including R WebAssembly binaries, are available to download for self hosting in the [GitHub Releases section](https://github.com/r-wasm/webr/releases).
|
|
17
|
-
|
|
18
|
-
## Building webR from source
|
|
19
|
-
R's source code and supporting libraries are written in both C/C++ and Fortran. Source files can be compiled with either a [custom development version of LLVM flang](https://github.com/lionel-/f18-llvm-project/commits/fix-webr) (the default) or with gfortran and Dragonegg (using the `--with-dragonegg` configure option).
|
|
20
|
-
|
|
21
|
-
If you are compiling webR using the default toolchain, ensure that you first install the following required prerequisites:
|
|
22
|
-
* [Emscripten SDK](https://emscripten.org/docs/getting_started/downloads.html) (>=3.1.25)
|
|
23
|
-
* cmake
|
|
24
|
-
* gperf
|
|
25
|
-
* liblzma
|
|
26
|
-
* libpcre2
|
|
27
|
-
* node (>=16.0.0)
|
|
28
|
-
* quilt
|
|
29
|
-
* wget
|
|
30
|
-
|
|
31
|
-
If you are compiling webR using Dragonegg, included in the source repository is a `Dockerfile` which can be used to setup the environment and Dragonegg toolchain.
|
|
32
|
-
|
|
33
|
-
### Build instructions
|
|
34
|
-
|
|
35
|
-
Clone the repo into a new directory, `cd` into the directory, then run `./configure && make`. You can configure `make` variables in a `~/.webr-config.mk` file.
|
|
36
|
-
|
|
37
|
-
A `dist` directory is created which when finished contains the R Wasm files and an `index.html` file ready to serve the included R REPL app.
|
|
38
|
-
|
|
39
|
-
### Building on macOS Ventura 13.0+
|
|
40
|
-
|
|
41
|
-
At the time of writing the version of R used as the base for webR does not build cleanly using the macOS Ventura development SDK. If you are not using the included `Dockerfile` to build webR, the following extra setup must be done before starting the build process,
|
|
42
|
-
|
|
43
|
-
* Install the GNU version of the patch program: e.g. `brew install gpatch`
|
|
9
|
+
- jsonlite
|
|
10
|
+
- writexl
|