VOOZH about

URL: https://thenewstack.io/webassembly/wasm-for-the-frontend-a-look-at-developer-uses/

⇱ Wasm for the Frontend: A Look at Developer Use Cases - The New Stack


TNS
SUBSCRIBE
Join our community of software engineering leaders and aspirational developers. Always stay in-the-know by getting the most important news and exclusive content delivered fresh to your inbox to learn more about at-scale software development.
REQUIRED
It seems that you've previously unsubscribed from our newsletter in the past. Click the button below to open the re-subscribe form in a new tab. When you're done, simply close that tab and continue with this form to complete your subscription.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.
Welcome and thank you for joining The New Stack community!
Please answer a few simple questions to help us deliver the news and resources you are interested in.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Great to meet you!
Tell us a bit about your job so we can cover the topics you find most relevant.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Welcome!

We’re so glad you’re here. You can expect all the best TNS content to arrive Monday through Friday to keep you on top of the news and at the top of your game.

What’s next?

Check your inbox for a confirmation email where you can adjust your preferences and even join additional groups.

Follow TNS on your favorite social media networks.

Become a TNS follower on LinkedIn.

Check out the latest featured and trending stories while you wait for your first TNS newsletter.

PREV
1 of 2
NEXT
VOXPOP
As a JavaScript developer, what non-React tools do you use most often?
Angular
0%
Astro
0%
Svelte
0%
Vue.js
0%
Other
0%
I only use React
0%
I don't use JavaScript
0%
Thanks for your opinion! Subscribe below to get the final results, published exclusively in our TNS Update newsletter:
NEW! Try Stackie AI
From clobbered drafts to real-time sync
Apr 14th 2026 10:00am, by David Moore
TypeScript 6.0 RC arrives as a bridge to a faster future
Mar 14th 2026 9:00am, by Darryl K. Taft
Mastra empowers web devs to build AI agents in TypeScript
Jan 28th 2026 11:00am, by Loraine Lawson
2023-01-27 11:41:31
Wasm for the Frontend: A Look at Developer Use Cases
Frontend Development / Kubernetes / Software Development / WebAssembly

Wasm for the Frontend: A Look at Developer Use Cases

How does Wasm fit in with JavaScript? Michael Yuan, CEO of Second State, explains what frontend and web developers need to know.
Jan 27th, 2023 11:41am by Loraine Lawson
👁 Featued image for: Wasm for the Frontend: A Look at Developer Use Cases
Imaga via Pexels

When Second State started in 2019, the major use case for WebAssembly was in the blockchain, to run smart contracts.

“You really need a lightweight environment, a sandbox to run them [blockchains], and Docker — or containers in general — was too heavy for that, because in the span of six seconds, you have to do 1,000 of those,” said Michael Yuan, CEO of Second State.

The Austin-based startup instead focuses on offering support for WasmEdge, a WebAssembly runtime for cloud native, edge and decentralized applications. WasmEdge is open source and an official sandbox project hosted by the Cloud Native Computing Foundation (CNCF), an open source, vendor-neutral hub. WasmEdge is derived from the same standard as WasmTime, a Bytecode Alliance project.  Essentially, they’re the same, Yuan told The New Stack.

“However, I think our distinct offerings or features are the development toolings and APIs around that,” Yeon said. “For instance, we are embedded into Docker desktop so every Docker user gets a copy of WasmEdge instance.”

Applications can be written in either Rust or JavaScript and run inside the Wasm container instead of a more traditional Linux container, he added. Kubernetes can manage both types of containers.

Wasm for the Frontend

However, when it comes to using Wasm on the frontend, it’s most often used to support serverless functions, Yuan explained. TikTok, for instance, has deployed Wasm for serverless. In that use case, Wasm is running in the browser. Another more widely deployed use case is providing the frontend with dynamic content from the backend, he said.

“The backend could have services, or nowadays, it’s more common to use serverless functions or microservices,” he told The New Stack.

The relationship between Wasm and JavaScript is complex, Yuan added. When Wasm was first started in the browser, it was widely perceived as a supplement to JavaScript, he said. JavaScript was too slow for some functions, and its alternative, C++ applications in the browser, was too unsafe.

“That’s where WebAssembly comes from,” he said. “There’s a bunch of companies that do that, like Figma does that. And you have WebAssembly runtimes in all major browsers, but those are all WebAssembly runtimes written by, say, Google and Apple. So that’s one side of the things — Wasm runs side-by-side with JavaScript.”

Wasm might be used when a program needs to do computational work, JavaScript’s processing time is too slow, or the developer wants to use a C++ library. The library can be passed off to the WebAssembly runtime that sits in the browser. Prior to 2019, that was the most common use case and it’s still widely used today.

The BFF — Backend for the Frontend

Another reason frontend developers should know about WasmEdge and other Wasm runtimes is that frontend developers are doing more backend work, he said. There’s a lot of BFF — backend for the frontend.

“Frontend developers used to only care about frontend, but since the emergence of Vercel, Netlify and companies like that, I think they are doing more of what’s traditionally known as backend work,” he said. “Now, they call them serverless functions or edge functions, meaning a service function does a variety of different things. It can do database stuff, although it’s less common, but in the context of Vercel, it does a lot of server-side rendering, so instead of having rack components rendered in the browser, we render them on the server. What we call cloud native WebAssembly runtimes, are running outside the browser.”

Rust is probably the most common language for compiling to Wasm, he added. Typescript also compiles to Wasm.

“One of the unique features of WasmEdge is that we have ported the JavaScript runtime and its entire Node.js stack into WasmEdge. So you can run Node.js on the server inside WasmEdge and on the frontend, you have a regular React.js application,” Yuan said.

Running all of the JS in a Linux container would be in the hundreds of megabytes, he said. By comparison, running Node.js inside the Wasm container or inside WasmEdge is a mere 510 megabytes. This difference in size can be particularly important in AI inference, which is using a model to make a prediction about, say, facial recognition.

“It’s a ten times space-saving, and in performance,” he said. “So that’s the primary reason why the JavaScript people are more interested in this.”

Another use case of backend supporting frontend is deploying Wasm inside databases or data processing pipelines, connected with Kafka messaging queues, he said.

“To me, this is really a big trend that’s happened in perhaps the past five years: Is the frontend developer moving to the backend?” Yuan said. “A lot of companies and a lot of tools are built around that idea.”

TRENDING STORIES
Loraine Lawson is a veteran technology reporter who has covered technology issues from data integration to security for 25 years. Before joining The New Stack, she served as the editor of the banking technology site Bank Automation News. She has...
Read more from Loraine Lawson
SHARE THIS STORY
TRENDING STORIES
CNCF is a sponsor of The New Stack.
TNS owner Insight Partners is an investor in: Docker.
SHARE THIS STORY
TRENDING STORIES
TNS DAILY NEWSLETTER Receive a free roundup of the most recent TNS articles in your inbox each day.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.