Skip to content

feat: add Rust SDK support#11614

Merged
ChiragAgg5k merged 7 commits into1.9.xfrom
feat-rust-sdk
Mar 26, 2026
Merged

feat: add Rust SDK support#11614
ChiragAgg5k merged 7 commits into1.9.xfrom
feat-rust-sdk

Conversation

@ChiragAgg5k
Copy link
Copy Markdown
Member

Summary

  • Add Rust SDK entry to server platform in app/config/sdks.php (beta, dev)
  • Wire up Rust language class in SDK generation task (SDKs.php)
  • Update sdk-generator dependency to dev-rust branch
  • Create docs/sdks/rust/CHANGELOG.md

Test plan

  • Run SDK generation for Rust: docker compose exec appwrite sdks --sdk=rust
  • Verify generated Rust SDK compiles
  • Confirm other SDK generation is unaffected

Add Rust SDK entry to server platform config, wire up the Rust language
class in the SDK generation task, update sdk-generator to dev-rust branch,
and create the changelog directory.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 23, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 8a4332ee-d289-4878-b018-05173f56d57b

📥 Commits

Reviewing files that changed from the base of the PR and between 915a8bf and 918f1d3.

⛔ Files ignored due to path filters (1)
  • composer.lock is excluded by !**/*.lock
📒 Files selected for processing (1)
  • phpstan-baseline.neon
💤 Files with no reviewable changes (1)
  • phpstan-baseline.neon

📝 Walkthrough

Walkthrough

This pull request adds support for the Rust SDK to the Appwrite platform. The changes include: registering a new Rust server SDK entry in the configuration with associated metadata (version, repository URLs, and git details), importing and handling the Rust language class in the SDK task processor, and removing an obsolete PHPStan baseline error entry. The modifications follow existing patterns for SDK integration and require no structural or logic changes to the platform's core architecture.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'feat: add Rust SDK support' clearly and directly summarizes the main change in the pull request: adding support for the Rust SDK.
Description check ✅ Passed The description is directly related to the changeset, providing a clear summary of changes, listing affected files, and outlining a concrete test plan for verifying the Rust SDK implementation.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat-rust-sdk

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@ChiragAgg5k ChiragAgg5k changed the base branch from 1.8.x to 1.9.x March 23, 2026 12:25
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Mar 23, 2026

Greptile Summary

This PR adds Rust SDK support to Appwrite by registering the SDK in the platform config, wiring up the Rust language class in the SDK generation task, adding the initial changelog, and bumping the sdk-generator dependency to the dev-rust branch. The SDK-side changes are clean and consistent with how other SDKs are integrated, but the composer.json dependency change raises a concern before this lands in the release branch.

Key changes:

  • app/config/sdks.php: New Rust SDK entry correctly marked beta: true / dev: true, pointing to crates.io and the sdk-for-rust GitHub repo.
  • src/Appwrite/Platform/Tasks/SDKs.php: use Rust import and case 'rust' switch branch added correctly.
  • docs/sdks/rust/CHANGELOG.md: Initial 0.1.0 changelog created.
  • composer.json / composer.lock: sdk-generator is pinned to the unstable dev-rust branch (0e3195f…) instead of a stable release tag — this should be resolved before merging to 1.8.x. Additionally, both repositories VCS override blocks for utopia-php/database were removed as an unrelated side-effect, switching that package's resolution from VCS to Packagist.

Confidence Score: 2/5

  • Not safe to merge to a release branch while sdk-generator is pinned to a dev branch.
  • The SDK registration logic itself is correct and low-risk. However, pinning appwrite/sdk-generator to dev-rust (an unstable branch) in a 1.8.x release branch is a meaningful risk: any future composer update will pull an unpredictable HEAD commit. The unrelated removal of the utopia-php/database VCS repository also warrants separate review. Both issues should be resolved before merge.
  • composer.json and composer.lock require attention — specifically the dev-rust branch dependency and the removal of the utopia-php/database VCS repository override.

Important Files Changed

Filename Overview
composer.json Pins appwrite/sdk-generator to the unstable dev-rust branch instead of a stable release; also removes both repositories VCS override blocks for utopia-php/database as an unrelated side-effect.
composer.lock Lock file updated to reflect sdk-generator at dev-rust commit 0e3195f941a5c415a0f8fe12a3d1c005394f0eae; utopia-php/database now sourced from Packagist (adds notification-url, removes custom autoload-dev/scripts). Changes are consistent with composer.json.
app/config/sdks.php Adds the Rust SDK entry with all expected fields correctly set (beta: true, dev: true, proper crates.io package URL, VCS details). No issues found.
src/Appwrite/Platform/Tasks/SDKs.php Adds use Appwrite\SDK\Language\Rust import and a case 'rust' branch to the SDK switch statement. Wiring is correct and consistent with other SDK entries.
docs/sdks/rust/CHANGELOG.md New changelog file for the Rust SDK with an initial 0.1.0 entry. No issues found.

Reviews (1): Last reviewed commit: "Merge branch '1.9.x' into feat-rust-sdk" | Re-trigger Greptile

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
composer.json (1)

102-102: Use a stable version constraint instead of dev-rust branch.

The dev-rust branch constraint should be temporary. Once the Rust SDK support is merged into the main sdk-generator repository, update this to a stable version (e.g., 1.11.10 or *). Branch constraints are fragile and can break unexpectedly if the branch is deleted or renamed.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@composer.json` at line 102, The composer dependency "appwrite/sdk-generator":
"dev-rust" is using a branch constraint; update the constraint to a stable
version to avoid fragility—replace "dev-rust" with an appropriate released
version specifier (for example "1.11.10" or a caret range like "^1.11.10" or "*"
if you need to allow any stable release) in the composer.json dependency entry
for appwrite/sdk-generator so Composer uses a published tag instead of the dev
branch.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@composer.json`:
- Line 102: The composer dependency "appwrite/sdk-generator": "dev-rust" is
using a branch constraint; update the constraint to a stable version to avoid
fragility—replace "dev-rust" with an appropriate released version specifier (for
example "1.11.10" or a caret range like "^1.11.10" or "*" if you need to allow
any stable release) in the composer.json dependency entry for
appwrite/sdk-generator so Composer uses a published tag instead of the dev
branch.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 97c303cf-1aa7-4f38-96d6-0c191f42d237

📥 Commits

Reviewing files that changed from the base of the PR and between 995deea and 1a1740a.

⛔ Files ignored due to path filters (2)
  • composer.lock is excluded by !**/*.lock
  • docs/sdks/rust/CHANGELOG.md is excluded by !docs/sdks/**
📒 Files selected for processing (3)
  • app/config/sdks.php
  • composer.json
  • src/Appwrite/Platform/Tasks/SDKs.php

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 23, 2026

🔄 PHP-Retry Summary

Flaky tests detected across commits:

Commit 1a1740a - 2 flaky tests
Test Retries Total Time Details
UsageTest::testFunctionsStats 1 10.14s Logs
UsageTest::testPrepareSitesStats 1 8ms Logs
Commit ce5d5cf - 3 flaky tests
Test Retries Total Time Details
UsageTest::testFunctionsStats 1 10.14s Logs
UsageTest::testPrepareSitesStats 1 7ms Logs
TablesDBCustomServerTest::testIncrementAttribute 1 240.47s Logs
Commit ef6fdc6 - 2 flaky tests
Test Retries Total Time Details
FunctionsScheduleTest::testCreateScheduledAtExecution 1 127.40s Logs
UsageTest::testVectorsDBStats 1 10.08s Logs
Commit 918f1d3 - 1 flaky test
Test Retries Total Time Details
UsageTest::testVectorsDBStats 1 10.11s Logs

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 23, 2026

✨ Benchmark results

  • Requests per second: 1,541
  • Requests with 200 status code: 277,356
  • P99 latency: 0.112658387

⚡ Benchmark Comparison

Metric This PR Latest version
RPS 1,541 1,043
200 277,356 187,787
P99 0.112658387 0.21696736

@ChiragAgg5k ChiragAgg5k merged commit 9353fbf into 1.9.x Mar 26, 2026
41 of 42 checks passed
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.

3 participants