Skip to content

Open Function Standard

The Open Function Standard (OFS) is a specification for writing portable backend functions. An OFS function declares its dependencies (database, cache, AI, etc.) in a manifest — the runtime provides them. The same function runs on Cloudflare Workers, Node.js, Bun, or Deno without modification.

When you write a backend function today, it’s tightly coupled to your platform:

// Platform-specific: only works on Cloudflare Workers
export default {
async fetch(request, env) {
const db = env.DB
const result = await db.prepare('SELECT * FROM users WHERE id = ?')
.bind(userId)
.first()
return Response.json(result)
}
}

Move this to Node.js or Bun? Rewrite everything.

An OFS function declares what it needs. The runtime injects it:

// OFS function — runs on any supported runtime
export default async function getUser({ userId }, { sdk }) {
const user = await sdk.db.queryOne('SELECT * FROM users WHERE id = ?', [userId])
return { user }
}

The sdk argument is injected by the OFS runner. On the edge, it uses the native database binding. On Node.js, it uses a compatible adapter. The function is identical.

Every OFS function has an aerostack.json manifest:

{
"name": "get-user",
"version": "1.0.0",
"description": "Fetch a user by ID",
"runtime": "workers",
"inputs": {
"userId": { "type": "string", "required": true }
},
"outputs": {
"user": { "type": "object" }
},
"requires": ["db"],
"auth": "required"
}
FieldDescription
nameUnique function identifier
versionSemantic version
runtimeTarget runtime: workers, node, bun, deno, any
inputsInput schema (validated before execution)
outputsOutput schema (validated after execution)
requiresSDK capabilities needed: db, cache, ai, storage, queue, realtime
authAuthentication requirement: required, optional, none
RuntimeStatus
Cloudflare Workers✓ Stable
Node.js 20+✓ Stable
Bun✓ Stable
DenoBeta
PythonBeta (via generated SDK)
  • Publish once — share a function in the Community Hub that any project can use
  • No vendor lock-in — your functions aren’t tied to one cloud
  • Testable — run functions locally with mock SDK injections
  • Composable — functions call other functions, building complex pipelines from simple pieces