Skip to content

feat rust#2844

Open
atharvadeosthale wants to merge 12 commits intomainfrom
feat-rust
Open

feat rust#2844
atharvadeosthale wants to merge 12 commits intomainfrom
feat-rust

Conversation

@atharvadeosthale
Copy link
Copy Markdown
Member

No description provided.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Mar 31, 2026

Greptile Summary

This PR adds official Rust SDK support to the Appwrite website, including a quick-start guide, blog post, changelog entry, icon/asset additions, syntax highlighting registration, and Rust code examples across all major documentation pages (Auth, Databases, Storage, Functions, Messaging, and more).

Key changes:

  • New Platform.ServerRust enum value and rust language alias wired into code highlighting and platform mapping
  • Rust icon added to the icon sprite, platform assets, and marketing components
  • New /docs/quick-starts/rust page and AI prompt file
  • Rust snippets added to ~50 documentation pages covering every server-side product
  • Blog post and changelog entry announcing the SDK (appwrite/sdk-for-rust, v0.2.0, available on crates.io)
  • Two type-safety issues in the Rust session-related snippets: req.cookie() result (an Option<>) is passed directly to set_session without unwrapping in references/quick-start, and req.header(\"user-agent\") (also Option<>) is passed directly to add_header in the SSR user-agent forwarding snippet
  • Both create_execution Rust examples in functions/execute omit the .set_endpoint() builder call that every other Rust snippet includes

Confidence Score: 4/5

Safe to merge after fixing the two Option<> type-safety issues in the session and user-agent snippets; the functions endpoint omission is minor.

Two P1 issues exist: passing an unwrapped Option<> from req.cookie() directly to set_session in references/quick-start, and passing an unwrapped Option<> from req.header() to add_header in the SSR page. Both would cause compile errors for users copying the snippets. All other ~50 documentation files look correct and consistent.

src/routes/docs/references/quick-start/+page.markdoc (session Option unwrap) and src/routes/docs/products/auth/server-side-rendering/+page.markdoc (user-agent Option unwrap)

Vulnerabilities

No security concerns identified. API keys and project IDs are represented as <PLACEHOLDER> strings throughout. Session cookies are annotated with httpOnly: true, secure: true, sameSite: strict guidance. No secrets, credentials, or sensitive data are hardcoded.

Important Files Changed

Filename Overview
src/routes/docs/references/quick-start/+page.markdoc Adds Rust client snippets for JWT, admin, and session clients; session snippet passes req.cookie() result (an Option<>) directly to set_session without unwrapping, which is a type error.
src/routes/docs/products/auth/server-side-rendering/+page.markdoc Adds Rust snippets for all SSR auth patterns; req.header("user-agent") returns an Option<> that is passed directly to add_header without unwrapping; otherwise patterns are consistent with the framework-agnostic placeholder approach.
src/routes/docs/products/functions/execute/+page.markdoc Adds Rust execution snippets; both omit .set_endpoint() call on the client, inconsistent with every other Rust example in the PR.
src/routes/docs/quick-starts/rust/+page.markdoc New Rust quick-start guide; uses clean builder pattern with tokio async, creates database/table/rows, demonstrates queries with filters and pagination; no issues found.
src/lib/utils/code.ts Adds Rust language support for syntax highlighting and platform alias mapping; straightforward addition following existing patterns.
src/lib/utils/references.ts Adds ServerRust: 'server-rust' to the Platform enum and platformMap; correctly follows established patterns.
src/routes/docs/sdks/+page.markdoc Adds Rust SDK entry (v0.2.0) to both the server SDKs table and enums table; includes correct dark/light logo variants and crates links.
src/routes/blog/post/announcing-appwrite-rust-sdk/+page.markdoc New blog post announcing the Rust SDK with working code examples; content is accurate and well-structured.
src/routes/docs/products/databases/queries/+page.markdoc Comprehensive addition of Rust query examples covering all filter types, geo-spatial queries, and compound and/or logic; patterns are consistent throughout.
src/routes/docs/products/databases/transactions/+page.markdoc Adds Rust transaction examples (create, stage operations, bulk operations, commit/rollback); code is well-structured and consistent.

Reviews (10): Last reviewed commit: "more greptile fixes" | Re-trigger Greptile

@adityaoberai adityaoberai requested a review from ChiragAgg5k April 7, 2026 16:13
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.

2 participants