From 7b890b9db838f35438405b5f828dc32baea81d96 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Wed, 4 Feb 2026 03:49:47 +0000 Subject: [PATCH 1/4] 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> --- docs/cookbook/src/concepts/handlers.md | 2 +- docs/cookbook/src/learning/README.md | 5 +++++ docs/cookbook/src/recipes/db_integration.md | 2 +- docs/cookbook/src/recipes/file_uploads.md | 8 ++++---- docs/cookbook/src/recipes/websockets.md | 2 +- 5 files changed, 12 insertions(+), 7 deletions(-) diff --git a/docs/cookbook/src/concepts/handlers.md b/docs/cookbook/src/concepts/handlers.md index a7dfd40..f2e8d15 100644 --- a/docs/cookbook/src/concepts/handlers.md +++ b/docs/cookbook/src/concepts/handlers.md @@ -15,7 +15,7 @@ If the data cannot be extracted (e.g., missing header, invalid JSON), the reques A handler is simply an asynchronous function that takes zero or more **Extractors** as arguments and returns something that implements `IntoResponse`. ```rust -use rustapi::prelude::*; +use rustapi_rs::prelude::*; async fn create_user( State(db): State, // 1. Dependency Injection diff --git a/docs/cookbook/src/learning/README.md b/docs/cookbook/src/learning/README.md index 654b5fb..28e85b1 100644 --- a/docs/cookbook/src/learning/README.md +++ b/docs/cookbook/src/learning/README.md @@ -19,6 +19,7 @@ If you prefer reading through documentation first, follow this path through the 3. **Building Blocks**: Try the [Creating Resources](../recipes/crud_resource.md) recipe. 4. **Security**: Implement [JWT Authentication](../recipes/jwt_auth.md) and [CSRF Protection](../recipes/csrf_protection.md). 5. **Advanced**: Explore [Performance Tuning](../recipes/high_performance.md) and [HTTP/3](../recipes/http3_quic.md). +6. **Background Tasks**: Master [rustapi-jobs](../crates/rustapi_jobs.md) for async processing. ### Why Use the Examples Repository? @@ -65,8 +66,10 @@ Design and build distributed systems with RustAPI. | 3 | `rate-limit-demo` | API protection, throttling | | 4 | `microservices` | Service communication patterns | | 5 | `microservices-advanced` | Service discovery, Consul integration | +| 6 | `job-queue` | Background processing, Redis/Postgres backends | **Related Cookbook Recipes:** +- [rustapi-jobs](../crates/rustapi_jobs.md) - [Custom Middleware](../recipes/custom_middleware.md) - [Production Tuning](../recipes/high_performance.md) - [Deployment](../recipes/deployment.md) @@ -116,9 +119,11 @@ Build robust, observable, and secure systems. | 2 | **Resilience** | Implement [Circuit Breakers and Retries](../crates/rustapi_extras.md#resilience) | | 3 | **Advanced Security** | Add [OAuth2 and Security Headers](../crates/rustapi_extras.md#advanced-security) | | 4 | **Optimization** | Configure [Caching and Deduplication](../crates/rustapi_extras.md#optimization) | +| 5 | **Background Jobs** | Implement [Reliable Job Queues](../crates/rustapi_jobs.md) | **Related Cookbook Recipes:** - [rustapi-extras: The Toolbox](../crates/rustapi_extras.md) +- [rustapi-jobs: The Workhorse](../crates/rustapi_jobs.md) --- diff --git a/docs/cookbook/src/recipes/db_integration.md b/docs/cookbook/src/recipes/db_integration.md index eae1631..4b3d6fc 100644 --- a/docs/cookbook/src/recipes/db_integration.md +++ b/docs/cookbook/src/recipes/db_integration.md @@ -59,7 +59,7 @@ async fn main() { Extract the `State` to get access to the pool. ```rust -use rustapi::prelude::*; +use rustapi_rs::prelude::*; #[derive(Deserialize)] struct CreateUser { diff --git a/docs/cookbook/src/recipes/file_uploads.md b/docs/cookbook/src/recipes/file_uploads.md index 18504d3..cdde2de 100644 --- a/docs/cookbook/src/recipes/file_uploads.md +++ b/docs/cookbook/src/recipes/file_uploads.md @@ -6,7 +6,7 @@ Handling file uploads efficiently is crucial. RustAPI allows you to stream `Mult ```toml [dependencies] -rustapi = { version = "0.1.275", features = ["multipart"] } +rustapi-rs = { version = "0.1.275", features = ["multipart"] } tokio = { version = "1", features = ["fs", "io-util"] } uuid = { version = "1", features = ["v4"] } ``` @@ -16,8 +16,8 @@ uuid = { version = "1", features = ["v4"] } This handler reads the incoming stream part-by-part and writes it directly to disk (or S3). ```rust -use rustapi::prelude::*; -use rustapi::extract::Multipart; +use rustapi_rs::prelude::*; +use rustapi_rs::extract::Multipart; use tokio::fs::File; use tokio::io::AsyncWriteExt; @@ -58,7 +58,7 @@ async fn upload_file(mut multipart: Multipart) -> Result { You should always set limits to prevent DoS attacks. ```rust -use rustapi::extract::DefaultBodyLimit; +use rustapi_rs::extract::DefaultBodyLimit; let app = RustApi::new() .route("/upload", post(upload_file)) diff --git a/docs/cookbook/src/recipes/websockets.md b/docs/cookbook/src/recipes/websockets.md index f46b264..48c9510 100644 --- a/docs/cookbook/src/recipes/websockets.md +++ b/docs/cookbook/src/recipes/websockets.md @@ -17,7 +17,7 @@ WebSocket connections start as HTTP requests. We "upgrade" them. ```rust use rustapi_ws::{WebSocket, WebSocketUpgrade, Message}; -use rustapi::prelude::*; +use rustapi_rs::prelude::*; use std::sync::Arc; use tokio::sync::broadcast; From db99e8666eb35f97114212a47f8f711a4904739f Mon Sep 17 00:00:00 2001 From: Tunay <121901995+Tuntii@users.noreply.github.com> Date: Wed, 4 Feb 2026 18:04:23 +0300 Subject: [PATCH 2/4] Update docs/cookbook/src/learning/README.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- docs/cookbook/src/learning/README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/cookbook/src/learning/README.md b/docs/cookbook/src/learning/README.md index 28e85b1..6689d78 100644 --- a/docs/cookbook/src/learning/README.md +++ b/docs/cookbook/src/learning/README.md @@ -66,8 +66,9 @@ Design and build distributed systems with RustAPI. | 3 | `rate-limit-demo` | API protection, throttling | | 4 | `microservices` | Service communication patterns | | 5 | `microservices-advanced` | Service discovery, Consul integration | -| 6 | `job-queue` | Background processing, Redis/Postgres backends | +| 6 | Background jobs (conceptual) | Background processing with `rustapi-jobs`, Redis/Postgres backends | +> Note: The **Background jobs (conceptual)** step refers to using the `rustapi-jobs` crate rather than a standalone example project. **Related Cookbook Recipes:** - [rustapi-jobs](../crates/rustapi_jobs.md) - [Custom Middleware](../recipes/custom_middleware.md) From 26940581381df7083df7b29c2281e498dc75cf40 Mon Sep 17 00:00:00 2001 From: Tunay <121901995+Tuntii@users.noreply.github.com> Date: Wed, 4 Feb 2026 18:04:33 +0300 Subject: [PATCH 3/4] Update docs/cookbook/src/learning/README.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- docs/cookbook/src/learning/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/cookbook/src/learning/README.md b/docs/cookbook/src/learning/README.md index 6689d78..880d721 100644 --- a/docs/cookbook/src/learning/README.md +++ b/docs/cookbook/src/learning/README.md @@ -19,7 +19,7 @@ If you prefer reading through documentation first, follow this path through the 3. **Building Blocks**: Try the [Creating Resources](../recipes/crud_resource.md) recipe. 4. **Security**: Implement [JWT Authentication](../recipes/jwt_auth.md) and [CSRF Protection](../recipes/csrf_protection.md). 5. **Advanced**: Explore [Performance Tuning](../recipes/high_performance.md) and [HTTP/3](../recipes/http3_quic.md). -6. **Background Tasks**: Master [rustapi-jobs](../crates/rustapi_jobs.md) for async processing. +6. **Background Jobs**: Master [rustapi-jobs](../crates/rustapi_jobs.md) for async processing. ### Why Use the Examples Repository? From 5c26ec08857455775e693a459c63305f47dfacfb Mon Sep 17 00:00:00 2001 From: Tunay <121901995+Tuntii@users.noreply.github.com> Date: Wed, 4 Feb 2026 18:04:44 +0300 Subject: [PATCH 4/4] Update docs/cookbook/src/recipes/file_uploads.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- docs/cookbook/src/recipes/file_uploads.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/cookbook/src/recipes/file_uploads.md b/docs/cookbook/src/recipes/file_uploads.md index cdde2de..2671366 100644 --- a/docs/cookbook/src/recipes/file_uploads.md +++ b/docs/cookbook/src/recipes/file_uploads.md @@ -6,7 +6,7 @@ Handling file uploads efficiently is crucial. RustAPI allows you to stream `Mult ```toml [dependencies] -rustapi-rs = { version = "0.1.275", features = ["multipart"] } +rustapi-rs = "0.1.275" tokio = { version = "1", features = ["fs", "io-util"] } uuid = { version = "1", features = ["v4"] } ```