Skip to content

Commit 9119e5d

Browse files
authored
Update links to cargo-lambda documentation (#510)
The documentation is not in the project's readme anymore. These changes redirect people to the right places.
1 parent 71565d6 commit 9119e5d

File tree

1 file changed

+25
-16
lines changed

1 file changed

+25
-16
lines changed

README.md

Lines changed: 25 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,26 +11,35 @@ This package makes it easy to run AWS Lambda Functions written in Rust. This wor
1111

1212
## Getting started
1313

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 Cargo Lambda. This Cargo subcommand provides several commands to help you in your journey with Rust on AWS Lambda.
1515

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.
17+
18+
1- Use Homebrew on [MacOS](https://brew.sh/):
1719

1820
```bash
1921
brew tap cargo-lambda/cargo-lambda
2022
brew install cargo-lambda
2123
```
2224

23-
Or by compiling it from source:
25+
2- Use [Scoop](https://scoop.sh/) on Windows:
26+
27+
```bash
28+
scoop bucket add cargo-lambda https://github.com/cargo-lambda/scoop-cargo-lambda
29+
scoop install cargo-lambda/cargo-lambda
30+
```
31+
32+
Or PiP on any system with Python 3 installed:
2433

2534
```bash
26-
cargo install cargo-lambda
35+
pip3 install cargo-lambda
2736
```
2837

29-
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).
3039

3140
### Your first function
3241

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:
3443

3544
```
3645
cargo lambda new YOUR_FUNCTION_NAME
@@ -61,7 +70,7 @@ async fn func(event: LambdaEvent<Value>) -> Result<Value, Error> {
6170

6271
## Building and deploying your Lambda functions
6372

64-
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:
6574

6675
```
6776
cargo lambda build --release
@@ -72,7 +81,7 @@ There are other ways of building your function: manually with the AWS CLI, with
7281

7382
### 1. Cross-compiling your Lambda functions
7483

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.
7685

7786
#### 1.2. Build your Lambda functions
7887

@@ -86,7 +95,7 @@ cargo lambda build --release --arm64
8695

8796
__Amazon Linux 1__
8897

89-
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.
9099

91100
If you are building for Amazon Linux 1, or you want to support both Amazon Linux 2 and 1, run:
92101

@@ -101,9 +110,9 @@ For [a custom runtime](https://docs.aws.amazon.com/lambda/latest/dg/runtimes-cus
101110

102111
You can find the `bootstrap` binary for your function under the `target/lambda` directory.
103112

104-
#### 2.2. Deploying with cargo-lambda
113+
#### 2.2. Deploying with Cargo Lambda
105114

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:
107116

108117
```bash
109118
cargo lambda deploy \
@@ -124,9 +133,9 @@ cargo lambda deploy \
124133
```
125134

126135
> **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).
128137
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):
130139

131140
```bash
132141
cargo lambda invoke --remote \
@@ -137,7 +146,7 @@ cargo lambda invoke --remote \
137146

138147
#### 2.2. Deploying with the AWS CLI
139148

140-
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:
141150

142151
```bash
143152
cargo lambda build --release --arm64 --output-format zip
@@ -322,9 +331,9 @@ fn test_my_lambda_handler() {
322331

323332
### Cargo Lambda
324333

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.
326335

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).
328337

329338
### Lambda Debug Proxy
330339

0 commit comments

Comments
 (0)