A sample serverless app with Rust. I'm just experimenting stuff here so don't take anything at face value 🙃.
A very simple todo API to create, retrieve and delete todos. No front for now.
This is the architecture schema:
NodeJS: See official NodeJS install docs. The current NodeJS version is stored in .nvmrc
. If you use nvm
, you can run:
nvm use
Pnpm: dependency manager. Install with:
npm install -g pnpm
Rust toolchain: for now the Rust version is not pinned. Follow the official install instructions.
Cargo Lambda: in order to cross-compile Rust code to Lambda runtime. Follow install instructions.
Install NodeJS dependencies:
pnpm install
In order to deploy, you will need an AWS account. If you don't have one, refer to the AWS documentation.
Then install the AWS CLI: install docs.
Setup a local profile:
aws configure --profile <your-profile-name>
pnpm build
pnpm test
⚠ Warning: you may have to log in to your AWS profile again, depending on the setup method.
pnpm run deploy --profile <your-profile-name>
pnpm test-integration