vercel/fun has 1,024 GitHub stars and 46 forks. Star changes are not measured yet. Last checked 2026-11-09 12:18 UTC. Last push 2026-10-22.
ƒun - Local serverless function λ development runtime
Measured star growth
- in 24h
- Update delayed
- in 7 days
- Update delayed
- in 15 days
- Update delayed
- in 1 month
- Update delayed
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
Originalƒun
Local serverless function λ development runtime.
Example
Given a Lambda function like this one:
// example/index.js
exports.handler = function(event, context, callback) {
callback(null, { hello: 'world' });
};
You can invoke this function locally using the code below:
import { createFunction } from '@vercel/fun';
async function main() {
// Starts up the necessary server to be able to invoke the function
const fn = await createFunction({
Code: {
// `ZipFile` works, or an already unzipped directory may be specified
Directory: __dirname + '/example'
},
Handler: 'index.handler',
Runtime: 'nodejs8.10',
Environment: {
Variables: {
HELLO: 'world'
}
},
MemorySize: 512
});
// Invoke the function with a custom payload. A new instance of the function
// will be initialized if there is not an available one ready to process.
const res = await fn({ hello: 'world' });
console.log(res);
// Prints: { hello: 'world' }
// Once we are done with the function, destroy it so that the processes are
// cleaned up, and the API server is shut down (useful for hot-reloading).
await fn.destroy();
}
main().catch(console.error);
Caveats
ƒun provides an execution environment that closely resembles the real Lambda environment, with some key differences that are documented here:
- Lambdas processes are ran as your own user, not the
sbx_user1051user. - Processes are not sandboxed nor chrooted, so do not rely on hard-coded
locations like
/var/task,/var/runtime,/opt, etc. Instead, your function code should use the environment variables that represent these locations (namelyLAMBDA_TASK_ROOTandLAMBDA_RUNTIME_DIR). - Processes are frozen by sending the
SIGSTOPsignal to the lambda process, and unfrozen by sending theSIGCONTsignal, not using the cgroup freezer. - Lambdas that compile to native executables (i.e. Go) will need to be compiled for your operating system. So if you are on macOS, then the binary needs to be executable on macOS.
Runtimes
ƒun aims to support all runtimes that AWS Lambda provides. Currently implemented are:
nodejsfor Node.js Lambda functions using the systemnodebinarynodejs6.10for Node.js Lambda functions using a downloaded Node v6.10.0 binarynodejs8.10for Node.js Lambda functions using a downloaded Node v8.10.0 binarynodejs10.xfor Node.js Lambda functions using a downloaded Node v10.15.3 binarynodejs12.xfor Node.js Lambda functions using a downloaded Node v12.22.7 binarynodejs14.xfor Node.js Lambda functions using a downloaded Node v14.18.1 binarypythonfor Python Lambda functions using the systempythonbinarypython2.7for Python Lambda functions using a downloaded Python v2.7.12 binarypython3for Python Lambda functions using the systempython3binary (or fallback topython)python3.6for Python Lambda functions using a downloaded Python v3.6.8 binarypython3.7for Python Lambda functions using a downloaded Python v3.7.2 binarygo1.xfor Lambda functions written in Go - binary must be compiled for your platformprovidedfor custom runtimesexecutablefor executables that are powered by Fluid compute
Explore related projects
codecrafters-io/build-your-own-x
Master programming by recreating your favorite technologies from scratch.
561,597 starspublic-apis/public-apis
A collective list of free APIs
497,924 starsmorluto/rea
Reverse engineer anything with agents, from app behavior down to native binaries.
449,772 starsopenclaw/openclaw
The AI that really does things. Any OS. Any Platform. The lobster way. 🦞
394,299 stars