
In this way the Wasm VM is similar to Java’s JVM. However, unlike with traditional machine code, the Wasm virtual machine (VM) is consistent across multiple different types of environment, architecture, and device – in theory the same bytecode binary can run anywhere without having to be recompiled for that environment. Similar to how code and data is compiled into machine code for a certain computer processor, code and data can be compiled into the Wasm bytecode by compiler software that supports the Wasm standard. While it’s certainly possible for an interested programmer to write Wasm bytecode by hand, it is not a requirement to do so. Efficient Wasm engines have already been implemented in most modern web browsers, which allows for the deployment of high performance Wasm applications on the web. WebAssembly (often abbreviated as Wasm) is a standard defining a virtual stack machine along with a corresponding bytecode.

LLVM Flang to work with R’s pre-existing C and Fortran based source code. WebR’s core is based around compiling the open-source R interpreter for All that is required is a normal web server, including the type of cloud hosting service provided by Github Pages or Netlify. WebR is a version of the open-source R interpreter compiled for WebAssembly, along with a supporting TypeScript library for interacting with the console and R objects from a JavaScript environment.īy compiling R to WebAssembly a user can visit a website and run R code directly within the web browser, without R installed on their device or a supporting computational R server.

This post will introduce webR, demonstrate some of the possibilities that running R in a web browser brings, and give a quick overview of how to include webR in your own TypeScript or JavaScript web applications.

We’re super excited to announce the release of webR v0.1.0! This is the first release of webR intended for general use by the web development and R communities and is the result of almost a year of hard work by the webR developers.
