{"id":13452445,"url":"https://github.com/vercel/fun","last_synced_at":"2026-01-30T23:28:34.338Z","repository":{"id":40692641,"uuid":"168436877","full_name":"vercel/fun","owner":"vercel","description":"ƒun - Local serverless function λ development runtime","archived":false,"fork":false,"pushed_at":"2026-01-12T04:28:46.000Z","size":482,"stargazers_count":961,"open_issues_count":17,"forks_count":40,"subscribers_count":56,"default_branch":"main","last_synced_at":"2026-01-27T02:36:00.248Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vercel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"license.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-01-31T00:26:00.000Z","updated_at":"2026-01-26T23:26:19.000Z","dependencies_parsed_at":"2023-11-29T22:27:40.224Z","dependency_job_id":"dfe744d4-872f-4f02-a0a2-671c44146bdd","html_url":"https://github.com/vercel/fun","commit_stats":{"total_commits":228,"total_committers":16,"mean_commits":14.25,"dds":"0.32456140350877194","last_synced_commit":"6f59a70294cb0fefb55eb4855c5bcac225462751"},"previous_names":["zeit/fun"],"tags_count":52,"template":false,"template_full_name":null,"purl":"pkg:github/vercel/fun","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vercel%2Ffun","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vercel%2Ffun/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vercel%2Ffun/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vercel%2Ffun/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vercel","download_url":"https://codeload.github.com/vercel/fun/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vercel%2Ffun/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28923061,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-30T22:32:35.345Z","status":"ssl_error","status_checked_at":"2026-01-30T22:32:31.927Z","response_time":66,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T07:01:24.345Z","updated_at":"2026-01-30T23:28:34.333Z","avatar_url":"https://github.com/vercel.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# ƒun\n[![Build Status](https://github.com/vercel/fun/workflows/Node%20CI/badge.svg)](https://github.com/vercel/fun/actions?workflow=Node+CI)\n\nLocal serverless function λ development runtime.\n\n## Example\n\nGiven a Lambda function like this one:\n\n```js\n// example/index.js\nexports.handler = function(event, context, callback) {\n\tcallback(null, { hello: 'world' });\n};\n```\n\nYou can invoke this function locally using the code below:\n\n```js\nimport { createFunction } from '@vercel/fun';\n\nasync function main() {\n\t// Starts up the necessary server to be able to invoke the function\n\tconst fn = await createFunction({\n\t\tCode: {\n\t\t\t// `ZipFile` works, or an already unzipped directory may be specified\n\t\t\tDirectory: __dirname + '/example'\n\t\t},\n\t\tHandler: 'index.handler',\n\t\tRuntime: 'nodejs8.10',\n\t\tEnvironment: {\n\t\t\tVariables: {\n\t\t\t\tHELLO: 'world'\n\t\t\t}\n\t\t},\n\t\tMemorySize: 512\n\t});\n\n\t// Invoke the function with a custom payload. A new instance of the function\n\t// will be initialized if there is not an available one ready to process.\n\tconst res = await fn({ hello: 'world' });\n\n\tconsole.log(res);\n\t// Prints: { hello: 'world' }\n\n\t// Once we are done with the function, destroy it so that the processes are\n\t// cleaned up, and the API server is shut down (useful for hot-reloading).\n\tawait fn.destroy();\n}\n\nmain().catch(console.error);\n```\n\n## Caveats\n\nƒun provides an execution environment that closely resembles the\nreal Lambda environment, with some key differences that are documented here:\n\n * Lambdas processes are ran as your own user, not the `sbx_user1051` user.\n * Processes are *not* sandboxed nor chrooted, so do not rely on hard-coded\n   locations like `/var/task`, `/var/runtime`, `/opt`, etc. Instead, your\n   function code should use the environment variables that represent these\n   locations (namely `LAMBDA_TASK_ROOT` and `LAMBDA_RUNTIME_DIR`).\n * Processes are frozen by sending the `SIGSTOP` signal to the lambda process,\n   and unfrozen by sending the `SIGCONT` signal, not using the [cgroup freezer][].\n * Lambdas that compile to native executables (i.e. Go) will need to be compiled\n   for your operating system. So if you are on macOS, then the binary needs to be\n   executable on macOS.\n\n## Runtimes\n\nƒun aims to support all runtimes that AWS Lambda provides. Currently\nimplemented are:\n\n * `nodejs` for Node.js Lambda functions using the system `node` binary\n * `nodejs6.10` for Node.js Lambda functions using a downloaded Node v6.10.0 binary\n * `nodejs8.10` for Node.js Lambda functions using a downloaded Node v8.10.0 binary\n * `nodejs10.x` for Node.js Lambda functions using a downloaded Node v10.15.3 binary\n * `nodejs12.x` for Node.js Lambda functions using a downloaded Node v12.22.7 binary\n * `nodejs14.x` for Node.js Lambda functions using a downloaded Node v14.18.1 binary\n * `python` for Python Lambda functions using the system `python` binary\n * `python2.7` for Python Lambda functions using a downloaded Python v2.7.12 binary\n * `python3` for Python Lambda functions using the system `python3` binary (or fallback to `python`)\n * `python3.6` for Python Lambda functions using a downloaded Python v3.6.8 binary\n * `python3.7` for Python Lambda functions using a downloaded Python v3.7.2 binary\n * `go1.x` for Lambda functions written in Go - binary must be compiled for your platform\n * `provided` for [custom runtimes][]\n * `executable` for executables that are powered by Fluid compute\n\n[cgroup freezer]: https://www.kernel.org/doc/Documentation/cgroup-v1/freezer-subsystem.txt\n[custom runtimes]: https://docs.aws.amazon.com/lambda/latest/dg/runtimes-custom.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvercel%2Ffun","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvercel%2Ffun","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvercel%2Ffun/lists"}