Skip to content

Commit 7b890b9

Browse files
docs: update cookbook versions, rename rustapi to rustapi-rs, and enhance learning path
- Updated `docs/cookbook/src/learning/README.md` to include `rustapi-jobs` in the Learning Path (Microservices & Enterprise). - Updated `docs/cookbook/src/recipes/file_uploads.md` to use `rustapi-rs` dependency and imports. - Updated `docs/cookbook/src/recipes/db_integration.md` to use `rustapi_rs` imports. - Updated `docs/cookbook/src/recipes/websockets.md` to use `rustapi_rs` imports. - Updated `docs/cookbook/src/concepts/handlers.md` to use `rustapi_rs` imports. - Ensured consistency of version `0.1.275` across updated files. Co-authored-by: Tuntii <121901995+Tuntii@users.noreply.github.com>
1 parent 5ec3a9a commit 7b890b9

5 files changed

Lines changed: 12 additions & 7 deletions

File tree

docs/cookbook/src/concepts/handlers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ If the data cannot be extracted (e.g., missing header, invalid JSON), the reques
1515
A handler is simply an asynchronous function that takes zero or more **Extractors** as arguments and returns something that implements `IntoResponse`.
1616

1717
```rust
18-
use rustapi::prelude::*;
18+
use rustapi_rs::prelude::*;
1919

2020
async fn create_user(
2121
State(db): State<DbPool>, // 1. Dependency Injection

docs/cookbook/src/learning/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ If you prefer reading through documentation first, follow this path through the
1919
3. **Building Blocks**: Try the [Creating Resources](../recipes/crud_resource.md) recipe.
2020
4. **Security**: Implement [JWT Authentication](../recipes/jwt_auth.md) and [CSRF Protection](../recipes/csrf_protection.md).
2121
5. **Advanced**: Explore [Performance Tuning](../recipes/high_performance.md) and [HTTP/3](../recipes/http3_quic.md).
22+
6. **Background Tasks**: Master [rustapi-jobs](../crates/rustapi_jobs.md) for async processing.
2223

2324
### Why Use the Examples Repository?
2425

@@ -65,8 +66,10 @@ Design and build distributed systems with RustAPI.
6566
| 3 | `rate-limit-demo` | API protection, throttling |
6667
| 4 | `microservices` | Service communication patterns |
6768
| 5 | `microservices-advanced` | Service discovery, Consul integration |
69+
| 6 | `job-queue` | Background processing, Redis/Postgres backends |
6870

6971
**Related Cookbook Recipes:**
72+
- [rustapi-jobs](../crates/rustapi_jobs.md)
7073
- [Custom Middleware](../recipes/custom_middleware.md)
7174
- [Production Tuning](../recipes/high_performance.md)
7275
- [Deployment](../recipes/deployment.md)
@@ -116,9 +119,11 @@ Build robust, observable, and secure systems.
116119
| 2 | **Resilience** | Implement [Circuit Breakers and Retries](../crates/rustapi_extras.md#resilience) |
117120
| 3 | **Advanced Security** | Add [OAuth2 and Security Headers](../crates/rustapi_extras.md#advanced-security) |
118121
| 4 | **Optimization** | Configure [Caching and Deduplication](../crates/rustapi_extras.md#optimization) |
122+
| 5 | **Background Jobs** | Implement [Reliable Job Queues](../crates/rustapi_jobs.md) |
119123

120124
**Related Cookbook Recipes:**
121125
- [rustapi-extras: The Toolbox](../crates/rustapi_extras.md)
126+
- [rustapi-jobs: The Workhorse](../crates/rustapi_jobs.md)
122127

123128
---
124129

docs/cookbook/src/recipes/db_integration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ async fn main() {
5959
Extract the `State` to get access to the pool.
6060

6161
```rust
62-
use rustapi::prelude::*;
62+
use rustapi_rs::prelude::*;
6363

6464
#[derive(Deserialize)]
6565
struct CreateUser {

docs/cookbook/src/recipes/file_uploads.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Handling file uploads efficiently is crucial. RustAPI allows you to stream `Mult
66

77
```toml
88
[dependencies]
9-
rustapi = { version = "0.1.275", features = ["multipart"] }
9+
rustapi-rs = { version = "0.1.275", features = ["multipart"] }
1010
tokio = { version = "1", features = ["fs", "io-util"] }
1111
uuid = { version = "1", features = ["v4"] }
1212
```
@@ -16,8 +16,8 @@ uuid = { version = "1", features = ["v4"] }
1616
This handler reads the incoming stream part-by-part and writes it directly to disk (or S3).
1717

1818
```rust
19-
use rustapi::prelude::*;
20-
use rustapi::extract::Multipart;
19+
use rustapi_rs::prelude::*;
20+
use rustapi_rs::extract::Multipart;
2121
use tokio::fs::File;
2222
use tokio::io::AsyncWriteExt;
2323

@@ -58,7 +58,7 @@ async fn upload_file(mut multipart: Multipart) -> Result<StatusCode, ApiError> {
5858
You should always set limits to prevent DoS attacks.
5959

6060
```rust
61-
use rustapi::extract::DefaultBodyLimit;
61+
use rustapi_rs::extract::DefaultBodyLimit;
6262

6363
let app = RustApi::new()
6464
.route("/upload", post(upload_file))

docs/cookbook/src/recipes/websockets.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ WebSocket connections start as HTTP requests. We "upgrade" them.
1717

1818
```rust
1919
use rustapi_ws::{WebSocket, WebSocketUpgrade, Message};
20-
use rustapi::prelude::*;
20+
use rustapi_rs::prelude::*;
2121
use std::sync::Arc;
2222
use tokio::sync::broadcast;
2323

0 commit comments

Comments
 (0)