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
+25-16Lines changed: 25 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -11,26 +11,35 @@ This package makes it easy to run AWS Lambda Functions written in Rust. This wor
11
11
12
12
## Getting started
13
13
14
-
The easiest way to start writing Lambda functions with Rust is by using Cargo-Lambda. This Cargo subcommand provides several commands to help you in your journey with Rust on AWS Lambda.
14
+
The easiest way to start writing Lambda functions with Rust is by using CargoLambda. This Cargo subcommand provides several commands to help you in your journey with Rust on AWS Lambda.
15
15
16
-
You can install `cargo-lambda` with a package manager like Homebrew:
16
+
The preferred way to install Cargo Lambda is by using a package manager.
See other installation options in [the cargo-lambda documentation](https://github.com/cargo-lambda/cargo-lambda#installation).
38
+
See other installation options in [the Cargo Lambda documentation](https://www.cargo-lambda.info/guide/installation.html).
30
39
31
40
### Your first function
32
41
33
-
To create your first function, run `cargo-lambda`with the subcomand `new`. This command will generate a Rust package with the initial source code for your function:
42
+
To create your first function, run Cargo Lambda with the [subcomand `new`](https://www.cargo-lambda.info/commands/new.html). This command will generate a Rust package with the initial source code for your function:
If you already have `cargo-lambda` installed in your machine, run the next command to build your function:
73
+
If you already have Cargo Lambda installed in your machine, run the next command to build your function:
65
74
66
75
```
67
76
cargo lambda build --release
@@ -72,7 +81,7 @@ There are other ways of building your function: manually with the AWS CLI, with
72
81
73
82
### 1. Cross-compiling your Lambda functions
74
83
75
-
By default, `cargo-lambda` builds your functions to run on x86_64 architectures. If you'd like to use a different architecture, use the options described below.
84
+
By default, Cargo Lambda builds your functions to run on x86_64 architectures. If you'd like to use a different architecture, use the options described below.
Amazon Linux 1 uses glibc version 2.17, while Rust binaries need glibc version 2.18 or later by default. However, with `cargo-lambda`, you can specify a different version of glibc.
98
+
Amazon Linux 1 uses glibc version 2.17, while Rust binaries need glibc version 2.18 or later by default. However, with Cargo Lambda, you can specify a different version of glibc.
90
99
91
100
If you are building for Amazon Linux 1, or you want to support both Amazon Linux 2 and 1, run:
92
101
@@ -101,9 +110,9 @@ For [a custom runtime](https://docs.aws.amazon.com/lambda/latest/dg/runtimes-cus
101
110
102
111
You can find the `bootstrap` binary for your function under the `target/lambda` directory.
103
112
104
-
#### 2.2. Deploying with cargo-lambda
113
+
#### 2.2. Deploying with Cargo Lambda
105
114
106
-
You can use `cargo-lambda` for simple function deployments. Once you've built your code with one of the options described earlier, use the `deploy` subcommand to upload your function to AWS:
115
+
Once you've built your code with one of the options described earlier, use the `deploy` subcommand to upload your function to AWS:
107
116
108
117
```bash
109
118
cargo lambda deploy \
@@ -124,9 +133,9 @@ cargo lambda deploy \
124
133
```
125
134
126
135
> **info**
127
-
> See other deployment options in [the cargo-lambda documentation](https://github.com/cargo-lambda/cargo-lambda#deploy).
136
+
> See other deployment options in [the Cargo Lambda documentation](https://www.cargo-lambda.info/commands/deploy.html).
128
137
129
-
You can test the function with `cargo-lambda`'s invoke subcommand:
138
+
You can test the function with the [invoke subcommand](https://www.cargo-lambda.info/commands/invoke.html):
You can also use the AWS CLI to deploy your Rust functions. First, you will need to create a ZIP archive of your function. Cargo-lambda can do that for you automatically when it builds your binary if you add the `output-format` flag:
149
+
You can also use the AWS CLI to deploy your Rust functions. First, you will need to create a ZIP archive of your function. Cargo Lambda can do that for you automatically when it builds your binary if you add the `output-format` flag:
141
150
142
151
```bash
143
152
cargo lambda build --release --arm64 --output-format zip
@@ -322,9 +331,9 @@ fn test_my_lambda_handler() {
322
331
323
332
### Cargo Lambda
324
333
325
-
[Cargo Lambda](https://crates.io/crates/cargo-lambda) provides a local server that emulates the AWS Lambda control plane. This server works on Windows, Linux, and MacOS. In the root of your Lambda project, run the subcommand `cargo lambda start` to start the server. Your function will be compiled when the server receives the first request to process. Use the subcommand `cargo lambda invoke` to send requests to your function. The `start` subcommand will watch your function's code for changes, and it will compile it every time you save the source after making changes.
334
+
[Cargo Lambda](https://www.cargo-lambda.info) provides a local server that emulates the AWS Lambda control plane. This server works on Windows, Linux, and MacOS. In the root of your Lambda project, run the subcommand `cargo lambda start` to start the server. Your function will be compiled when the server receives the first request to process. Use the subcommand `cargo lambda invoke` to send requests to your function. The `start` subcommand will watch your function's code for changes, and it will compile it every time you save the source after making changes.
326
335
327
-
You can read more about how [cargo lambda start](https://github.com/calavera/cargo-lambda#start) and [cargo lambda invoke](https://github.com/calavera/cargo-lambda#invoke) work on the [project's README](https://github.com/calavera/cargo-lambda#cargo-lambda).
336
+
You can read more about how [cargo lambda watch](https://www.cargo-lambda.info/commands/watch.html) and [cargo lambda invoke](https://www.cargo-lambda.info/commands/watch.html) work on the [project's documentation page](https://www.cargo-lambda.info).
0 commit comments