Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/workflows/sdk-build-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ jobs:
- sdk: kotlin
platform: server

- sdk: rust
platform: server

# Console SDKs
- sdk: cli
platform: console
Expand Down Expand Up @@ -140,6 +143,10 @@ jobs:
with:
dotnet-version: '8.0.x'

- name: Setup Rust
if: matrix.sdk == 'rust'
uses: dtolnay/rust-toolchain@1.83.0

- name: Build SDK
working-directory: examples/${{ matrix.sdk }}
run: |
Expand Down Expand Up @@ -193,6 +200,10 @@ jobs:
dotnet)
dotnet build
;;
rust)
cargo build --release
cargo test --lib
;;
*)
echo "Unknown SDK: ${{ matrix.sdk }}"
exit 1
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ jobs:
Ruby27,
Ruby30,
Ruby31,
Rust183,
AppleSwift56,
Swift56,
WebChromium,
Expand Down
8 changes: 8 additions & 0 deletions example.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
use Appwrite\SDK\Language\Android;
use Appwrite\SDK\Language\Kotlin;
use Appwrite\SDK\Language\ReactNative;
use Appwrite\SDK\Language\Rust;

try {

Expand Down Expand Up @@ -266,6 +267,13 @@ function configureSDK($sdk, $overrides = []) {
configureSDK($sdk);
$sdk->generate(__DIR__ . '/examples/graphql');
}

// Rust
if (!$requestedSdk || $requestedSdk === 'rust') {
$sdk = new SDK(new Rust(), new Swagger2($spec));
configureSDK($sdk);
$sdk->generate(__DIR__ . '/examples/rust');
}
}
catch (Exception $exception) {
echo 'Error: ' . $exception->getMessage() . ' on ' . $exception->getFile() . ':' . $exception->getLine() . "\n";
Expand Down
4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
profile="jinja"
extension="twig"

ignore="H012,H025,H030,H031,T001,T002,T027,T032"
ignore="H009,H012,H023,H025,H030,H031,T001,T002,T027,T032"
# H009: lowercase tag names - false positive for Rust generics like <P: AsRef<Path>>
# H012: spaces around = - false positive for TypeScript generics like <T = Models.Document>
# H023: entity references - false positive for Rust references like &Client, &str
# H025: orphan tags - false positive for code generics like <T>, <String>, <Exception>
# H030/H031: meta description/keywords (not applicable to SDK code templates)
# T001: whitespace in tags - {%~ is intentional Twig whitespace control
Expand Down
Loading
Loading