Code & Runtimes
Every app version is built from a CodeSource you attach with SaveDraft (or inline on CreateApp). There are two paths, and the one you pick sets the app’s CodeKind / DeploymentMode:
| Path | CodeSource branch | CodeKind | Pod runs |
|---|---|---|---|
| Compile (managed runtime) | compile | SDK | platform runtime image + your compiled artifact |
| Image — build from code | image.from_code | UPLOAD_IMAGE | an image the platform builds from your archive |
| Image — build from git | image.from_git | GIT_IMAGE | an image the platform builds from your repo |
| Image — BYOI | image.prebuilt | PREBUILT | your pre-built container, pulled as-is |
Compile — managed runtimes
Hand the platform source; it compiles (or, for Python, packs) it and runs it on a managed runtime image. No Dockerfile, no registry, and the fastest cold starts — a compiled artifact is small, so there’s no large image to pull and no container/interpreter warmup. That matters most for scale-to-zero apps, where the first request after idle pays the start cost. The platform owns the HTTP server, the port, and the health probe — you just write a handler.
Each language has its own handler contract:
| Language | Toolchain | Compiles to | Handler |
|---|---|---|---|
| Python | 3.12 | tar.gz (interpreted) | handler(payload, ctx) |
| Rust | 1.93 | native binary or wasm32-wasip2 | #[ignite::main] handler(req, ctx) |
| Go | 1.26 | static linux/amd64 binary | func(payload, ctx) ([]byte, error) |
| Deno | 2.7.14 | native binary (deno compile) | handler(payload, ctx) |
Image — bring or build a container
For full control — system packages, a custom base image, your own web framework — run a container image. Here you own the HTTP server; the platform wires the listening port, the health probe, and the request headers. See Container Images for the contract, ports, probes, and how to customize them.
Three ways to get the image (the recipes walk each one end-to-end):
- Build from uploaded code (
from_code) — with a Dockerfile → Kaniko; without → Cloud Native Buildpacks (auto-detect). - Build from a git repo (
from_git) — same Kaniko-vs-Buildpacks rule, cloned at build time. - BYOI (
prebuilt) — your pre-built image, pulled as-is (private registries via a Secret).
All build variants run through Builds; the resulting image is what the app version runs.
Choosing a path
- Compile — plain Python / Rust / Go / Deno; fastest path and fastest cold start; the platform handles the build and the server. Start here.
- Build from code or git — you need OS packages or a specific base image but don’t want to run a registry. Add a Dockerfile (→ Kaniko) or let Buildpacks detect.
- BYOI — you already produce an image in your own CI, or want total control of the container.
See also
- Core Concepts → Code source — the
CodeSource/CodeKindtypes - Drafts → SaveDraft — attach a
CodeSource - Builds · Secrets