Runtimes
The runtime identifiers Gigadrive Network accepts, what each one runs, and how the runtime decides the shape of your code.
A runtime pins the language and major version a Function executes under. You set one per Function in gigadrive.yaml, and leaving it out gives you node-20.
Available runtimes
| Identifier | Runs | Notes |
|---|---|---|
node-22 | Node.js 22 | What framework detection picks for JavaScript projects |
node-20 | Node.js 20 | Used when runtime is omitted |
node-18 | Node.js 18 | |
node-16 | Node.js 16 | |
bun-1 | Bun 1 | What framework detection picks for Elysia |
php-84 | PHP 8.4 | What framework detection picks for Laravel and Symfony |
php-83 | PHP 8.3 | |
php-81 | PHP 8.1 |
Those eight strings are the whole set. Any other value fails config validation, so a typo such as node22 stops the deploy instead of surfacing when the first request arrives.
Pinning a runtime
runtime is a per-Function setting, keyed by the pattern that selects the file:
version: 4
functions:
api/index.js:
runtime: node-22
memory: 512
legacy/report.php:
runtime: php-84A project with no gigadrive.yaml gets its runtime from framework detection. Next.js, Nuxt, SvelteKit, Astro, Remix, NestJS, Express, Fastify, Hono and Vite all resolve to node-22; Elysia resolves to bun-1; Laravel and Symfony resolve to php-84.
What the runtime expects from your code
A Node or Bun Function can take one of two shapes, and the platform picks between them by looking at what your entry file does when it loads.
Server-style. Your code creates an HTTP server: Express, Fastify, NestJS, Hono, or raw node:http. Requests are proxied straight to it. Bytes pass through untouched, and an Upgrade request is tunnelled to your server so it performs the WebSocket handshake itself. Frameworks that ship a Node server work with no adapter.
Handler-style. Your code exports a fetch function, or a (event, context) handler. Each request is re-framed into an event, your handler runs once, and the response it returns goes back to the client. A handler-style Function cannot accept a WebSocket upgrade; the connection is refused with 426.
A crash surfaces differently in each shape. A handler that throws returns 500 with a JSON body of {"errorMessage": "..."}. A server-style Function returns whatever its framework returns, and only when the server stops answering at all does the platform step in with a plain-text 502. Neither case kills the process.
PHP runs on php-fpm behind a FastCGI bridge, which serves the conventional front-controller layout without an adapter. Point a Function at public/index.php and the framework takes it from there.
Runtime choice does not affect memory and CPU, which are set separately.
