{"id":18377623,"url":"https://github.com/tbillington/rust_serverless_runtime","last_synced_at":"2025-06-25T20:06:58.421Z","repository":{"id":59281113,"uuid":"536074659","full_name":"tbillington/rust_serverless_runtime","owner":"tbillington","description":"A serverless runtime in 200 lines atop deno and sqlite","archived":false,"fork":false,"pushed_at":"2022-09-16T08:50:41.000Z","size":35,"stargazers_count":128,"open_issues_count":0,"forks_count":10,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-04-06T21:35:11.451Z","etag":null,"topics":["deno","rust","serverless","sqlite","v8"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tbillington.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-09-13T10:33:12.000Z","updated_at":"2025-03-22T10:32:07.000Z","dependencies_parsed_at":"2023-01-18T10:01:38.001Z","dependency_job_id":null,"html_url":"https://github.com/tbillington/rust_serverless_runtime","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tbillington/rust_serverless_runtime","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tbillington%2Frust_serverless_runtime","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tbillington%2Frust_serverless_runtime/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tbillington%2Frust_serverless_runtime/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tbillington%2Frust_serverless_runtime/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tbillington","download_url":"https://codeload.github.com/tbillington/rust_serverless_runtime/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tbillington%2Frust_serverless_runtime/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261945376,"owners_count":23234237,"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":["deno","rust","serverless","sqlite","v8"],"created_at":"2024-11-06T00:28:45.217Z","updated_at":"2025-06-25T20:06:58.366Z","avatar_url":"https://github.com/tbillington.png","language":"Rust","readme":"This repo is a demonstration of how you could build your own \"serverless\" platform with data persistence in only 200~ lines of simple, safe code.\n\nIt combines [deno](https://deno.land/) (rust v8 runtime), [axum](https://github.com/tokio-rs/axum/) (http library), and [rusqlite](https://github.com/rusqlite/rusqlite) (sqlite) to build a Function as a Service (FaaS)-like application with file-system backed storage.\n\nA user submits javascript code with a HTTP POST request, then is able to invoke their function via GET requests.\n\nThe js environment the code is executed within has access to 3 operations implemented in rust. `console.log` emits messages via stdout on the server, `set` inserts into a sqlite backed key-value store, and `get` retrieves from the same store.\n\nThe last evaluated expression from an invoked js function will be returned in the HTTP GET response body.\n\n### Example\n\nhttps://user-images.githubusercontent.com/2771466/190379404-8c45ff20-c7f9-4215-b18a-cd3926bc0e1f.mov\n\nIn your first terminal\n\n```\ncargo run\n```\n\nIn your second terminal\n```bash\n# Submit the contents of fn.js as the function \"raccoon\"\ncurl -d @fn.js localhost:8080/fn/raccoon\n\n# Invoke the function by it's name\ncurl localhost:8080/fn/raccoon\n\n# And a couple more times... just in case\ncurl localhost:8080/fn/raccoon\ncurl localhost:8080/fn/raccoon\ncurl localhost:8080/fn/raccoon\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftbillington%2Frust_serverless_runtime","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftbillington%2Frust_serverless_runtime","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftbillington%2Frust_serverless_runtime/lists"}