{"id":29574726,"url":"https://github.com/pyropy/decentralized-lambda-node","last_synced_at":"2025-07-19T08:39:34.589Z","repository":{"id":114185687,"uuid":"592044317","full_name":"pyropy/decentralized-lambda-node","owner":"pyropy","description":"Run lambda like functions in decentralised fashion using bacalhau and WASM","archived":false,"fork":false,"pushed_at":"2023-03-05T14:01:33.000Z","size":1365,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-06-21T15:45:03.633Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pyropy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2023-01-22T18:50:58.000Z","updated_at":"2023-05-29T07:01:19.000Z","dependencies_parsed_at":"2024-02-02T02:59:46.871Z","dependency_job_id":null,"html_url":"https://github.com/pyropy/decentralized-lambda-node","commit_stats":null,"previous_names":["pyropy/decentralised-lambda"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pyropy/decentralized-lambda-node","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyropy%2Fdecentralized-lambda-node","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyropy%2Fdecentralized-lambda-node/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyropy%2Fdecentralized-lambda-node/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyropy%2Fdecentralized-lambda-node/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pyropy","download_url":"https://codeload.github.com/pyropy/decentralized-lambda-node/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyropy%2Fdecentralized-lambda-node/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265905116,"owners_count":23846696,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":"2025-07-19T08:39:34.021Z","updated_at":"2025-07-19T08:39:34.580Z","avatar_url":"https://github.com/pyropy.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Decentralized Lambda Node\n\nGoal of this project is to provide an interface for invoking WASM serverless functions on decentralized networks.\n\nCurrently, only Bacalhau network is supported but the aim is to support other networks in future as well.\n\n## Running\n\nTo start the node run:\n\n```bash\ngo run cmd/main.go node start\n```\n\n## Example usage\n\nIn this example we will run a lambda function that returns a greeting message. This function is written\nusing [decentralized-lambda-runtime](https://github.com/pyropy/decentralized-lambda-runtime). Here's the source code:\n\n```rust\nuse decentralized_lambda_runtime::{Error, LambdaEvent};\nuse serde::{Deserialize, Serialize};\n\n\n#[derive(Deserialize)]\nstruct Request {\n    name: String,\n}\n\n\n#[derive(Serialize)]\nstruct Response {\n    msg: String,\n}\n\nfn main() -\u003e Result\u003c(), Error\u003e {\n    decentralised_lambda_runtime::run(my_handler)?;\n    Ok(())\n}\n\npub(crate) fn my_handler(event: LambdaEvent\u003cRequest\u003e) -\u003e Result\u003cResponse, Error\u003e {\n    let command = event.payload.name;\n\n    let resp = Response {\n        msg: format!(\"Hello, {}\", command),\n    };\n\n    Ok(resp)\n}\n```\n\nThis function is compiled to WASM and then uploaded to the IPFS networka as part of the job spec. To upload\n\n```bash\ngo run cmd/main.go wasm deploy --file \u003cpath to your wasm file\u003e\n```\n\nThis should produce CID result logged in terminal, which is in fact job invocation spec CID which contains CID to the binary. CID contents should look something like this:\n\n```json\n{\n  \"binary\": { \"/\": \"QmdoUoHi31JJb72Y2PUerzk1aYvtmcrrx9cVRrgMK9DqCd\" },\n  \"executionLayer\": \"bacalhau\",\n  \"persistanceLayer\": \"ipfs\"\n}\n```\n\nThe CID of the job invocation spec is then used to invoke the function.\n\n```bash\n# Invoke a function\ncurl --request POST \\\n  --url http://localhost:8080/invoke/QmQYEqnbCCMshBCG68ou56jW7LBscBWYd6fo13EDDCAFU4 \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n\t\"name\": \"Lambda\"\n}'\n```\n\nAnd the response is:\n\n```json\n{\n  \"result\": {\n    \"msg\": \"Hello, Lambda\"\n  }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpyropy%2Fdecentralized-lambda-node","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpyropy%2Fdecentralized-lambda-node","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpyropy%2Fdecentralized-lambda-node/lists"}