-
Notifications
You must be signed in to change notification settings - Fork 12
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
Update Rust client SDK quickstart for 1.0 API #162
base: master
Are you sure you want to change the base?
Conversation
A whole bunch of stuff has changed since this document was last updated. Notably, I've chosen to re-order a bunch of sections, since the previous structure of the document doesn't make much sense after the 0.12 API rework.
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.
Read over document. It all makes sense and introduces the material well.
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.
I am following this quickstart as part of doing the release and I ran into a few simple issues. It currently doesn't build so please fix before merging:
Boppy@JASKIER MINGW64 ~/clockwork/quickstart-rust-sdk (master)
$ cargo run
Compiling quickstart-rust-sdk v0.1.0 (C:\Users\Boppy\clockwork\quickstart-rust-sdk)
error[E0433]: failed to resolve: use of undeclared crate or module `credentials`
--> src\main.rs:48:21
|
48 | fn creds_store() -> credentials::File {
| ^^^^^^^^^^^ use of undeclared crate or module `credentials`
|
help: consider importing this module
|
2 + use spacetimedb_sdk::credentials;
|
error[E0433]: failed to resolve: use of undeclared crate or module `credentials`
--> src\main.rs:49:5
|
49 | credentials::File::new("quickstart-chat")
| ^^^^^^^^^^^ use of undeclared crate or module `credentials`
|
help: consider importing one of these structs
|
2 + use std::fs::File;
|
2 + use spacetimedb_sdk::credentials::File;
|
help: if you import `File`, refer to it directly
|
49 - credentials::File::new("quickstart-chat")
49 + File::new("quickstart-chat")
|
warning: unused import: `spacetimedb_sdk::credentials::File`
--> src\main.rs:3:5
|
3 | use spacetimedb_sdk::credentials::File;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
warning: unused variable: `ctx`
--> src\main.rs:170:17
|
170 | fn on_sub_error(ctx: &ErrorContext, err: Error) {
| ^^^ help: if this is intentional, prefix it with an underscore: `_ctx`
|
= note: `#[warn(unused_variables)]` on by default
For more information about this error, try `rustc --explain E0433`.
warning: `quickstart-rust-sdk` (bin "quickstart-rust-sdk") generated 2 warnings
error: could not compile `quickstart-rust-sdk` (bin "quickstart-rust-sdk") due to 2 previous errors; 2 warnings emitted
There are still warnings here but it builds now
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.
After my edit this works
A whole bunch of stuff has changed since this document was last updated. Notably, I've chosen to re-order a bunch of sections, since the previous structure of the document doesn't make much sense after the 0.12 API rework.
Assuming this gets approved, we should likely copy these structural changes into the TS and C# versions as well.