{"_id":"@henrikbengtsson/rw","_rev":"26-aa08fe73ef89dd66a8e67b67968e3b57","name":"@henrikbengtsson/rw","dist-tags":{"latest":"0.0.406"},"versions":{"0.0.9":{"name":"@henrikbengtsson/rw","version":"0.0.9","keywords":["webR","wasm","R","statistics","programming","webassembly","emscripten","cli"],"author":{"name":"Henrik Bengtsson"},"license":"MIT","_id":"@henrikbengtsson/rw@0.0.9","maintainers":[{"name":"henrikbengtsson","email":"henrik.bengtsson@gmail.com"}],"homepage":"https://github.com/HenrikBengtsson/rw","bugs":{"url":"https://github.com/HenrikBengtsson/rw/issues"},"bin":{"rw":"index.js"},"dist":{"shasum":"e5eb1066ddc367e85798370c8af9ccbbf4c2ddff","tarball":"https://registry.npmjs.org/@henrikbengtsson/rw/-/rw-0.0.9.tgz","fileCount":3,"integrity":"sha512-Fcn1sAXiQli7OiVFxy4qy62JNB2ogiAiRFSJkAJclEKu3AH1/GBxWUYYOSR8DeU5OX+e4AKgYFG1AG2bgH2cTg==","signatures":[{"sig":"MEQCIFK5BeByNpnWpt6LZWxVrXoBlji/s0Lt0XFlP4MwE/WnAiA3t/2/wz20nodagKP0WvZaOet8H8zUfw5nm5lLPUYQkw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":23109},"main":"index.mjs","type":"module","gitHead":"686e572e2e2caa8666b0403be39e392761cb7c41","_npmUser":{"name":"henrikbengtsson","email":"henrik.bengtsson@gmail.com"},"repository":{"url":"git+https://github.com/HenrikBengtsson/rw.git","type":"git"},"_npmVersion":"11.6.2","description":"Run Rscript within WebAssembly (WASM) via node.js","directories":{},"_nodeVersion":"24.12.0","dependencies":{"ws":"^8.18.3","webr":"^0.5.8"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/rw_0.0.9_1766191605721_0.5470732073107392","host":"s3://npm-registry-packages-npm-production"}},"0.0.10":{"name":"@henrikbengtsson/rw","version":"0.0.10","keywords":["webR","wasm","R","statistics","programming","webassembly","emscripten","cli"],"author":{"name":"Henrik Bengtsson"},"license":"MIT","_id":"@henrikbengtsson/rw@0.0.10","maintainers":[{"name":"henrikbengtsson","email":"henrik.bengtsson@gmail.com"}],"homepage":"https://github.com/HenrikBengtsson/rw","bugs":{"url":"https://github.com/HenrikBengtsson/rw/issues"},"bin":{"rw":"index.js"},"dist":{"shasum":"d65e34ce68d2fa563d16e3cf84d808ace5d7a56e","tarball":"https://registry.npmjs.org/@henrikbengtsson/rw/-/rw-0.0.10.tgz","fileCount":3,"integrity":"sha512-0pVkwimWwnsQP5lBcE14N2WvndBP6BCoyHSCKCdMWoRjDIKGcLizqASlRRU+AzrPY7eE2p4U3zmyJN00SAr+vA==","signatures":[{"sig":"MEUCIGbSgn8BzyX9UOGWTBcQHO1HM1wXEK6IkaF8WRvc4I/3AiEA1OhYOc1YoEgJqw8eZilS7goJocaevXm5fPh1whbH7Z8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":25118},"main":"index.mjs","type":"module","gitHead":"0c59e2fae5c0012a09fa85358fce3156275490c6","_npmUser":{"name":"henrikbengtsson","email":"henrik.bengtsson@gmail.com"},"repository":{"url":"git+https://github.com/HenrikBengtsson/rw.git","type":"git"},"_npmVersion":"11.6.2","description":"Run Rscript within WebAssembly (WASM) via node.js","directories":{},"_nodeVersion":"24.12.0","dependencies":{"ws":"^8.18.3","webr":"^0.5.8"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/rw_0.0.10_1766794665279_0.12009426993306782","host":"s3://npm-registry-packages-npm-production"}},"0.0.15":{"name":"@henrikbengtsson/rw","version":"0.0.15","keywords":["webR","wasm","R","statistics","programming","webassembly","emscripten","cli"],"author":{"name":"Henrik Bengtsson"},"license":"MIT","_id":"@henrikbengtsson/rw@0.0.15","maintainers":[{"name":"henrikbengtsson","email":"henrik.bengtsson@gmail.com"}],"homepage":"https://github.com/HenrikBengtsson/rw","bugs":{"url":"https://github.com/HenrikBengtsson/rw/issues"},"bin":{"rw":"index.js"},"dist":{"shasum":"8ea504b7b64fee3dd5711e8da6d94b5182c02441","tarball":"https://registry.npmjs.org/@henrikbengtsson/rw/-/rw-0.0.15.tgz","fileCount":3,"integrity":"sha512-TdTToIcMolE8PSK6pvfPxXC+meVAyDdYhbJoKmHlaNjk3NblS/cwkwhrFndqjwxFmeF9SflG5g8NB2hTj6rkkw==","signatures":[{"sig":"MEUCIEAO1cePTUtZ4Ms+g1hPVjTd5zIZ3whquDFp/oe73InYAiEA0cEpZGm0FRxJpvz+tMRgqv6yT0PrH1LFTMqo6YCK4Vw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":25471},"main":"index.mjs","type":"module","gitHead":"a193f667aa767b6d471b5b76eeade2fe35113882","_npmUser":{"name":"henrikbengtsson","email":"henrik.bengtsson@gmail.com"},"repository":{"url":"git+https://github.com/HenrikBengtsson/rw.git","type":"git"},"_npmVersion":"11.6.2","description":"Run Rscript within WebAssembly (WASM) via node.js","directories":{},"_nodeVersion":"24.12.0","dependencies":{"ws":"^8.18.3","webr":"^0.5.8"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/rw_0.0.15_1768451577868_0.6989326605147481","host":"s3://npm-registry-packages-npm-production"}},"0.0.30":{"name":"@henrikbengtsson/rw","version":"0.0.30","keywords":["webR","wasm","R","statistics","programming","webassembly","emscripten","cli"],"author":{"name":"Henrik Bengtsson"},"license":"MIT","_id":"@henrikbengtsson/rw@0.0.30","maintainers":[{"name":"henrikbengtsson","email":"henrik.bengtsson@gmail.com"}],"homepage":"https://github.com/HenrikBengtsson/rw","bugs":{"url":"https://github.com/HenrikBengtsson/rw/issues"},"bin":{"rw":"cli.js"},"dist":{"shasum":"1d742d7fe3ca136481bc643685e736518ea1701a","tarball":"https://registry.npmjs.org/@henrikbengtsson/rw/-/rw-0.0.30.tgz","fileCount":5,"integrity":"sha512-88U85jaCHHXTFg2W/DVodQCNZPXiKS5Pa/2U4fE/jZUiLxXf7uWiOB07t5rOIdXB6dMNCO0RZ3EPkn1iAfGztw==","signatures":[{"sig":"MEYCIQCQ5RyUSeWKpR9buCT+Ou2nIJ19UklcHdFw3e7ey8MeBwIhAISsHEnsJYvp5vVHIPBu0UWa5ygUgzjOUeT7a6JHBRqN","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":33704},"main":"index.js","type":"module","gitHead":"2d99c5d968de0e6600692a8e98730803e2efeb59","_npmUser":{"name":"henrikbengtsson","email":"henrik.bengtsson@gmail.com"},"repository":{"url":"git+https://github.com/HenrikBengtsson/rw.git","type":"git"},"_npmVersion":"11.6.2","description":"Run Rscript within WebAssembly (WASM) via node.js","directories":{},"_nodeVersion":"24.12.0","dependencies":{"ws":"^8.18.3","webr":"^0.5.8"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/rw_0.0.30_1769303369163_0.7436701082225277","host":"s3://npm-registry-packages-npm-production"}},"0.0.110":{"name":"@henrikbengtsson/rw","version":"0.0.110","keywords":["webR","wasm","R","statistics","programming","webassembly","emscripten","cli"],"author":{"name":"Henrik Bengtsson"},"license":"MIT","_id":"@henrikbengtsson/rw@0.0.110","maintainers":[{"name":"henrikbengtsson","email":"henrik.bengtsson@gmail.com"}],"homepage":"https://github.com/futureverse/rw","bugs":{"url":"https://github.com/futureverse/rw/issues"},"bin":{"rw":"cli.js"},"dist":{"shasum":"0502e9e18904527e97133fdc93816f3ab246edf3","tarball":"https://registry.npmjs.org/@henrikbengtsson/rw/-/rw-0.0.110.tgz","fileCount":5,"integrity":"sha512-RZz9BOduVKf0LYkj8s+KkIKnwk6EaE3MMpX6gF3BI+sAolNhy9o6G2jI/DgMa3VyRcOQb5/eDSsq0NszOgo3QQ==","signatures":[{"sig":"MEUCIHxHXjWJ8yDzhax3Na7gR8LCMZghnkFJZ0Fx6RAyrx98AiEAhW1oy1VhqCcYjMzN41WYzQV/r39be0sIZDWB4K1MH9w=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":60757},"main":"index.js","type":"module","gitHead":"8f6d6487cf09ab4c3fd203ded6dbb7aa418da233","_npmUser":{"name":"henrikbengtsson","email":"henrik.bengtsson@gmail.com"},"repository":{"url":"git+https://github.com/futureverse/rw.git","type":"git"},"_npmVersion":"11.11.0","description":"Evaluate R Code within WebAssembly (WASM) via Node.js","directories":{},"_nodeVersion":"24.12.0","dependencies":{"ws":"^8.18.3","webr":"^0.5.8"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/rw_0.0.110_1776045162852_0.26381622152548334","host":"s3://npm-registry-packages-npm-production"}},"0.0.111":{"name":"@henrikbengtsson/rw","version":"0.0.111","keywords":["webR","wasm","R","statistics","programming","webassembly","emscripten","cli"],"author":{"name":"Henrik Bengtsson"},"license":"MIT","_id":"@henrikbengtsson/rw@0.0.111","maintainers":[{"name":"henrikbengtsson","email":"henrik.bengtsson@gmail.com"}],"homepage":"https://github.com/futureverse/rw","bugs":{"url":"https://github.com/futureverse/rw/issues"},"bin":{"rw":"cli.js"},"dist":{"shasum":"8c496cc213a266ee3cca721ca61692fa549371c8","tarball":"https://registry.npmjs.org/@henrikbengtsson/rw/-/rw-0.0.111.tgz","fileCount":5,"integrity":"sha512-blr3b0cUpiwS8W1dvzHPMb4X3toxtZYXRG1zwiQK4hPx150OPbOR+k7lyeW8N2BMYGiEnJTDC5S2Vv+9yb4y4g==","signatures":[{"sig":"MEUCIQD7YChTMzWQoXgqubzRwa4XUx/NJ8CjfX6ZYmu6HvWCZgIgAXodUZFIK5ZAdjv1HedV+qgIypZiDPPAEa+rSKhA4BM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":60797},"main":"index.js","type":"module","gitHead":"3c0d95e5ad4c2ea21f82825624e362ed94781402","_npmUser":{"name":"henrikbengtsson","email":"henrik.bengtsson@gmail.com"},"repository":{"url":"git+https://github.com/futureverse/rw.git","type":"git"},"_npmVersion":"11.11.0","description":"Evaluate R Code within WebAssembly (WASM) via Node.js","directories":{},"_nodeVersion":"24.12.0","dependencies":{"ws":"^8.18.3","webr":"^0.5.8"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/rw_0.0.111_1776111850002_0.8867445596102601","host":"s3://npm-registry-packages-npm-production"}},"0.0.206":{"name":"@henrikbengtsson/rw","version":"0.0.206","keywords":["webR","wasm","R","statistics","programming","webassembly","emscripten","cli"],"author":{"name":"Henrik Bengtsson"},"license":"MIT","_id":"@henrikbengtsson/rw@0.0.206","maintainers":[{"name":"henrikbengtsson","email":"henrik.bengtsson@gmail.com"}],"homepage":"https://github.com/futureverse/rw","bugs":{"url":"https://github.com/futureverse/rw/issues"},"bin":{"rw":"src/cli.js"},"dist":{"shasum":"8e39549df4be6bd9bb64b3336b127262c8909dc6","tarball":"https://registry.npmjs.org/@henrikbengtsson/rw/-/rw-0.0.206.tgz","fileCount":7,"integrity":"sha512-k5DOJQ9qPHlzCiBE9+n6Bm2/IrHuW1HP0tFzLbbiGd8zV/Pq34Lu+ACitgFY7uyN8qehfhHsMWYuksSMa9BmCg==","signatures":[{"sig":"MEUCIC9mgXf2Ge2X+jjYiDnlEnLJ+Y+sNBJq5Nd94cdC2e0NAiEA5n0jIrHMRmggw2EcWaX3g67Fxz2jJJWoA1laP7XYZYc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":68275},"main":"index.js","type":"module","exports":{".":"./index.js"},"gitHead":"f6bb007f39eab1276e5b7e99c55880c1b6ec1971","_npmUser":{"name":"henrikbengtsson","email":"henrik.bengtsson@gmail.com"},"repository":{"url":"git+https://github.com/futureverse/rw.git","type":"git"},"_npmVersion":"11.11.0","description":"Evaluate R Code within WebAssembly (WASM) via Node.js","directories":{},"_nodeVersion":"24.12.0","dependencies":{"ws":"^8.18.3","webr":"^0.5.8"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/rw_0.0.206_1776320848946_0.09013586312308752","host":"s3://npm-registry-packages-npm-production"}},"0.0.300":{"name":"@henrikbengtsson/rw","version":"0.0.300","keywords":["webR","wasm","R","statistics","programming","webassembly","emscripten","cli"],"author":{"name":"Henrik Bengtsson"},"license":"MIT","_id":"@henrikbengtsson/rw@0.0.300","maintainers":[{"name":"henrikbengtsson","email":"henrik.bengtsson@gmail.com"}],"homepage":"https://github.com/futureverse/rw","bugs":{"url":"https://github.com/futureverse/rw/issues"},"bin":{"rw":"src/cli.js"},"dist":{"shasum":"7be1cc13ba8147f5a0c56e2f771f7e153cc75ecb","tarball":"https://registry.npmjs.org/@henrikbengtsson/rw/-/rw-0.0.300.tgz","fileCount":7,"integrity":"sha512-Di2vwnCjqWyoxEfl2CXEITv/ejyyyFcwbJEMXpnLIT6pM/P00GLDqoT9wFRTyLo18h1d7p0FbhEAvJp9w6JuKw==","signatures":[{"sig":"MEUCIQDmvMWs0w3DuTHu0gwK9uhPo9mQzB1F6XKVdDVvKv038gIgTKuvefQeg9RbV5Aw4Lm3f3vH19awsnkpIVI1ZtmLxho=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":76510},"main":"index.js","type":"module","exports":{".":"./index.js"},"gitHead":"9674937a4005a1b9a5a66d1e1ef0dd6fa26c6574","_npmUser":{"name":"henrikbengtsson","email":"henrik.bengtsson@gmail.com"},"repository":{"url":"git+https://github.com/futureverse/rw.git","type":"git"},"_npmVersion":"11.11.0","description":"CLI for R with Multi-Runtime Support","directories":{},"_nodeVersion":"24.12.0","dependencies":{"ws":"^8.18.3","webr":"^0.5.8"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/rw_0.0.300_1776490743191_0.9683468183554353","host":"s3://npm-registry-packages-npm-production"}},"0.0.401":{"name":"@henrikbengtsson/rw","version":"0.0.401","keywords":["webR","wasm","R","statistics","programming","webassembly","emscripten","cli"],"author":{"name":"Henrik Bengtsson"},"license":"MIT","_id":"@henrikbengtsson/rw@0.0.401","maintainers":[{"name":"henrikbengtsson","email":"henrik.bengtsson@gmail.com"}],"homepage":"https://github.com/futureverse/rw","bugs":{"url":"https://github.com/futureverse/rw/issues"},"bin":{"rw":"src/cli.js"},"dist":{"shasum":"4011f6d97aafe466b7bc21fb0231c89941514687","tarball":"https://registry.npmjs.org/@henrikbengtsson/rw/-/rw-0.0.401.tgz","fileCount":7,"integrity":"sha512-2TqPaZmBP7u0+V/+rWhT28Losxme6LZ19HwyGGcdLA/0eUji7XLEIXUQBALXlg/fQgxpjyq/lQ8if/4WAQh0zQ==","signatures":[{"sig":"MEQCIEADLjSFZ3cmPuC6WDawsewt0vGGpXzjSxsmKaYSJlAGAiAAtq5q6kDl2VXUlGrIEir5cMKugKRfauKP55G5I/XWiA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":82140},"main":"index.js","type":"module","exports":{".":"./index.js"},"gitHead":"e47226c9f8a1c2863b7835c5abf329e282cde93c","_npmUser":{"name":"henrikbengtsson","email":"henrik.bengtsson@gmail.com"},"repository":{"url":"git+https://github.com/futureverse/rw.git","type":"git"},"_npmVersion":"11.11.0","description":"CLI for R with Multi-Runtime Support","directories":{},"_nodeVersion":"24.12.0","dependencies":{"ws":"^8.20.0","webr":"^0.5.9"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/rw_0.0.401_1776714385333_0.6772113084939198","host":"s3://npm-registry-packages-npm-production"}},"0.0.406":{"name":"@henrikbengtsson/rw","version":"0.0.406","description":"CLI for R with Multi-Runtime Support","keywords":["webR","wasm","R","statistics","programming","webassembly","emscripten","cli"],"homepage":"https://github.com/futureverse/rw","repository":{"type":"git","url":"git+https://github.com/futureverse/rw.git"},"bugs":{"url":"https://github.com/futureverse/rw/issues"},"author":{"name":"Henrik Bengtsson"},"license":"MIT","dependencies":{"webr":"^0.5.9","ws":"^8.20.0"},"main":"index.js","exports":{".":"./index.js"},"bin":{"rw":"src/cli.js"},"type":"module","gitHead":"9bf95f7d2f0508ec3b61e442c91407da2a1c3f16","_id":"@henrikbengtsson/rw@0.0.406","_nodeVersion":"24.12.0","_npmVersion":"11.11.0","dist":{"integrity":"sha512-CNoOxAESqS0loKNiEhz36rbIYqav07m637B732bdZ5+kXW95B9hlXIXRtTZDn97hpAZsXSznmRgLef1brG6KWg==","shasum":"09eb86d714cf43e67d24f68cffe26e3352176087","tarball":"https://registry.npmjs.org/@henrikbengtsson/rw/-/rw-0.0.406.tgz","fileCount":7,"unpackedSize":89959,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIEEx3esyB0HdU8PV+ZKaAAmx3kNxOD5fY25afelZrgHQAiBtRWgcaoaG6TjlFna0or3VtIy7t19P+/SDJigBttZzkw=="}]},"_npmUser":{"name":"henrikbengtsson","email":"henrik.bengtsson@gmail.com"},"directories":{},"maintainers":[{"name":"henrikbengtsson","email":"henrik.bengtsson@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/rw_0.0.406_1777569782023_0.2158375712447782"},"_hasShrinkwrap":false}},"time":{"created":"2025-12-03T02:14:52.061Z","modified":"2026-04-30T17:23:02.281Z","0.0.1":"2025-12-03T02:14:52.350Z","0.0.2":"2025-12-03T03:01:21.988Z","0.0.3":"2025-12-03T03:48:29.582Z","0.0.4":"2025-12-03T03:51:48.346Z","0.0.5":"2025-12-15T04:17:00.685Z","0.0.6":"2025-12-16T06:28:48.105Z","0.0.7":"2025-12-16T20:37:27.175Z","0.0.8":"2025-12-20T00:19:29.008Z","0.0.9":"2025-12-20T00:46:45.936Z","0.0.10":"2025-12-27T00:17:45.421Z","0.0.15":"2026-01-15T04:32:58.001Z","0.0.30":"2026-01-25T01:09:29.300Z","0.0.110":"2026-04-13T01:52:43.029Z","0.0.111":"2026-04-13T20:24:10.213Z","0.0.206":"2026-04-16T06:27:29.081Z","0.0.300":"2026-04-18T05:39:03.335Z","0.0.401":"2026-04-20T19:46:25.477Z","0.0.406":"2026-04-30T17:23:02.170Z"},"bugs":{"url":"https://github.com/futureverse/rw/issues"},"author":{"name":"Henrik Bengtsson"},"license":"MIT","homepage":"https://github.com/futureverse/rw","keywords":["webR","wasm","R","statistics","programming","webassembly","emscripten","cli"],"repository":{"type":"git","url":"git+https://github.com/futureverse/rw.git"},"description":"CLI for R with Multi-Runtime Support","maintainers":[{"name":"henrikbengtsson","email":"henrik.bengtsson@gmail.com"}],"readme":"[![Check](https://github.com/futureverse/rw/actions/workflows/check.yml/badge.svg)](https://github.com/futureverse/rw/actions/workflows/check.yml)\n\n# rw: CLI for R with Multi-Runtime Support\n\n_WARNING: This is work under development. I strongly recommend that\nyou do not depend on it at this time. Please do not publish a package\nto NPM that depends on it._\n\n## TL;DR\n\nThe `rw` tool is an Rscript-like command-line-interface (CLI) for running\nR code in a variety of environments (runtimes), with two main purposes:\n\n1. **Local webR Development:** Simplify running R code in **[webR]**\n   locally, including building and testing R packages for webR\n   compliance (via **[Node.js]** or **[Deno]**), e.g. `rw main.R`.\n\n2. **Sandboxed Evaluation:** Run potentially untrusted R code in\n   an isolated, **sandboxed** environment (via **[Deno]**), e.g. `rw\n   --prologue=trusted.R untrusted.R`.\n\n\n## Installation\n\nThe `rw` tool supports running **webR** via JavaScript runtimes\n**Node.js** (`--runtime=\"node:webr\"`) and **Deno**\n(`--runtime=\"deno:webr\"`), but it is only the latter that provides a\nsandboxed environment.\n\n### Recommended (Deno)\n\nIf you already have **Deno** installed (try `deno --version`), we\nrecommend to install `rw` that way:\n\n```sh\ndeno install --global --allow-all npm:@henrikbengtsson/rw\n```\n\nThe `rw` executable is installed to `~/.deno/bin/`. Prepend that to\nyour `PATH`, e.g. add `export PATH=~/.deno/bin:$PATH` to the end of\nyour `~/.bashrc` file.\n\n### Alternative (Node.js)\n\nIf you don't have, or don't want to install, Deno, but have\n**Node.js** installed (try `node --version`), install `rw` as:\n\n```sh\nnpm install --global @henrikbengtsson/rw\n```\n\nThe `rw` executable is installed to the `bin/` subfolder under `npm\nconfig get prefix`. Prepend that to your `PATH`, e.g. add `export\nPATH=$(npm config get prefix)/bin:$PATH` to the end of your\n`~/.bashrc` file.\n\n**Important 1**: When using `rw` without Deno, you have to specify\ncommand-line option `--runtime=\"node:webr\"` in each `rw` call.\n\n**Important 2**: The Node.js runtime does **not** provide a\nsandboxed environment. It should only be used with trusted code.\n\n\n## Getting started (\"Hello world\")\n\nFirst, make sure you have the `rw` tool on your search path - see\nabove installation on setting up `PATH` - it'll make your life\neasier. To verify it works, open a terminal and call:\n\n```bash\nrw --version\n```\n\nIt will output the version of the install **rw** tool. When that\nworks, verify that the following works:\n\n```bash\n$ rw --expr=\"sum(1:100)\"\n[1] 5050\n```\n\n\n## Local webR Development\n\nThe `rw` tool simplifies running R code in **[webR]** locally without\na browser. This is useful for building, installing, and testing R code\nand packages for webR compliance, especially in CI/CD pipelines.\n\n```bash\n$ rw --runtime=\"node:webr\" \\\n     --expr='install.packages(\"praise\")' \\\n     --expr='message(praise::praise())'\nDownloading webR package: praise\nYou are kickass!\n```\n\nNote that the **webR** environment is _ephemeral_, which means that it\nhas no memory across session. The default is that packages are only\ninstalled to this temporary environment to be used for the life time\nof the **webR** session (i.e. a single `rw` call). It is possible to\ninstall packages permanently on the host file system such that you\ndon't have to re-install packages each time. This can be done by using\n`rw --persistent --r-libs-user=<path> ...`.\n\n\n## Sandboxed Evaluation\n\n`rw` leverages the [sandboxing and isolation\nfeatures](https://docs.deno.com/runtime/fundamentals/security/) of\n**[Deno]** to provide a robust **sandbox** for R code. This is the\nrecommended way to run potentially untrusted R code that might attempt\nto access your local files, your secrets, use your internet\nconnection, impersonate you, and so on.\n\n```sh\nrw --runtime=\"deno:webr\" \\\n   --prologue=trusted.R \\\n   untrusted.R\n```\n\nIf left out, the default is `--runtime=\"deno:webr\"`.\n\n\n# Install R Packages Permanently\n\nBy default, the life-time of packages installed in webR is only as\nlong as the webR session. As soon as webR terminates, the installed\npackages are lost.\n\nTo install package permanently, we can install the webR package\nbinaries on the file system of the host to the folder specified by\n`--r-libs-user=<path>`. This can be done as:\n\n```sh\n$ mkdir -p ~/R/wasm32-unknown-emscripten-library/4.5\n$ rw install \\\n    --persistent --r-libs-user=~/R/wasm32-unknown-emscripten-library/4.5 \\\n    praise curl\nDownloading webR package: praise\nDownloading webR package: curl\nInstalled praise v1.0.0 into /host/R_LIBS_USER\nInstalled curl v7.1.0 into /host/R_LIBS_USER\n```\n\nTo avoid having to specify the `--r-libs-user=<path>` option in each\ncall, we can configure it to be the default, as:\n\n```sh\n$ rw config set r-libs-user ~/R/wasm32-unknown-emscripten-library/4.5\nr-libs-user=/home/alice/R/wasm32-unknown-emscripten-library/4.5\n```\n\nAfterwards, we can install packages persistently using:\n\n```sh\n$ rw install --persistent praise curl\n```\n\n\n## Proxy Connections\n\nAssuming we have `r-libs-user` configured (see above) and **curl**\nalready instealled, we verify that all **curl**-based tools have\naccess to the internet via the built-in proxy as:\n\n```sh\n$ rw --curl-proxy --persistent --expr='curl::has_internet()'\nTesting for internet connectivity via https_proxy... success!\n[1] TRUE\n```\n\n\n## Command-line Interface\n\n```sh\nrw --help\n```\n\n```text\n\nrw: CLI for R with Multi-Runtime Support\n\nUsage:\n\n  rw [options] [script.R] [args]\n  rw [options] --expr=\"...\"\n  rw [options] < script.R\n  rw [options] --persistent install [pkg] [pkg ...]\n  rw [options] --persistent install --docker [dir] [dir ...]\n  rw [options] --persistent uninstall [pkg] [pkg ...]\n  rw build --docker [[dir]]\n  rw env list\n  rw env get [field]\n  rw config [--local] list\n  rw config [--local] get [field]\n  rw config [--local] set [field] [value]\n  rw config [--local] unset [field]\n  rw config --global list\n  rw config --global get [field]\n  rw config --global set [field] [value]\n  rw config --global unset [field]\n\nOptions (general):\n  --help                        Show this help\n  --version                     Show version\n  --verbose                     Show progress messages\n  --debug                       Show debug output\n  --no-config                   Ignore ./.rwconfig\n  --vanilla                     Run R with --vanilla\n\nOptions (runtime):\n  --runtime=[host]:[engine]     Runtime environment (default: 'deno:webr')\n  --runtime-opt=[key]=[value]   Runtime-specific option (repeatable)\n                                  shims=[shim][,[shim]] - comma-separated shims\n                                  (default: runtime-opt in ./.rwconfig,\n                                  or 'shims=install.packages')\n  --r-libs-user=[host-dir]      Bind R user library to host directory\n                                (read-only unless --persistent is set;\n                                default: r-libs-user in ./.rwconfig)\n  --bind=[host-dir]:[rwasm-dir][:mode] Bind host directory as a webR directory\n                                (mode: 'ro' (read-only) or 'rw' (default))\n                                (may be specified multiple times)\n  --bastion=[host-dir][:mode]  Bind host directory available to prologue and\n                                epilogue code at '/host/bastion', but not\n                                the main code (mode: 'ro' (read-only) or 'rw')\n                                (default: bastion in ./.rwconfig,\n                                or './bastion/' if it exists)\n  --allow-net[=host[,...]]      Allow network access (Deno runtime only)\n                                (default: none, unless 'install' is used)\n  --curl-proxy                  Shortcut for --allow-net=get-ws-proxy.r-universe.dev:443,ws.r-universe.dev:443\n  --allow-run[=bin[,...]]       Allow running subprocesses (Deno runtime only)\n  --prologue=[R script]         R script evaluated before main R code\n  --epilogue=[R script]         R script evaluated after main R code\n  --prologue-expr=[R code]      R code evaluated before main R code\n                                (default: prologue-expr in ./.rwconfig)\n  --epilogue-expr=[R code]      R code evaluated after main R code\n                                (default: epilogue-expr in ./.rwconfig)\n  --persistent                  Persist changes to host (required for 'install')\n\nOptions (evaluation):\n  --expr=[R code]               R code to evaluate (multiple okay)\n                                Alternative to specifying 'script.R'\n  --input=[string]              String to provide as standard input to R\n                                (may be specified multiple times; values joined\n                                with newline; enables readLines('stdin') etc.)\n  --timeout=[seconds]           Maximum evaluation time in seconds\n  --env=VAR                     Set environment variable VAR from current environment\n  --env=VAR=value               Set environment variable VAR to value\n\nExamples:\n\n  rw --expr=\"sum(1:100)\"\n  rw <<< \"1 + 2\"\n  echo \"sum(1:100)\" | rw\n  rw main.R\n  rw < main.R\n  rw --expr=\"message('running script ...')\" main.R\n  rw commandArgs.R --a=1 --name=\"world\"\n\n  # Interrupt after 3.5 seconds, if not completed\n  rw --timeout=3.5 --expr=\"slow <- function() { Sys.sleep(5); 42 }\" \\\n                   --expr=\"tryCatch(slow(), interrupt = identity)\"\n\n  # Configure R package library on host\n  mkdir -p ~/R/wasm32-unknown-emscripten-library/4.5\n  rw config set r-libs-user ~/R/wasm32-unknown-emscripten-library/4.5\n  rw config get r-libs-user\n\n  # Install a package persistently to package library on host\n  rw --persistent install praise\n  rw --persistent --expr=\"message(praise::praise())\"\n\n  # An R session with the R user library on host\n  rw --persistent main.R\n\n  # Evaluate untrusted R code in a runtime, with data passed in\n  # and out via a bastion folder accessible only to prologue/epilogue\n  mkdir -p bastion\n  Rscript -e \"saveRDS(list(a=1, b=2), 'bastion/in.rds')\"\n  rw \\\n    --prologue-expr=\"data_in <- readRDS('/host/bastion/in.rds')\" \\\n    --epilogue-expr=\"saveRDS(data_out, '/host/bastion/out.rds')\" \\\n    --expr=\"data_out <- lapply(data_in, sqrt)\"\n  Rscript -e \"data_out <- readRDS('bastion/out.rds')\" -e \"utils::str(data_out)\"\n\n  # Show runtime environment (R/webR versions, resolved paths, etc.)\n  rw env get webr-version\n  rw env get r-version\n  rw env list\n\n  # Build a webR binary of an R package via Docker\n  rw build --docker .\n  rw build --docker .\n  rw build --docker path/to/mypkg\n\nVersion: 0.0.406\nJS Runtime: deno 2.7.12\nwebR: 0.5.9\nLicense: MIT\nAuthor: Henrik Bengtsson\n```\n\n## Known Limitations\n\n### R cannot read from stdin\n\nR code running inside `rw` cannot read from stdin (e.g. `readLines(\"stdin\")`\nor `scan(file=\"stdin\")`). webR's evaluation engine forces non-interactive mode,\nwhich prevents R from invoking its `ReadConsole` hook — so any attempt to read\nfrom stdin returns immediately with zero results (`character(0)`).\n\n[webR]: https://github.com/r-wasm/webr/\n[Node.js]: https://nodejs.org/en/\n[Deno]: https://deno.com/\n","readmeFilename":"README.md"}