<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/building-a-serverless-platform-in-rust-fj99wpngz" -->

---
title: Building A Serverless Platform in Rust | daily.dev
description: A walkthrough of building a custom serverless platform in Rust, supporting JavaScript (via the Boa runtime) and a Rust-like language (Rye) as embedded...
canonical: https://daily.dev/posts/building-a-serverless-platform-in-rust-fj99wpngz
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Building A Serverless Platform in Rust | daily.dev
og:description: A walkthrough of building a custom serverless platform in Rust, supporting JavaScript (via the Boa runtime) and a Rust-like language (Rye) as embedded...
og:url: https://daily.dev/posts/building-a-serverless-platform-in-rust-fj99wpngz
og:image: https://api.daily.dev/og/posts/fJ99WPngZ.png
og:image:alt: Building A Serverless Platform in Rust
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Building A Serverless Platform in Rust

**[Code to the Moon](https://daily.dev/sources/codetothemoon)** · 10 min read · 12 upvotes · 1 comments

## Summary

A walkthrough of building a custom serverless platform in Rust, supporting JavaScript (via the Boa runtime) and a Rust-like language (Rye) as embedded interpreters for user-submitted functions. The platform, called Spacefare, uses Axum as the web framework and exposes host APIs for web search, page fetching, and LLM inference. To achieve zero cold-start time, all serverless functions are kept in memory on every worker node, with Redis pub/sub used to broadcast updates. Sandboxing is handled by the embedded runtimes themselves, which restrict file and network I/O by default. The post also covers the database schema, API key hashing, scalability trade-offs, and a business model where upstream service billing (inference, search) could offset compute costs.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.youtube.com/watch?v=EW724Ck3CEk>

## Questions this post answers

### How can a serverless platform achieve zero cold start time for function invocations?

Zero cold start time can be achieved by keeping every serverless function loaded in memory on every worker node at all times, rather than loading function code from a database on each invocation request. When a function is created or updated, the change is broadcast over a Redis pub/sub channel that all worker nodes subscribe to, so any node the load balancer routes a request to already has the function ready in memory. This approach has limits: once there are thousands of functions, they will no longer all fit in memory, requiring the load balancer to track which nodes hold which functions.

_daily.dev surfaces architecture writeups like this for engineers designing low-latency serverless systems._

### Why choose embeddable script runtimes like Boa or Rye instead of letting customers submit compiled binaries for serverless functions?

Embeddable runtimes make sandboxing far easier because the crate authors have already built in restrictions such as disallowing file and network IO by default and letting the host set limits on script runtime, call stack depth, and memory usage. Boa runs JavaScript and supports about 90% of the ECMAScript standard, while Rye is a Rust-like language with automatic memory management and no borrow or move semantics, and neither requires compiling submitted code before execution.

_developers weighing sandboxing tradeoffs for user-submitted code can find this kind of platform design discussion on daily.dev._

### What is JetBrains Rust Rover and does it have specific support for the Axum web framework?

Rust Rover is JetBrains' dedicated Rust IDE, and it added features specifically for the Axum framework, including an endpoints pane listing all Axum endpoints in a project and a contextual option to generate HTTP client requests directly from an endpoint definition for quick API testing. Rust Rover is free for non-commercial use.

_daily.dev helps Rust developers track new IDE tooling that streamlines testing frameworks like Axum._

## Community discussion

Top comments from developers on daily.dev.

**@pdfopsdev** · 2 upvotes

> keeping every function warm in memory on every worker node is a clever cold start dodge but it caps you on total function count per node pretty fast. curious how this handles eviction once you're past a few thousand tenants, that's usually where always-warm architectures start paging.

## Similar posts on daily.dev

- [Build a Rust AI Agent Gateway with Tokio and Axum](https://daily.dev/posts/build-a-rust-ai-agent-gateway-with-tokio-and-axum-4xfsvkj3f) · SitePoint · 2 upvotes · 0 comments
- [Introducing OpenWorkers – Self-hosted Cloudflare Workers in Rust](https://daily.dev/posts/introducing-openworkers-self-hosted-cloudflare-workers-in-rust-ag9dqgae1) · Hacker News · 34 upvotes · 3 comments
- [Axum Support in RustRover 2026.2: Build Web Backends Faster](https://daily.dev/posts/axum-support-in-rustrover-2026-2-build-web-backends-faster-u26dy7lsd) · JetBrains · 9 upvotes · 0 comments

---

Tags: [#rust](https://daily.dev/tags/rust), [#serverless](https://daily.dev/tags/serverless), [#webassembly](https://daily.dev/tags/webassembly), [#redis](https://daily.dev/tags/redis)

[View this post on daily.dev](https://daily.dev/posts/building-a-serverless-platform-in-rust-fj99wpngz)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Building A Serverless Platform in Rust","url":"https://daily.dev/posts/building-a-serverless-platform-in-rust-fj99wpngz","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/building-a-serverless-platform-in-rust-fj99wpngz"},"datePublished":"2026-07-31T14:04:32.891Z","dateModified":"2026-09-13T19:05:50.932Z","description":"A walkthrough of building a custom serverless platform in Rust, supporting JavaScript (via the Boa runtime) and a Rust-like language (Rye) as embedded...","image":"https://i.ytimg.com/vi/EW724Ck3CEk/sddefault.jpg","thumbnailUrl":"https://i.ytimg.com/vi/EW724Ck3CEk/sddefault.jpg","isAccessibleForFree":true,"articleSection":"Code to the Moon","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Code to the Moon","logo":"https://media.daily.dev/image/upload/s--M-y1cDp4--/f_auto/v1737970845/logos/codetothemoon","url":"https://daily.dev/sources/codetothemoon"},"commentCount":1,"discussionUrl":"https://daily.dev/posts/building-a-serverless-platform-in-rust-fj99wpngz","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":12},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":1}],"keywords":"rust,serverless,webassembly,redis","timeRequired":"PT10M","video":{"@type":"VideoObject","name":"Building A Serverless Platform in Rust","description":"A walkthrough of building a custom serverless platform in Rust, supporting JavaScript (via the Boa runtime) and a Rust-like language (Rye) as embedded...","thumbnailUrl":"https://i.ytimg.com/vi/EW724Ck3CEk/sddefault.jpg","uploadDate":"2026-07-31T14:04:32.891Z","duration":"PT10M","url":"https://api.daily.dev/r/fJ99WPngZ","embedUrl":"https://www.youtube.com/embed/EW724Ck3CEk"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Code to the Moon","item":"https://daily.dev/sources/codetothemoon"},{"@type":"ListItem","position":3,"name":"Building A Serverless Platform in Rust"}]}
{"@context":"https://schema.org","@type":"WebPage","@id":"https://daily.dev/posts/building-a-serverless-platform-in-rust-fj99wpngz","comment":[{"@type":"Comment","text":"keeping every function warm in memory on every worker node is a clever cold start dodge but it caps you on total function count per node pretty fast. curious how this handles eviction once you’re past a few thousand tenants, that’s usually where always-warm architectures start paging.","datePublished":"2026-08-02T18:18:07.252Z","url":"https://daily.dev/posts/fJ99WPngZ#c-KvEV2ZalC","author":{"@type":"Person","name":"PDFops","url":"https://daily.dev/pdfopsdev","image":"https://media.daily.dev/image/upload/s---8isRBKc--/f_auto/v1782922291/avatars/avatar_orjMeK8QKaaVZwGq7ScPz?_a=BAMAMicg0"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":2}}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/building-a-serverless-platform-in-rust-fj99wpngz#faq","mainEntity":[{"@type":"Question","name":"How can a serverless platform achieve zero cold start time for function invocations?","acceptedAnswer":{"@type":"Answer","text":"Zero cold start time can be achieved by keeping every serverless function loaded in memory on every worker node at all times, rather than loading function code from a database on each invocation request. When a function is created or updated, the change is broadcast over a Redis pub/sub channel that all worker nodes subscribe to, so any node the load balancer routes a request to already has the function ready in memory. This approach has limits: once there are thousands of functions, they will no longer all fit in memory, requiring the load balancer to track which nodes hold which functions. daily.dev surfaces architecture writeups like this for engineers designing low-latency serverless systems."}},{"@type":"Question","name":"Why choose embeddable script runtimes like Boa or Rye instead of letting customers submit compiled binaries for serverless functions?","acceptedAnswer":{"@type":"Answer","text":"Embeddable runtimes make sandboxing far easier because the crate authors have already built in restrictions such as disallowing file and network IO by default and letting the host set limits on script runtime, call stack depth, and memory usage. Boa runs JavaScript and supports about 90% of the ECMAScript standard, while Rye is a Rust-like language with automatic memory management and no borrow or move semantics, and neither requires compiling submitted code before execution. developers weighing sandboxing tradeoffs for user-submitted code can find this kind of platform design discussion on daily.dev."}},{"@type":"Question","name":"What is JetBrains Rust Rover and does it have specific support for the Axum web framework?","acceptedAnswer":{"@type":"Answer","text":"Rust Rover is JetBrains' dedicated Rust IDE, and it added features specifically for the Axum framework, including an endpoints pane listing all Axum endpoints in a project and a contextual option to generate HTTP client requests directly from an endpoint definition for quick API testing. Rust Rover is free for non-commercial use. daily.dev helps Rust developers track new IDE tooling that streamlines testing frameworks like Axum."}}]}
```

