{"id":15032397,"url":"https://github.com/fdaciuk/sls-rust","last_synced_at":"2025-07-04T21:04:18.800Z","repository":{"id":40555921,"uuid":"507645685","full_name":"fdaciuk/sls-rust","owner":"fdaciuk","description":"A Serverless framework plugin for Rust applications","archived":false,"fork":false,"pushed_at":"2023-07-28T21:11:55.000Z","size":12,"stargazers_count":15,"open_issues_count":4,"forks_count":8,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-09T21:40:37.481Z","etag":null,"topics":["aws","lambda","rust","rustlang","serverless"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/sls-rust","language":"JavaScript","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/fdaciuk.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,"publiccode":null,"codemeta":null}},"created_at":"2022-06-26T17:51:39.000Z","updated_at":"2024-06-04T21:27:50.000Z","dependencies_parsed_at":"2025-02-15T21:32:46.908Z","dependency_job_id":"15291ab3-bdb3-402c-bd3b-cbd1d8cbbcff","html_url":"https://github.com/fdaciuk/sls-rust","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/fdaciuk/sls-rust","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fdaciuk%2Fsls-rust","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fdaciuk%2Fsls-rust/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fdaciuk%2Fsls-rust/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fdaciuk%2Fsls-rust/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fdaciuk","download_url":"https://codeload.github.com/fdaciuk/sls-rust/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fdaciuk%2Fsls-rust/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263619742,"owners_count":23489558,"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":["aws","lambda","rust","rustlang","serverless"],"created_at":"2024-09-24T20:18:17.349Z","updated_at":"2025-07-04T21:04:18.781Z","avatar_url":"https://github.com/fdaciuk.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n  🦀 sls-rust\n\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n   A ⚡ \u003ca href=\"https://www.serverless.com/framework/docs/\"\u003eServerless framework\u003c/a\u003e ⚡ plugin for \u003ca href=\"https://www.rust-lang.org/\"\u003eRust\u003c/a\u003e applications\n\u003c/p\u003e\n\n\u003e Note: this plugin was inspired on [softprops/serverless-rust](https://github.com/softprops/serverless-rust). \n\u003e Since the `serverless-rust` plugin is not activelly mantained, I created this \n\u003e one to work with minimal effort as possible: without docker, and probably only \n\u003e run on Linux (not tested on other OS). Great for CI environments.\n\n## 📦 Install\n\nYou should put the `serverless.yml` file outside the Rust project directory:\n\n```console\n.\n├── your_rust_project\n│   ├── src\n│   │   └── main.rs\n│   └── Cargo.toml\n├── package.json\n└── serverless.yml\n```\n\nInstall the plugin inside your serverless project with npm.\n\n```console\n$ npm i -D sls-rust\n```\n\n💡The `-D` flag adds it to your development dependencies in npm speak\n\n💡 This plugin assumes you are building Rustlang lambdas targeting the AWS Lambda \"provided.al2\" runtime. The [AWS Lambda Rust Runtime](https://github.com/awslabs/aws-lambda-rust-runtime) makes this easy.\n\nAdd the following to your serverless project's `serverless.yml` file\n\n```yaml\nservice: demo\nframeworkVersion: '3'\nconfigValidationMode: error\n\nprovider:\n  name: aws\n  memorySize: 128\n  region: us-east-1\n\nplugins:\n  # this registers the plugin with serverless\n  - sls-rust\n\n# creates one artifact for each function\npackage:\n  individually: true\n\nfunctions:\n  test:\n    # handler value syntax is `{rust_project_path}.{project_binary_name}`\n    handler: rust_project_path.project_binary_name\n    # you must use tags.rust = true to make this plugin works:\n    tags:\n      rust: true\n```\n\n\u003e 💡 The Rust Lambda runtime requires a binary named `bootstrap`. This plugin renames the binary cargo builds to `bootstrap` for you. You do **not** need to do this manually in your `Cargo.toml` configuration file.\n\nIn order to use this mode its expected that you install the `x86_64-unknown-linux-musl` target on all platforms locally with\n\n```sh\n$ rustup target add x86_64-unknown-linux-musl\n```\n\nOn linux platforms, you will need to install musl-tools\n\n```sh\n$ sudo apt-get update \u0026\u0026 sudo apt-get install -y musl-tools\n```\n\nOn Mac OSX, you will need to install a MUSL cross compilation toolchain\n\n```sh\n$ brew install filosottile/musl-cross/musl-cross\n```\n\n## 🤸 usage\n\nEvery [serverless workflow command](https://serverless.com/framework/docs/providers/aws/guide/workflow/) should work out of the box.\n\n### invoke your lambdas locally\n\n```sh\n$ npx serverless invoke local -f hello -d '{\"hello\":\"world\"}'\n```\n\n### deploy your lambdas to the cloud\n\n```sh\n$ npx serverless deploy\n```\n\n### invoke your lambdas in the cloud directly\n\n```sh\n$ npx serverless invoke -f hello -d '{\"hello\":\"world\"}'\n```\n\n### view your lambdas logs\n\n```sh\n$ npx serverless logs -f hello\n```\n\n## License \n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffdaciuk%2Fsls-rust","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffdaciuk%2Fsls-rust","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffdaciuk%2Fsls-rust/lists"}