Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Firebase Rust SDK
Idiomatic Rust SDK for Firebase Authentication and Cloud Firestore with full async/await support and gRPC transport.
⚠️ Unofficial Port: This is an unofficial community port of the Firebase C++ SDK. It is not affiliated with, endorsed by, or supported by Google or Firebase.
⚠️ Beta Release: This is version 0.1.0-beta. APIs are stabilizing but may still change before 1.0.0. Suitable for development and testing.
Features
Firebase Authentication
- ✅ Email/password authentication
- ✅ Anonymous authentication
- ✅ OAuth providers (Google, Facebook, GitHub, generic OAuth)
- ✅ Custom token authentication
- ✅ Password reset
- ✅ Automatic token refresh
- ✅ User management (profile, password, email updates)
- ✅ Auth state change listeners (Rust Streams)
Cloud Firestore
- ✅ Document CRUD operations via gRPC
- ✅ Queries with filters, ordering, pagination
- ✅ WriteBatch for atomic operations
- ✅ Transactions with automatic retry
- ✅ Real-time listeners using gRPC streaming (documents & queries)
- ✅ Aggregation queries (COUNT, SUM, AVERAGE)
- ✅ Settings configuration (host, SSL, cache)
- ✅ Nested collections
- ✅ Compound filters (And/Or)
- ✅ GeoPoint, Timestamp support
- ⚠️ Offline persistence API (structure ready, implementation pending)
Installation
Add to your Cargo.toml:
[]
= "0.1.0-beta"
= { = "1", = ["full"] }
Quick Start
See the documentation for detailed API reference.
Setup
- Create a Firebase project at console.firebase.google.com
- Enable Authentication and Firestore in your project
- Get your API key and project ID from project settings
Basic Usage
use ;
async
Requirements
- Rust 1.75 or later
- Tokio runtime
- Firebase project with Authentication and Firestore enabled
Architecture
- Auth: REST API for authentication operations
- Firestore: gRPC with TLS for all database operations
- Async: Full async/await with Tokio
- Streaming: Real-time listeners use Rust Stream trait
- Type-safe: Strong typing for all Firebase types
Development Status
This SDK is in active development. Core functionality is complete, but some features are pending:
- ✅ All Auth features implemented and tested
- ✅ All Firestore CRUD operations working
- ✅ Real-time listeners with gRPC streaming
- ✅ Transactions and batched writes
- ⚠️ Offline persistence (API ready, implementation pending)
Testing
The SDK includes 24 comprehensive integration tests. To run them:
- Copy
.env.exampleto.env - Fill in your Firebase credentials
- Run:
cargo test --test firestore_integration -- --test-threads=1
Contributing
Contributions welcome! This project follows the design patterns from the Firebase C++ SDK while using idiomatic Rust patterns.
License
MIT License - see LICENSE file for details.
Credits
Based on the Firebase C++ SDK architecture. This is an independent implementation and is not officially supported by Google or Firebase.