Crates.io | firebase-app-sdk |
lib.rs | firebase-app-sdk |
version | 0.1.4 |
source | src |
created_at | 2023-06-21 20:48:09.592066 |
updated_at | 2023-06-25 16:04:21.722738 |
description | Firebase-App Sdk |
homepage | https://github.com/Deaths-Door/firebase-app-rs |
repository | https://github.com/Deaths-Door/firebase-app-rs |
max_upload_size | |
id | 896517 |
size | 22,165 |
The Firebase App SDK for Rust provides a Rust API for integrating Firebase services into your Rust applications. This SDK allows you to easily access Firebase features such as authentication, real-time database, storage, and more.
To use the Firebase App SDK in your Rust project, add the following line to your Cargo.toml
file:
[dependencies]
firebase_app_sdk = "0.1.4" #Latest version at time of writing
To interact with Firebase services, you need to create an App
instance with the required options. Here's an example:
use firebase_app::{App,DEFAULT,Options};
fn main() {
let options = Options::new("YOUR_APPLICATION_ID", "YOUR_API_KEY")
.with_database_url("YOUR_DATABASE_URL")
.with_storage_bucket("YOUR_STORAGE_BUCKET");
let app = App::new(DEFAULT, options);
}
Once you have created an App instance, you can pass it to other Firebase services for further interactions. Here's an example of using the app instance with the Firebase Authentication service:
use firebase_app::{App,DEFAULT,Options};
use firebase_auth::Authentication;
fn main() {
let options = Options::new("YOUR_APPLICATION_ID", "YOUR_API_KEY").with_auth_domain("YOUR_AUTH_DOMAIN");
let app = App::new(DEFAULT, options);
// Use the app instance with the Firebase Authentication service
let auth = Authentication::new(&app);
// Perform authentication operations using the `auth` instance
}
Please note that the examples provided here are simplified and serve as a starting point. Refer to the documentation of each Firebase service for detailed usage instructions. For comprehensive documentation of the crate, please visit the crate documentation for a better understanding of the crate's functionalities and APIs.
Contributions to the Firebase App SDK are welcome! If you encounter any issues or have suggestions for improvements, please submit an issue or pull request on the project's GitHub repository.