Skip to content

sex-request/rust-serverless-lambda-template

Repository files navigation

Rust Serverless Lambda Template

Rust Serverless AWS Lambda NPM


Repo Size Stars

This setting used by This Repository

Default Setting

  • Rust
    • lambda_http
    • tokio
    • serde_json
  • Serverless
    • serverless-rust
    • dockerless
      • default docker image's rust version is 1.43.1
      • before 1.50 caused compile error
  • Using husky
    • pre-commit : cargo fmt

Should Required Settings

[ IMPORTANT ] Must Change Here

  • package.json line 2 - project name
  • serverless.yml line 1 - service
  • serverless.yml line 3 - provider
  • serverless.yml line 21 - functions

Usage

Install

npm ci && npm run postinstall && npm run fmt:install

Test

npm run test # cargo test

Deploy

npm run deploy:dev
npm run deploy:qa
npm run deploy:prod

Formatting

npm run fmt:install # install rustfmt
npm run fmt # formatting
npm run fmt:check # check lint