Urgent.News

What's breaking now, across thousands of outlets.

Tech

Beyond WASI: Running any Rust application in the browser with BrowserPod 3.0

BrowserPod 3.0 has been released, enabling users to run any Rust application in the browser without modification. This significant update builds upon the existing Wasm targets, offering enhanced standard library features and greater compatibility with third-party crates. Users can now access the filesystem, make network requests, run subprocesses, and interact with concurrent applications—all without altering a single line of code.

The BrowserPod project aims to allow Linux applications to run within modern web browsers by compiling them into WebAssembly and providing the full Linux syscall interface. Its core functionalities include an efficient, locally persistent virtual filesystem, outbound internet access for package downloads or API calls, and inbound connections for exposing local development servers.

By providing a consistent system view to all running programs, BrowserPod functions as a unique OS kernel for the Web platform, implemented in WebAssembly.

This release's primary focus is on Rust support, surpassing what is typically achievable with existing Wasm targets. Running programs can now access the filesystem, make network requests, execute subprocesses, and interact with other concurrent applications—all without altering the original codebase. This compatibility extension was driven by a specific use case from a community member interested in building an interactive documentation page featuring the Rust Yarn package manager.

The process of supporting Rust in BrowserPod involves compiling the program offline and adding the binary to the Pod, as Rust programs require ahead-of-time compilation using rustc. While the community had previously relied on pre-compiled Node.js builds provided by BrowserPod, Rust compilation presents unique challenges due to its direct linkage to libc and linux-raw-sys libraries, which must be tailored for the wasm32-browserpod-linux-musl target.

By providing a custom Rust target definition, BrowserPod successfully bypasses the need for conditional compilation caused by third-party dependencies, enabling users to compile Rust projects without code modifications.

Written by urgent.news from Lobsters's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at labs.leaningtech.com →

More in Tech

More from Monday 17 August →