Sharon Machlis
Contributing Writer

Shiny R web framework arrives in Wasm

news
Sep 20, 20232 mins
Development Libraries and FrameworksR LanguageWeb Development

Shinylive R package exports Shiny R apps as Wasm-enabled Shinylive applications that run completely in a web browser.

command line
Credit: Thinkstock

The Shiny web framework for R is now officially available in a WebAssembly (Wasm) version that runs in-browser and doesnโ€™t require a back-end Shiny server, Posit CTO Joe Cheng announced at the Posit::conf(2023) user conference today.

There are currently three ways to use this new R version of Shinylive (a Python version of Shinylive was announced last year):

  • A new Shinylive R package has an export function that can convert a local Shiny app.R application to a Shinylive application with an index.html file and additional assets. That can then run as other conventional HTML files.
  • The Shinylive.ioย website now has an R version where users can write and share apps directly in browser, similar to a site like JSFiddle for JavaScript.ย 
  • Shiny apps can now be included as {shinylive-r} code chunks within Quarto documents using the new Shinylive Quarto extensionย https://github.com/quarto-ext/shinylive.
shiny live option3 IDG

Cheng cautioned that Shinylive for R is still new, and it can currently be slow to download all the necessary R code to a userโ€™s browser. That should speed up in the coming weeks, he said. In addition, not all packages and functions are immediately available, apps canโ€™t connect directly to databases (although API calls may work), and all code and data is fully accessible to end users, so thereโ€™s no way to hide things like API keys.

You can find out more in the GitHub repository for Chengโ€™s presentation.ย