Programming

Fastly open sources Lucet, a native WebAssembly compiler and runtime

2 min read

Yesterday, Fastly, a US-based cloud computing service provider, open-sourced its native WebAssembly compiler and runtime, Lucet.

Lucet is built on top of Cranelift, Mozilla’s low-level retargetable code generator. It already powers Fastly’s Terrarium project, their experimental platform for edge computation using WebAssembly, and now it is coming to their edge cloud platform as well.

How does Lucet work?

Lucet delegates the responsibility of executing WebAssembly programs into two components: compiler and runtime. The compiler compiles WebAssembly modules to native code and the runtime manages resources and traps runtime faults. As it uses ahead-of-time compilation strategy, it simplifies the design and overhead of the runtime compared to just-in-time (JIT) compilation that browser engines use.

What are its advantages?

Faster and safer execution of WebAssembly programs

WebAssembly allows web browsers to safely execute programs with near-native performance. It is supported by some of the most commonly used browsers including Google, Mozilla, and Safari. With Lucet, Fastly aims to take WebAssembly “beyond the browser” by providing users a platform for faster and safer execution of programs on Fastly’s edge cloud.

More languages to choose from

Since WebAssembly is supported by an impressive list of programming languages including Rust, TypeScript, C, and C++, Lucet users will be able to work with the language they prefer. They do not have to be restricted to Fastly’s Varnish Configuration Language (VCL).

Simultaneous execution of programs

The Lucet compiler and runtime ensure that each WebAssembly program is allocated its own resources. This enables Fastly’s edge cloud to simultaneously execute a large number of WebAssembly programs without compromising on security.

Supports WebAssembly System Interface (WASI)

Lucet supports WASI, an API that provides access to various operating-system-like features. These include files and filesystems, Berkeley sockets, clocks, and random numbers.

At the moment, Lucet supports running WebAssembly programs written in C, Rust, and AssemblyScript and its runtime only support x86-64 based Linux systems.

To read the official announcement, visit Fastly’s official website.

Read Next

Introducing CT-Wasm, type-driven extension to WebAssembly for secure, in-browser cryptography

Creating and loading WebAssembly module with Emscripten’s glue code [Tutorial]

The elements of WebAssembly – Wat and Wasm, explained [Tutorial]

Bhagyashree R

Share
Published by
Bhagyashree R

Recent Posts

Top life hacks for prepping for your IT certification exam

I remember deciding to pursue my first IT certification, the CompTIA A+. I had signed…

3 years ago

Learn Transformers for Natural Language Processing with Denis Rothman

Key takeaways The transformer architecture has proved to be revolutionary in outperforming the classical RNN…

3 years ago

Learning Essential Linux Commands for Navigating the Shell Effectively

Once we learn how to deploy an Ubuntu server, how to manage users, and how…

3 years ago

Clean Coding in Python with Mariano Anaya

Key-takeaways:   Clean code isn’t just a nice thing to have or a luxury in software projects; it's a necessity. If we…

3 years ago

Exploring Forms in Angular – types, benefits and differences   

While developing a web application, or setting dynamic pages and meta tags we need to deal with…

3 years ago

Gain Practical Expertise with the Latest Edition of Software Architecture with C# 9 and .NET 5

Software architecture is one of the most discussed topics in the software industry today, and…

3 years ago