Skip to content

Conversation

@Tuntii
Copy link
Owner

@Tuntii Tuntii commented Feb 4, 2026

This PR updates the RustAPI Cookbook documentation to ensure consistency with the current codebase version (0.1.275) and package naming conventions.

Key changes:

  1. Package Renaming: Fixed multiple occurrences where the crate was referred to as rustapi instead of the correct rustapi-rs (in Cargo.toml dependencies) and rustapi_rs (in Rust imports). This affected recipes for file uploads, database integration, websockets, and handler concepts.
  2. Learning Path Enhancement: Added a new "Background Tasks" section to the Learning Path in docs/cookbook/src/learning/README.md, guiding users to the rustapi-jobs crate for async processing in Microservices and Enterprise architectures.
  3. Version Synchronization: Ensured that the updated documentation files reflect the current workspace version 0.1.275.

PR created automatically by Jules for task 12846515349818711293 started by @Tuntii

…ance 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>
@google-labs-jules
Copy link
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

Copilot AI review requested due to automatic review settings February 4, 2026 03:49
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the RustAPI Cookbook documentation to align crate naming (rustapi-rs / rustapi_rs) with the current codebase and expands the Learning Path to include background job processing guidance.

Changes:

  • Renames Rust imports from rustapi::... to rustapi_rs::... in multiple cookbook pages.
  • Updates a Cargo.toml snippet to use rustapi-rs (and adds rustapi-jobs pointers in the Learning Path).
  • Extends the Learning Path with “Background Tasks/Jobs” and references to rustapi-jobs.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
docs/cookbook/src/recipes/websockets.md Updates import to rustapi_rs::prelude::* for WebSockets recipe.
docs/cookbook/src/recipes/file_uploads.md Renames dependency/import paths to rustapi-rs / rustapi_rs.
docs/cookbook/src/recipes/db_integration.md Updates import to rustapi_rs::prelude::* for DB recipe.
docs/cookbook/src/learning/README.md Adds background tasks/jobs guidance and rustapi-jobs links.
docs/cookbook/src/concepts/handlers.md Updates handler concept example import to rustapi_rs::prelude::*.
Comments suppressed due to low confidence (1)

docs/cookbook/src/recipes/file_uploads.md:66

  • DefaultBodyLimit is not defined in the RustAPI crates (it looks like an Axum type). In RustAPI, request size limits are configured via RustApi::body_limit(...) (or by adding rustapi_core::middleware::BodyLimitLayer). Update this snippet to use the framework’s actual body limit API so the example compiles and matches runtime behavior.
use rustapi_rs::extract::DefaultBodyLimit;

let app = RustApi::new()
    .route("/upload", post(upload_file))
    // Limit request body to 10MB
    .layer(DefaultBodyLimit::max(10 * 1024 * 1024));

Comment on lines +69 to 70
| 6 | `job-queue` | Background processing, Redis/Postgres backends |

Copy link

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

job-queue is introduced as a new example in the Microservices learning path, but it’s not referenced anywhere else in this doc (e.g., the “Examples by Category” or “Feature Matrix” sections). Either add it to those sections as well, or clarify that it’s a conceptual step (not necessarily an existing example project) to avoid confusing readers.

Suggested change
| 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.

Copilot uses AI. Check for mistakes.
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.
Copy link

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new content mixes the terms “Background Tasks” and “Background Jobs” for the same concept. Pick one term and use it consistently across the learning path and the enterprise table to reduce ambiguity.

Suggested change
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.

Copilot uses AI. Check for mistakes.
```toml
[dependencies]
rustapi = { version = "0.1.275", features = ["multipart"] }
rustapi-rs = { version = "0.1.275", features = ["multipart"] }
Copy link

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Cargo.toml snippet enables a multipart feature on rustapi-rs, but crates/rustapi-rs/Cargo.toml does not define a multipart feature. This dependency line will fail for users copying it. Remove the feature flag or replace it with the correct feature set (if any) needed for multipart support.

Suggested change
rustapi-rs = { version = "0.1.275", features = ["multipart"] }
rustapi-rs = "0.1.275"

Copilot uses AI. Check for mistakes.
Comment on lines +19 to 21
use rustapi_rs::prelude::*;
use rustapi_rs::extract::Multipart;
use tokio::fs::File;
Copy link

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rustapi_rs::extract::Multipart does not appear to exist in this codebase (there is no extract module exported by rustapi-rs). Multipart is already available from rustapi_rs::prelude::* (or via rustapi_rs::Multipart). Update the import to a valid path or drop it entirely to avoid a non-compiling example.

Copilot uses AI. Check for mistakes.
Comment on lines 19 to 21
use rustapi_ws::{WebSocket, WebSocketUpgrade, Message};
use rustapi::prelude::*;
use rustapi_rs::prelude::*;
use std::sync::Arc;
Copy link

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This example now imports rustapi_rs::prelude::*, but the dependency snippet only includes rustapi-ws (and not rustapi-rs). As written, users won’t be able to compile RustApi::new(), routing helpers like get, or the rustapi_rs import. Consider switching to the supported pattern: depend on rustapi-rs with features = ["ws"] and import WebSocket types via rustapi_rs::ws::{...} (or ensure both crates are listed explicitly).

Copilot uses AI. Check for mistakes.
Comment on lines 61 to 64
```rust
use rustapi::prelude::*;
use rustapi_rs::prelude::*;

#[derive(Deserialize)]
Copy link

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The dependencies list in this recipe does not include rustapi-rs, but the code sample imports rustapi_rs::prelude::* and uses RustApi/routing helpers. Add rustapi-rs = "0.1.275" (and any needed feature flags) to the Dependencies section so the example is copy/pasteable and compiles.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant