Edge Functions are now 2x smaller and boot 3x faster
Supabase Edge Functions that use npm modules now bundle roughly half as large and boot several times faster. Example boot times drop from 275ms to 25ms for supabase-js and from 459ms to 57ms for the OpenAI SDK. The gains come from three changes to eszip handling in Edge Runtime: per-entry SHA-256 integrity checks now run lazily when a module is actually loaded, npm package bytes are serialized with rkyv instead of JSON number arrays that doubled their size, and source checksums switched from SHA-256 to the non-cryptographic xxHash-3. Redeploying with a recent Supabase CLI picks up the improvements.
Related posts
- Edge Functions: Node and native npm compatibility
Supabase mediumAdeptSupabase Edge Functions now natively support npm modules (via `npm:` imports) and Node built-in APIs, so existing Node apps using Express, node-postgres and Drizzle can migrate with minimal changes. Under the hood, the open-source Deno-based Supabase Edge Runtime serializes each function's module graph into a single eszip at deploy time and loads all modules from it in the hosted, local and self-hosted environments alike. This avoids fetch latency, dependency conflicts with locally installed packages, and bugs such as failures when a deno.lock file is present. The release also adds regional invocation via an `x-region` header, CPU/memory and status-code metrics in the dashboard, and error tracking through Sentry's Deno SDK.
- Persistent Storage and 97% Faster Cold Starts for Edge Functions
Supabase mediumAdeptSupabase Edge Functions can now mount any S3-compatible bucket, including Supabase Storage, as a POSIX-like directory under /s3, configured through four S3FS_* environment secrets. One example reads a SQLite backup from S3 into memory and pushes aggregates to Postgres. Cold starts improved after workers still doing initial script evaluation were moved off the shared cooperatively scheduled Tokio thread pool onto a dedicated blocking pool, so heavy startup work no longer stalls neighbouring functions. In the benchmark, average boot time fell from 870 ms to 42 ms and P99 from 15 s to 460 ms. Synchronous file APIs are now allowed during initial script evaluation only, not inside request handlers or timers.
- Supabase Edge Runtime: Self-hosted Deno Functions
Supabase mediumAdeptSupabase Edge Runtime is an MIT-licensed, Rust-based web server built on deno_core that self-hosts Deno Edge Functions (TypeScript, JavaScript, WASM) without code changes. A hyper HTTP server forwards requests to a Main Worker V8 isolate, which can create sandboxed User Worker isolates with restricted APIs and configurable memory (default 150 MB) and wall-clock (default 60s) limits. It also powers `supabase functions serve` for serving all functions locally with hot reload and Deno Deploy API parity, and a Fly.io walkthrough shows how to deploy it. Planned uses include replacing Kong as an API gateway, scheduled functions, and custom platform globals.
- Bun 1.2
Bun mediumAdept
Bun 1.2 makes a major push on Node.js compatibility by porting thousands of files from the Node.js test suite into Bun's CI, with stubbed internal bindings and assertions on error name/code rather than message text. It adds a node:http2 server, node:dgram, node:cluster, a native rewrite of node:zlib with Brotli, V8 C++ addon API support implemented on JavaScriptCore, and V8 heap snapshots. It also introduces a native S3 client (Bun.s3) with presigned URLs, multipart writers and s3:// support in Bun.file and fetch, a built-in Postgres client (Bun.sql), and a text-based bun.lock lockfile. Claimed numbers include Express up to 3x faster than Node.js, HTTP/2 serving 2x faster, and S3 downloads 5x faster than @aws-sdk/client-s3.
- Bun v1.3.6
Bun mediumAdept
Bun v1.3.6 adds a built-in Bun.Archive API for creating and extracting tar/gzip archives, a native Bun.JSONC parser, and new Bun.build options for esbuild-compatible metafiles, virtual in-memory files, local cross-compile executables and React Fast Refresh. Performance work makes Response.json() 3.5x faster by hitting JavaScriptCore's SIMD FastStringifier path and makes Buffer.indexOf up to 2x faster with SIMD. Bun.hash.crc32 is about 20x faster via hardware CRC instructions, and a spawnSync regression on Linux ARM64 is fixed by correctly defining the close_range syscall. Other changes include WebSocket proxy support, S3 Requester Pays, fake-timer fixes for testing-library, sql() INSERT handling of undefined values, and Node.js compatibility bugfixes.