Announcing Native Language Support in WebContainers

Created on November 12, 2023 at 10:25 am

In the ever-evolving landscape of technology, we often find ourselves at crossroads—junctions where innovation sets a new course, shaping the landscape for years DATE to come. Over the years DATE , WebContainers PERSON have achieved extraordinary feats and have always been at the forefront of such groundbreaking innovation, redefining the boundaries of what’s possible in a browser, making it not just a gateway to the Internet but a powerful platform for development. Yet, at every summit we’ve reached, we’ve gazed at the peaks that lie ahead, always asking, “What’s next?”

Today DATE , we are thrilled to announce the full-scale integration of WASI ORG ( WebAssembly System Interface ORG ) into WebContainers ORG . This marks a milestone that amplifies what you can do with your browser. It’s a whole new paradigm for web development, and allows to run a large spectrum of native applications without thinking about multiple different architectures.

What is WASI ORG ?

For many years DATE , JavaScript ORG was the sole programming language natively supported by web browsers. Yet, as the web continues to grow and develop quickly, there’s a growing demand for code that is compact, secure, and executes efficiently. To address this, Mozilla ORG revealed in 2015 DATE that they were collaborating with engineers from Google ORG , Microsoft ORG , and Apple ORG to develop a new standard known as WebAssembly ORG , or Wasm for short. WebAssembly ORG is a low-level, assembly-like language that operates independently of any specific platform. It uses a compressed binary format that’s designed to run securely and quickly, delivering performance close to native execution speeds. Moreover, it serves as a target for compiling code meant to run on the web.

WebAssembly ORG serves as a compilation target, where native code, for example, Rust ORG , C++ PRODUCT , or Golang GPE , is compiled into WebAssembly ORG . Initially, it was created to run native languages such as C++ PRODUCT or Rust on the web. However, it has now expanded its scope of application. WebAssembly ORG supports a broad range of programming languages, and it is no longer confined to just web browsers.

Now, each WebAssembly ORG module runs in a sandboxed environment, and it has no access to system-like functionality, for example, files and filesystems or networking. This means that WebAssembly ORG is limited in what it can do, and the host must provide all external functionality, typically via JavaScript PRODUCT .

This is where WASI ORG comes in. WASI ORG stands for WebAssembly System Interface ORG and acts as a bridge, providing a standardized interface allowing WebAssembly ORG code to safely interact with system interfaces like the filesystem, networking, generating random numbers, and more, without injecting this functionality via JavaScript PRODUCT .

This expands what WebAssembly ORG can do and allows us to build applications in any language that compiles to WebAssembly ORG and run them in any place where a runtime is available, including WebContainers ORG !

Why is this significant?

If you’re a developer, WASI ORG ’s potential impacts you in a number of groundbreaking ways:

Speed & Security: You get the best of both worlds. Applications that run at near-native speed while maintaining a secure, sandboxed environment.

Portability: Compile once, run everywhere! Compile native code to WebAssembly ORG and run it on the web or elsewhere. You don’t have to worry about the quirks of running your code on different platforms regardless of the underlying operating system.

Multi-language Support: Develop in native languages and not just those that are web-native. As mentioned earlier, many programming languages like C, C++ PRODUCT , Rust, and others can be compiled to WebAssembly ORG and use the WASI ORG interface. This means that you can write system-level code in languages other than JavaScript for the web, providing more options and flexibility.

What does this allow me to do that I couldn’t do before?

WebAssembly Runtime

With the integration of WASI ORG into WebConatiners ORG , there’s now a wasm command you can use from the terminal to execute a WebAssembly ORG or WASI ORG -compiled module. This means you can compile your native code to WASI ORG , upload it to your project, and simply run it via the new wasm command:

If you want to learn more about how you can compile your code to WASI ORG , check out this WASI ORG tutorial from the Bytecode Alliance ORG .

Python Support

We’re also thrilled to give you a sneak peak into the potential of WebContainers ORG . As a demonstration of what’s possible, we’re introducing experimental support of Python ORG within WebContainers 🎉 🤯 🙌 ORG . This is especially significant when you consider that Python ORG , the third ORDINAL most frequently used programming language, has traditionally been absent from the browser’s native environment. Requiring external servers for execution, Python ORG ’s capabilities were often segmented, resulting in disconnected development experiences. But no more. With WASI ORG ’s integration into WebContainers ORG , the realms of the server and the browser merge further, paving the way for a new era of in-browser development. Importantly, as WASI ORG continues to evolve and expand its feature set, it will directly influence the capabilities of Python ORG within WebContainers ORG . Please note, this Python integration is very experimental which means that currently it’s limited to the core features of the Python language. As of now, we haven’t yet rolled out support for pip , Python ORG ’s defacto package manager, which means you won’t be able to install additional Python packages just yet. You can write, edit, and execute Python PERSON scripts that rely on built-in Python modules and functionalities, however, more complex projects that depend on external libraries will have to wait a bit longer.

We also extended the capabilities of our shell. We have added support for jq , a native command-line JSON-processor allowing you to easily slice, filter, map, and transform structured data. You can use this from the shell in any project.

Our plan is to add more tools like this in the future!

WordPress Development

There are many toolchains and ecosystems that have recognized the power of WebAssembly ORG and WASI ORG . A prime example is WordPress ORG . Not only has WordPress ORG the majority of the market share among other CMS ORG with a whopping 64% PERCENT , but it also powers an astonishing 43% PERCENT of all websites on the internet. You can run the entire WordPress ORG stack inside WebContainers ORG . This unlocks full WordPress ORG plugin development, all within your browser. We’re excited to work more with the WordPress ORG team and other ecosystems as we continue to push the boundaries of what’s possible.

How can I try it out myself?

You can try this out today DATE ! Visit, click on the newly introduced “ Native Languages WORK_OF_ART ” tab — that’s still in alpha — and start hacking away.

What’s next?

As exciting as all these developments are, we’re just getting started. WASI ORG itself is still in the process of being standardized, and as it matures, it promises to unlock even more capabilities within WebContainers ORG . As we look to the horizon, the path charted by the WASI ORG roadmap will be instrumental in guiding us. There are a handful of very exciting new features being developed, including WebAssembly Threads ORG or WebAssembly Garbage Collection.

That said, we’re committed to staying at the cutting edge! Our ambition is to add experimental support for other popular languages as well. In particular, we want to add experimental support for Ruby ORG and PHP.

The future is bright, and we can’t wait to explore it with you. Stay tuned for more updates as we continue to push the boundaries of what’s possible, empowering developers to create, innovate, and build delightful experiences like never before.

Connecting to Connected... Page load complete