You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+12-11Lines changed: 12 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,13 +23,15 @@
23
23
24
24
## 📦 Install
25
25
26
-
Install the plugin with npm
26
+
Install the plugin inside your serverless project with npm.
27
27
28
28
```sh
29
29
$ npm i -D serverless-rust
30
30
```
31
+
💡The `-D` flag adds it to your development dependencies in npm speak
31
32
32
-
💡 This serverless plugin assumes you are building Rustlang lambdas targeting the AWS Lambda "provided" runtime. The [AWS Lambda Rust Runtime](https://github.com/awslabs/aws-lambda-rust-runtime) makes this easy.
33
+
34
+
💡 This plugin assumes you are building Rustlang lambdas targeting the AWS Lambda "provided" runtime. The [AWS Lambda Rust Runtime](https://github.com/awslabs/aws-lambda-rust-runtime) makes this easy.
33
35
34
36
Add the following to your serverless project's `serverless.yml` file
35
37
@@ -39,8 +41,8 @@ provider:
39
41
name: aws
40
42
runtime: rust
41
43
plugins:
42
-
# this adds informs serverless to use
43
-
#the serverless-rust plugin
44
+
# this registered the plugin
45
+
#with serverless
44
46
- serverless-rust
45
47
# creates one artifact for each function
46
48
package:
@@ -66,7 +68,7 @@ a custom section of your serverless.yaml configuration
66
68
67
69
```yaml
68
70
custom:
69
-
# this section allows for customization of the default
71
+
# this section customizes of the default
70
72
# serverless-rust plugin settings
71
73
rust:
72
74
# flags passed to cargo
@@ -80,11 +82,11 @@ custom:
80
82
### 🥼 (experimental) local builds
81
83
82
84
While it's useful to have a build environment that matches your deployment
83
-
environment, dockerized builds do come with some notable tradeoffs.
85
+
environment, dockerized builds come with some notable tradeoffs.
84
86
85
-
The external dependency on docker itself often causes friction as an added dependency to your build.
87
+
The external dependency on docker itself often causes friction as an added dependency to your build.
86
88
87
-
Depending on the docker image limits which versions of rust you can build with. The default docker image tracks **stable rust**. Some users might wish to try unstable versions of rust before the stabalize. Local builds enable that.
89
+
Depending on a docker image limits which versions of rust you can build with. The default docker image tracks **stable rust**. Some users might wish to try unstable versions of rust before they stabilize. Local builds enable that.
88
90
89
91
If you wish to build lambda's locally, use the `dockerless` configuration setting.
90
92
@@ -99,7 +101,7 @@ custom:
99
101
+ dockerless: true
100
102
```
101
103
102
-
This will build and link your lambda as a static binary that can be deployed in to the lambda execution environment using [MUSL](https://doc.rust-lang.org/edition-guide/rust-2018/platform-and-target-support/musl-support-for-fully-static-binaries.html).
104
+
This will build and link your lambda as a static binary outside a container that can be deployed in to the lambda execution environment using [MUSL](https://doc.rust-lang.org/edition-guide/rust-2018/platform-and-target-support/musl-support-for-fully-static-binaries.html). The aim is that in future releases, this might become the default behavior.
103
105
104
106
In order to use this mode its expected that you install the `x86_64-unknown-linux-musl` target on all platforms locally with
105
107
@@ -124,7 +126,7 @@ Using MUSL comes with some other notable tradeoffs. One of which is complication
124
126
* With OpenSSL bindings which you can safely replace is with [rustls](https://github.com/ctz/rustls) or [vendor it](https://docs.rs/openssl/0.10.29/openssl/#vendored)
125
127
* Other limitations are noted [here](https://github.com/KodrAus/rust-cross-compile#limitations).
126
128
127
-
If you find other MUSL specific issues, please reported them by [opening an issue](https://github.com/softprops/serverless-rust/issues/new?template=bug_report.md).
129
+
If you find other MUSL specific issues, please report them by [opening an issue](https://github.com/softprops/serverless-rust/issues/new?template=bug_report.md).
0 commit comments