Skip to content
sproutboat
Esc
↑↓navigate↵open⌘Jpreview
On this page

Overview

Every binding kind Sproutboat exposes on env, and how binding calls reach the broker.

Bindings follow the Cloudflare Workers binding APIs, implemented by Sproutboat on your own server. Each page lists the methods that are supported.

Whether a binding call returns its value directly or a Promise depends on the compatibility date. From 2026-10-24 D1 calls (prepare().raw(), .run(), .all(), .first(), batch() and exec()) return Promises, as on Workers, from 2026-10-25 KV calls do, and from 2026-10-26 R2 calls do. Before those dates they are synchronous and return their value directly. await works at every date, so write await env.DB.prepare(...).run() and your code is correct on both sides. A call you do not await that fails is reported as an unhandled rejection (a log line and an unhandledrejection event); it does not stop the process. On the platform they go over loopback to the broker running next to your sprout; a standalone binary has the bindings compiled in. See The handler. they go over loopback to the broker running next to your sprout; a standalone binary has the bindings compiled in. See The handler.

Available bindings

Binding Accessed as Config key
KV env.NAME kv_namespaces
D1-compatible SQLite env.NAME d1_databases
R2-compatible object storage env.NAME r2_buckets
Queues env.NAME queues
Secrets env.NAME secrets
Cron scheduled(event) triggers.crons
Service bindings env.NAME services
Static assets env.ASSETS assets
Durable Objects env.NAME durable_objects
Rate limiting env.NAME ratelimiters
Outbound fetch fetch() none
Vars env.NAME vars
Analytics Engine env.NAME analytics_engine_datasets
Version metadata env.NAME version_metadata

Every binding is declared in sproutboat.jsonc. KV namespaces, D1 databases, R2 buckets and queues are account-level resources that deploy can create for you; see Storage resources.

Was this page helpful?