Skip to content

Commit 822e9a2

Browse files
committed
improve docs
1 parent 7f9b0c5 commit 822e9a2

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

README.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,31 +16,32 @@ You can also depend directly on `softprops/lambda-rust:latest` for the most rece
1616

1717
## 🤸 usage
1818

19-
The default docker command will build a release version your rust application under `target/lambda/release` to
20-
isolate the lambda specific build artifacts from your localhost build artifacts.
19+
The default docker entrypoint will build a release optimized version your rust artifact under `target/lambda/release` to
20+
isolate the lambda specific build artifacts from your host-local build artifacts.
2121

2222
You will want to volume mount `/code` to the directory containing your cargo project.
2323

2424
You can pass additional flags to cargo by setting the `CARGO_FLAGS` docker env variable
2525

2626
A typical docker run might look like the following
2727

28+
> 💡 the -v (volume mount) flags for `/root/.cargo/{registry,git}` are optional but when supplied, provides a much faster turn around when doing iterative development
29+
2830
```bash
2931
$ docker run --rm \
3032
-v ${PWD}:/code \
3133
-v ${HOME}/.cargo/registry:/root/.cargo/registry \
3234
-v ${HOME}/.cargo/git:/root/.cargo/git \
33-
softprops/lambda-rust:{tag}
35+
softprops/lambda-rust
3436
```
3537

36-
## Local Testing
38+
## 🔬 local testing
3739

3840
Once you've build a Rust lambda function artifact the `provided` runtime expects
39-
deployments of that artifact to be named **bootstrap**. The lambda-rust docker image
40-
builds a zip file containing your binary files renamed to bootstrap
41-
42-
You can invoke this bootstap executable with the lambda-ci provided docker image
41+
deployments of that artifact to be named "**bootstrap**". The lambda-rust docker image
42+
builds a zip file, named after the binary, containing your binary files renamed to bootstrap
4343

44+
You can invoke this bootstap executable with the lambda-ci provided docker image.
4445

4546
```sh
4647
# start a docker container replicating the "provided" lambda runtime

build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ cd "$CARGO_TARGET_DIR"/release
1919
find -maxdepth 1 -executable -type f
2020
); do
2121
strip "$file"
22-
rm "$file.zip" > 2&>/dev/null
22+
rm "$file.zip" > 2&>/dev/null || true
2323
# note: would use printf "@ $(basename $file)\n@=bootstrap" | zipnote -w "$file.zip"
2424
# if not for https://bugs.launchpad.net/ubuntu/+source/zip/+bug/519611
2525
mv "$file" bootstrap

0 commit comments

Comments
 (0)