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 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;
z = Math.imul((z ^ (z >>> 16)), 0x85ebca6b);
WebAssembly lets you write idiomatic code in the language of your choice and run it on the Edge.