-
Notifications
You must be signed in to change notification settings - Fork 192
Rust SDK #137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rust SDK #137
Conversation
Fix Licence Name in cargo.toml and Indentation in the twig templates
templates/rust/Cargo.toml.twig
Outdated
| @@ -0,0 +1,18 @@ | |||
| [package] | |||
| name = "appwrite" | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@eldadfux this should not be hardcoded right? we need to get packageName?
| // | ||
|
|
||
| use std::path::PathBuf; | ||
| use appwrite; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No hard coding appwrite
templates/rust/src/lib.rs.twig
Outdated
|
|
||
| ```toml | ||
| [dependencies] | ||
| appwrite = "1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here, hardcoded
+ Allow package name to be changed in the sdk-generator for rust
…Onic/sdk-generator into rust-language-support
lohanidamodar
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Simple change, everything else looks in order.
Also, Is it possible to have example too? Example seems empty.
templates/rust/README.md.twig
Outdated
| To install via [Crates.io](https://www.crates.io/) add the following to your Cargo.toml under dependencies: | ||
|
|
||
| ```toml | ||
| appwrite = "1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we remove this hardcoded appwrite too?
|
I have been working on a playground which will show a bit more of how it works, also rust's documentation tool generates a few examples which will be shown on the crate's doc.rs page once its been uploaded |
The examples we generate are used on the official Appwrite documentation 👍🏻 |
+ Added Example Generation + Changed example in README.md to use variable package name
|
I have added template generation aswell as fixing the README.md package name |
Added first implementation of Exceptions into the Rust SDK
lohanidamodar
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small change, rest looks good.
|
|
||
| 'web' => [ | ||
| 'class' => 'Appwrite\SDK\Language\Web', | ||
| 'build' => [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@PineappleIOnic you should remove the extra white spaces here
templates/rust/Cargo.toml.twig
Outdated
| [package] | ||
| name = "{{ language.params.packageName }}" | ||
| version = "{{ sdk.version }}" | ||
| authors = ["Bradley Schofield <ionicisere@gmail.com>"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be updated to be Appwrite official 😉
| // WARNING! DO NOT RUN THIS TEST IF YOU ARE NOT USING THE APPWRITE SDK-GENERATOR TESTING STACK | ||
| // IT WILL FAIL! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of this test file - can we just locally consume the package and use a test script that will not be part of this repo?
var/cache/composer/.htaccess
Outdated
| @@ -0,0 +1 @@ | |||
| Deny from all No newline at end of file | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't know where this var/ directory comes from?
…ovements tests(rust): improvements
|
Closing this PR as the Response Model PR is closer to the final SDK. |
This PR has Template files and Tests for a Appwrite Rust SDK,
I have also written the foo bar tests and ran them myself to confirm that this SDK works correctly, This SDK Conforms as closely as it can with the Rust Language's Standards so it shouldn't compile with any warnings.
Currently the API is blocking I/O but I plan to add async support in the future behind a feature in the crate which I'm quite excited to do considering I'm not very good with async rust.
Thanks for reviewing the PR,
IOnicisere