Skip to content

Commit 94e297e

Browse files
authored
Merge pull request #35 from shinglyu/onboarding
Improving the documentation and installation command for first time user
2 parents aaa8618 + e7b4fc9 commit 94e297e

File tree

2 files changed

+21
-3
lines changed

2 files changed

+21
-3
lines changed

Makefile

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,21 @@ ARCH := aarch64-unknown-linux-gnu
88
all: build tests-unit deploy tests-integ
99
ci: build tests-unit
1010

11+
setup:
12+
ifeq (,$(shell which rustc))
13+
$(error "Could not found Rust compiler, please install it")
14+
endif
15+
ifeq (,$(shell which cargo))
16+
$(error "Could not found Cargo, please install it")
17+
endif
18+
cargo install cross
19+
ifeq (,$(shell which sam))
20+
$(error "Could not found SAM CLI, please install it")
21+
endif
22+
ifeq (,$(shell which artillery))
23+
$(error "Could not found Artillery, it's required for load testing")
24+
endif
25+
1126
build:
1227
cross build --release --target $(ARCH)
1328
rm -rf ./build
@@ -35,4 +50,4 @@ tests-integ:
3550
tests-load:
3651
API_URL=$$(aws cloudformation describe-stacks --stack-name $(STACK_NAME) \
3752
--query 'Stacks[0].Outputs[?OutputKey==`ApiUrl`].OutputValue' \
38-
--output text) artillery run tests/load-test.yml
53+
--output text) artillery run tests/load-test.yml

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,19 @@ If you want to learn more about Rust on Lambda and how this project is structure
1818

1919
### Requirements
2020

21-
* [Rust](https://www.rust-lang.org/)
21+
* [Rust](https://www.rust-lang.org/) 1.56.0 or higher
2222
* [Cross](https://github.com/rust-embedded/cross) for cross-compilation to Arm64
23-
* The [AWS SAM CLI](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-install.html) for deploying to the cloud
23+
* The [AWS SAM CLI](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-install.html) 1.33.0 or higher for deploying to the cloud
2424
* [Artillery](https://artillery.io/) for load-testing the application
2525

2626
### Commands
2727

2828
You can use the following commands at the root of this repository to test, build, and deploy this project:
2929

3030
```bash
31+
# Optional: install Cross
32+
make install-cross
33+
3134
# Run unit tests
3235
make tests-unit
3336

0 commit comments

Comments
 (0)