httpuv
HTTP and WebSocket server package for R
httpuv provides low-level socket and protocol support for handling HTTP and WebSocket requests directly from within R. It uses a multithreaded architecture where I/O is handled on one thread and R callbacks are handled on another.
This package is primarily intended as a building block for other packages rather than for creating complete web applications directly. It can serve static files entirely within the I/O thread without blocking R, and it supports WebSocket connections in addition to standard HTTP requests. httpuv is built on top of the libuv and http-parser C libraries for reliable, high-performance network communication.
Contributors#
Resources featuring httpuv#
webR 0.2: R Packages and Shiny for WebAssembly | George Stagg | Posit
WebR makes it possible to run R code in the browser without the need for an R server to execute the code: the R interpreter runs directly on the user’s machine. But just running R isn’t enough, you need the R packages you use every day too.
webR 0.2.0 makes many new packages available (10,324 packages - about 51% of CRAN!) and it’s now possible to run Shiny apps under webR, entirely client side.
George Stagg shares how to load packages with webR, know what ones are available, and get started running Shiny apps in the web browser. There’s a demo webR Shiny app too!
00:15 Loading R packages with webR 01:50 Wasm system libraries available for use with webR 05:30 Tidyverse, tidymodels, geospatial data, and database packages available 08:00 Shiny and httpuv: running Shiny apps under webR 11:05 Example Shiny app running in the web browser 12:05 Links with where to learn more
Shiny webR demo app: https://shinylive.io/r/examples/
Website: https://docs.r-wasm.org/ webR REPL example: https://webr.r-wasm.org/latest/
Demo webR Shiny app in this video: https://shiny-standalone-webr-demo.netlify.app/ Source: https://github.com/georgestagg/shiny-standalone-webr-demo/
See the overview of what’s new in webR 0.2.0: https://youtu.be/Mpq9a6yMl_w
