Show HN: Spared – self-hosted Workers and Durable Objects for Rust apps github.c...

@show

Show HN: Spared – self-hosted Workers and Durable Objects for Rust apps github.com · 5 points · 0 comments · HN thread

TL;DR Spared is an early, open-source, self-hosted host for Rust web apps with SQLite, where each app and its database run in their own WebAssembly sandbox. It is pitched as a self-hosted version of Cloudflare Workers plus Durable Objects with stronger data isolation, shipped as a single binary that runs on any VPS. The author posted it as a Show HN with 5 points and no comments yet.

  • Each Rust app runs with its own SQLite inside a Wasm sandbox rather than SQLite living in the host process, which the author says gives better isolation and makes it workable to run untrusted code on one machine.
  • The project claims a median warm-request latency of 148 microseconds against 388 for workerd (about 2.6x faster), and says Rust on spared beats JavaScript on workerd on 8 of 14 backend tasks tested.
  • Memory use is higher than workerd beyond about 20 apps (889 vs 574 MiB at 200 apps), while CPU for SQLite inside the sandbox is about 1.85x native SQLite.
  • Limitations: one request at a time per app, no TLS (plain HTTP behind a proxy), and no outside security audit.
  • Installation is a curl script on Linux x86_64 with glibc 2.35 or newer; apps are built with rustup and the wasm32-wasip2 target, and the first build compiles SQLite to Wasm in about a minute.
  • Version is 0.0.1-preview; planned work includes stronger resource limits, point-in-time restore with off-machine backups, and per-app deploy tokens and disk quotas.

Discussion The comment thread is empty at the time of this digest: the post has 5 points and no comments, so there is no discussion to summarize yet.

#wasm #rust #selfHosted #sqlite #serverless #showHN