惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

The GitHub Blog
The GitHub Blog
有赞技术团队
有赞技术团队
Apple Machine Learning Research
Apple Machine Learning Research
V
V2EX
Engineering at Meta
Engineering at Meta
美团技术团队
H
Hackread – Cybersecurity News, Data Breaches, AI and More
博客园 - 司徒正美
I
InfoQ
S
SegmentFault 最新的问题
博客园 - 叶小钗
N
Netflix TechBlog - Medium
Y
Y Combinator Blog
IT之家
IT之家
博客园 - Franky
大猫的无限游戏
大猫的无限游戏
人人都是产品经理
人人都是产品经理
T
The Blog of Author Tim Ferriss
月光博客
月光博客
The Cloudflare Blog
U
Unit 42
GbyAI
GbyAI
L
LangChain Blog
Microsoft Azure Blog
Microsoft Azure Blog

Vercel News

Vercel Open Source Program: Winter 2026 cohort How Notion Workers run untrusted code at scale with Vercel Sandbox How we run Vercel's CDN in front of Discourse From idea to secure checkout in minutes with Stripe Building Slack agents can be easy Scaling redirects to infinity on Vercel Advancing Python typing Gamma builds design-first agents with Vercel How Avalara turns pipe dreams into patent-pending with v0 Keeping community human while scaling with agents How OpenEvidence built a healthcare AI that physicians actually trust Security boundaries in agentic architectures Skills Night: 69,000+ ways agents are getting smarter Video Generation with AI Gateway We Ralph Wiggumed WebStreams to make them 10x faster How Stably ships AI testing agents in hours, not weeks How we built AEO tracking for coding agents Anyone can build agents, but it takes a platform to run them Introducing Geist Pixel The Vercel AI Accelerator is back with $6m in credits Making agent-friendly pages with content negotiation The Vercel OSS Bug Bounty program is now available Introducing the new v0 Run untrusted code with Vercel Sandbox, now generally available How Stripe built a game-changing app in a single flight with v0 How Sensay went from zero to product in six weeks AGENTS.md outperforms skills in our agent evals Agent skills explained: An FAQ Testing if "bash is all you need" AWS databases are now live on the Vercel Marketplace and v0
WebAssembly at the Edge - Vercel – Vercel
2022-08-26 · via Vercel News

2 min read

Infrastructure-native Wasm for faster performance of computationally heavy workloads

We've been working to make it easier for every developer to build at the Edge, without complicated setup or changes to their workflow. Now, with support for WebAssembly in Vercel Edge Functions, we've made it possible to compile and run Vercel Edge Functions with languages like Rust, Go, C, and more.

WebAssembly (Wasm) is a low-level language similar to Assembly. It’s commonly supported by JavaScript virtual machines like V8, the engine behind our open-source Edge Runtime, and acts as a compilation target for many programming languages. By supporting Wasm at the Edge, any language that can compile to Wasm can now take advantage of Vercel’s Edge Functions.

Link to headingRun more languages on the Edge

WebAssembly lets you take an existing library written in a different language — for example, libpng, which generates PNG images and is written in C, or maybe even PHP — and use that directly in Edge Functions.

If you’re using serverless functions today because your code has a dependency on some C or Rust code, by recompiling that to Wasm, you may be able to move that to Edge Functions.

This functionality is especially helpful for things like encoding and decoding binary data, which often performs bitwise manipulations on integers. Bitshifting and XORs are fairly natural to write in a language that uses C-like semantics. Take this line of code from the splitmix 32 PRNG:

z = (z ^ (z >> 16)) * 0x85ebca6b;

Line of code from the splitmix32 PRNG

Although this is also valid JavaScript code, because of the way JavaScript handles arithmetic, it has a completely different result. JavaScript requires workarounds like Math.imul and the unsigned right shift operator (>>>) to operate on unsigned 32 bit integers.

z = Math.imul((z ^ (z >>> 16)), 0x85ebca6b);

JavaScript often requires workarounds for arithmetic

Both languages let you achieve the same results, however, you have to go out of your way to use the special JavaScript functions and operators, and not using them leads to subtle bugs.

WebAssembly lets you write idiomatic code in the language of your choice and run it on the Edge.

Link to headingFaster execution with WebAssembly

Finally, using WebAssembly is often faster than the same code in JavaScript. Although our Edge Network is carefully optimized for running JavaScript, WebAssembly will still be 2-3 times faster for computationally heavy workloads. And with SIMD extensions, a compiler may be able to optimize your arithmetic even more.

In this example, a JavaScript and C edge function (compiled in Wasm) run via brute force to solve a maze. For each solve, an SVG is created and the maze updated.In this example, a JavaScript and C edge function (compiled in Wasm) run via brute force to solve a maze. For each solve, an SVG is created and the maze updated.

In this example, a JavaScript and C edge function (compiled in Wasm) run via brute force to solve a maze. For each solve, an SVG is created and the maze updated.

This example maze-solving application creates a maze and brute forces a solution using the “right-hand rule” both in JavaScript and C compiled to WebAssembly. The WebAssembly version is more than twice as fast. This shows that for some use cases, like tight loops and computationally heavy code, WebAssembly is usually the fastest way to run in Vercel Edge Functions.

Link to headingGetting started

If you want to learn more about WebAssembly in the Vercel Edge Functions, check out the documentation, and our examples.