Skip to content

Commit 0b72fc7

Browse files
committed
ready for release
1 parent 822e9a2 commit 0b72fc7

File tree

2 files changed

+20
-18
lines changed

2 files changed

+20
-18
lines changed

CHANGELOG.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
# 0.2.0-rust-1.31.0 (unreleased)
1+
# 0.2.0-rust-1.31.1
22

33
* Breaking change: move to now officially supported `provided` runtime
4-
* Upgrade to rust 1.13.0 default image for rust ( 2018 edition )
4+
* Upgrade to Rust `1.13.0`, enabling the first stable version `2018 edition` Rust.
55

66
# 0.1.*
77

README.md

+18-16
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,30 @@
22

33
## 🤔 about
44

5-
This image extends [lambda ci `provided`](https://github.com/lambci/docker-lambda#documentation) builder docker image, a faithful reproduction of the actual AWS provided lambda runtime environment,
5+
This image extends [lambda ci `provided`](https://github.com/lambci/docker-lambda#documentation) builder docker image, a faithful reproduction of the actual AWS "**provided**" Lambda runtime environment,
66
and installs [rustup](https://rustup.rs/) and the *stable* rust toolchain.
77

88
## 📦 install
99

10-
Tags for this docker follow the convention `softprops/lambda-rust:{version}-rust-{rust-stable-version}'
11-
Where rust-version is a stable version of rust.
10+
Tags for this docker image follow the naming convention `softprops/lambda-rust:{version}-rust-{rust-stable-version}`
11+
where `{rust-stable-version}` is a stable version of rust.
1212

1313
You can find a list of available docker tags [here](https://hub.docker.com/r/softprops/lambda-rust/)
1414

15+
> 💡 If you don't find the version you're looking for, please open a new github issue to publish one
16+
1517
You can also depend directly on `softprops/lambda-rust:latest` for the most recently published version.
1618

1719
## 🤸 usage
1820

19-
The default docker entrypoint will build a release optimized version your rust artifact under `target/lambda/release` to
21+
The default docker entrypoint will build a packaged release optimized version your Rust artifact under `target/lambda/release` to
2022
isolate the lambda specific build artifacts from your host-local build artifacts.
2123

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

24-
You can pass additional flags to cargo by setting the `CARGO_FLAGS` docker env variable
25-
26-
A typical docker run might look like the following
26+
You can pass additional flags to `cargo`, the Rust build tool, by setting the `CARGO_FLAGS` docker env variable
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
28+
A typical docker run might look like the following.
2929

3030
```bash
3131
$ docker run --rm \
@@ -35,27 +35,29 @@ $ docker run --rm \
3535
softprops/lambda-rust
3636
```
3737

38+
> 💡 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
39+
3840
## 🔬 local testing
3941

40-
Once you've build a Rust lambda function artifact the `provided` runtime expects
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
42+
Once you've built a Rust lambda function artifact, the `provided` runtime expects
43+
deployments of that artifact to be named "**bootstrap**". The `lambda-rust` docker image
44+
builds a zip file, named after the binary, containing your binary files renamed to "bootstrap"
4345

44-
You can invoke this bootstap executable with the lambda-ci provided docker image.
46+
You can invoke this bootstap executable with the lambda-ci docker image for the `provided` AWS lambda runtime.
4547

4648
```sh
4749
# start a docker container replicating the "provided" lambda runtime
4850
# awaiting an event to be provided via stdin
4951
$ unzip \
50-
target/lambda/release/{your-binary-name}.zip \
51-
-d /tmp/lambda && \
52-
docker run \
52+
target/lambda/release/{your-binary-name}.zip \
53+
-d /tmp/lambda && \
54+
docker run \
5355
-i -e DOCKER_LAMBDA_USE_STDIN=1 \
5456
--rm \
5557
-v /tmp/lambda:/var/task \
5658
lambci/lambda:provided
5759

58-
# provide payload via stdin (typically a json blob)
60+
# provide an event payload via stdin (typically a json blob)
5961

6062
# Ctrl-D to yield control back to your function
6163
```

0 commit comments

Comments
 (0)