---
title: "Postgres Foreign Data Wrappers with Wasm"
description: "Supabase Wrappers, a Rust framework for building Postgres Foreign Data Wrappers, now supports WebAssembly FDWs that are downloaded from URLs like GitHub or S3, checksum-verified, cached and run in a sandboxed Wasm runtime inside the Postgres extension."
url: "https://swe.quest/articles/postgres-foreign-data-wrappers-with-wasm-121e854eab291417"
canonical: "https://supabase.com/blog/postgres-foreign-data-wrappers-with-wasm"
source: "Supabase"
published: "2024-08-16"
difficulty: "medium"
kind: "Announcement"
reading_minutes: 5
tags: ["postgres","webassembly","rust","sandboxing"]
---

# Postgres Foreign Data Wrappers with Wasm

A post on [Supabase](https://swe.quest/sources/supabase.md), published 2024-08-16, 5 min read, Announcement. Original: [https://supabase.com/blog/postgres-foreign-data-wrappers-with-wasm](https://supabase.com/blog/postgres-foreign-data-wrappers-with-wasm)

## Summary

Supabase Wrappers, a Rust framework for building Postgres Foreign Data Wrappers, now supports WebAssembly FDWs that are downloaded from URLs like GitHub or S3, checksum-verified, cached and run in a sandboxed Wasm runtime inside the Postgres extension. The host extension provides the runtime, an HTTP interface and utilities, while each guest FDW fetches data from HTTP JSON APIs. TCP-based databases and local files are not yet supported. Snowflake and Paddle Wasm FDWs ship built in, a SQL walkthrough shows creating a Paddle server and foreign table, and wrappers from untrusted sources should never be installed.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [PostgreSQL](https://swe.quest/tags/postgres.md) (Data & databases)
- [WebAssembly](https://swe.quest/tags/webassembly.md) (Languages)
- [Rust](https://swe.quest/tags/rust.md) (Languages)
- [Sandboxing & isolation](https://swe.quest/tags/sandboxing.md) (Security)

## Prerequisites

- Postgres foreign tables ([easy posts on PostgreSQL](https://swe.quest/tags/postgres.md?difficulty=easy))
- WebAssembly basics ([easy posts on WebAssembly](https://swe.quest/tags/webassembly.md?difficulty=easy))

## Keywords

Supabase Wrappers, Foreign Data Wrappers, WebAssembly, Paddle, Snowflake

## Related posts

- [Supabase Wrappers, a Postgres FDW framework written in Rust](https://swe.quest/articles/supabase-wrappers-a-postgres-fdw-framework-written-in-rust-284bf0f40798dcde.md): Supabase · 2022-12-15 · Medium · 9 min read · PostgreSQL, Rust, Data pipelines, Analytics & OLAP
  Supabase Wrappers is an alpha Rust framework, built on pgx, for writing Postgres Foreign Data Wrappers that expose external systems such as Stripe and Firebase as queryable foreign tables.
- [Supabase Wrappers v0.2: Query Pushdown & Remote Subqueries](https://swe.quest/articles/supabase-wrappers-v0-2-query-pushdown-remote-subqueries-4a8d4853bc0c2d1c.md): Supabase · 2023-12-14 · Medium · 4 min read · PostgreSQL, Databases, Rust
  Supabase Wrappers v0.2, a Rust-based Postgres foreign data wrapper framework for querying third-party sources with SQL, adds query pushdown, remote subqueries and per-FDW usage statistics.
- [Postgres WASM by Snaplet and Supabase](https://swe.quest/articles/postgres-wasm-by-snaplet-and-supabase-a942df855beab1df.md): Supabase · 2022-10-03 · Medium · 9 min read · PostgreSQL, WebAssembly, Virtualization, Browsers, Networking
  postgres-wasm runs a full PostgreSQL 14 server in the browser by emulating an x86 machine with v86 rather than compiling Postgres to WASM directly.
- [Calendars in Postgres using Foreign Data Wrappers](https://swe.quest/articles/calendars-in-postgres-using-foreign-data-wrappers-4dbdcfd48394df6d.md): Supabase · 2024-12-20 · Medium · 4 min read · PostgreSQL, WebAssembly, SQL
  A Cal.com Foreign Data Wrapper, built on Supabase's Wasm-based Wrappers framework, lets Postgres read Cal.com event types and bookings and create bookings with a plain INSERT, so a signup and its calendar booking can happen in one transaction.
- [WebAssembly functions for your SQLite-compatible database](https://swe.quest/articles/webassembly-functions-for-your-sqlite-compatible-database-e23432782d9473c3.md): Turso · 2022-11-23 · Medium · 6 min read · SQLite, WebAssembly, Rust, Databases
  libSQL, Turso's open-contribution fork of SQLite, adds user-defined functions written in WebAssembly and registered directly from SQL with a CREATE FUNCTION ...

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
