How WebAssembly Powers Databases: Building a UDF Engine With Wasm

This article is based on a project at TiDB Hackathon 2020.

User-defined functions (UDFs) are an important extension to the SQL language. When you want to do customized computations in a database, you can write the desired computation logic as a UDF and pass it to the database. But not all DBMSs accept UDFs. For those that don't, a UDF engine is the solution we need.