Skip to content

Commit 8b63877

Browse files
authored
[rust] update readme (#1324)
### Description <!-- ✍️ Write a short summary of your work. Screenshots and videos are welcome! --> ### Demo URL <!-- Provide a URL to a live deployment where we can test your PR. If a demo isn't possible feel free to omit this section. --> ### Type of Change - [ ] New Example - [ ] Example updates (Bug fixes, new features, etc.) - [ ] Other (changes to the codebase, but not to examples) ### New Example Checklist - [ ] 🛫 `npm run new-example` was used to create the example - [ ] 📚 The template wasn't used but I carefuly read the [Adding a new example](https://github.com/vercel/examples#adding-a-new-example) steps and implemented them in the example - [ ] 📱 Is it responsive? Are mobile and tablets considered?
1 parent 1a7e16d commit 8b63877

File tree

3 files changed

+21
-44
lines changed

3 files changed

+21
-44
lines changed

internal/scripts/lib/update-changed-templates.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ export default async function updateChangedTemplates(changedFiles: string[]) {
2020
return
2121
}
2222

23+
log(`Changed files (${changedFiles.length}):`)
24+
changedFiles.forEach((file) => log(` - ${file}`))
25+
2326
const examplePaths = changedFiles.reduce<string[]>((acc, fileName) => {
2427
if (fileName.startsWith('./')) {
2528
throw new Error(

rust/axum/README.md

Lines changed: 10 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -16,23 +16,22 @@ This example shows how to deploy a Rust web application using the Axum framework
1616

1717
https://rust-axum.vercel.app
1818

19-
## Features
20-
21-
- Streaming response example
22-
- Post request example
23-
- Streaming demo on root page
24-
25-
## How to Use
19+
## Project Structure
2620

27-
You can choose from one of the following two methods to use this repository:
21+
- `api/axum.rs` - Main Axum application
22+
- `/` - Entrypoint with an interactive HTML interface for streaming
23+
- `/stream` - Streaming endpoint
24+
- `/users` - Post request endpoint
25+
- `Cargo.toml` - Rust dependencies and binary configuration
26+
- `vercel.json` - Vercel deployment configuration
2827

29-
### One-Click Deploy
28+
## Deploy
3029

3130
Deploy the example using [Vercel](https://vercel.com?utm_source=github&utm_medium=readme&utm_campaign=vercel-examples):
3231

3332
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https://github.com/vercel/examples/tree/main/rust/axum&project-name=rust-axum&repository-name=rust-axum)
3433

35-
### Clone and Deploy
34+
## Development
3635

3736
Clone the repository:
3837

@@ -47,19 +46,8 @@ Install Rust if you haven't already:
4746
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
4847
```
4948

50-
Test locally (requires Rust toolchain):
49+
Test locally:
5150

5251
```bash
5352
vc dev
5453
```
55-
56-
Deploy it to the cloud with [Vercel](https://vercel.com/new?utm_source=github&utm_medium=readme&utm_campaign=rust-examples) ([Documentation](https://vercel.com/docs/functions/serverless-functions/runtimes/rust)).
57-
58-
## Project Structure
59-
60-
- `api/axum.rs` - Main Axum application
61-
- `/` - Entrypoint with an interactive HTML interface for streaming
62-
- `/stream` - Streaming endpoint
63-
- `/users` - Post request endpoint
64-
- `Cargo.toml` - Rust dependencies and binary configuration
65-
- `vercel.json` - Vercel deployment configuration

rust/hello-world/README.md

Lines changed: 8 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -16,25 +16,21 @@ This example demonstrates how to create Rust serverless functions on Vercel with
1616

1717
https://rust-hello-world.vercel.app
1818

19-
## Features
20-
21-
- Basic HTTP request handling with Rust
22-
- Multiple serverless function endpoints
23-
- Streaming response example
24-
- Performance benchmark demonstrations
25-
- Optimized for serverless deployment on Vercel
26-
27-
## How to Use
19+
## Project Structure
2820

29-
You can choose from one of the following two methods to use this repository:
21+
- `api/hello` - Basic handler with json response
22+
- `api/streaming` - Streaming response example
23+
- `api/realistic-math-bench` - Mathematical benchmark
24+
- `api/slower-bench` - Performance benchmark
25+
- `Cargo.toml` - Rust dependencies and multiple binary configurations
3026

31-
### One-Click Deploy
27+
## Deploy
3228

3329
Deploy the example using [Vercel](https://vercel.com?utm_source=github&utm_medium=readme&utm_campaign=vercel-examples):
3430

3531
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https://github.com/vercel/examples/tree/main/rust/hello-world&project-name=rust-hello-world&repository-name=rust-hello-world)
3632

37-
### Clone and Deploy
33+
### Development
3834

3935
Clone the repository:
4036

@@ -54,13 +50,3 @@ Test locally (requires Rust toolchain):
5450
```bash
5551
vc dev
5652
```
57-
58-
Deploy it to the cloud with [Vercel](https://vercel.com/new?utm_source=github&utm_medium=readme&utm_campaign=rust-examples) ([Documentation](https://vercel.com/docs/functions/serverless-functions/runtimes/rust)).
59-
60-
## Project Structure
61-
62-
- `api/hello` - Basic handler with json response
63-
- `api/streaming` - Streaming response example
64-
- `api/realistic-math-bench` - Mathematical benchmark
65-
- `api/slower-bench` - Performance benchmark
66-
- `Cargo.toml` - Rust dependencies and multiple binary configurations

0 commit comments

Comments
 (0)