Firebase Cloud Messaging (FCM) Rust Service
A professional Rust library for sending Firebase Cloud Messaging (FCM) notifications with ease and efficiency.
What is fcm-service?
fcm-service is a lightweight and efficient Rust library that enables seamless integration with Firebase Cloud Messaging (FCM). It allows developers to send push notifications to devices across platforms securely using Google Cloud authentication.
Features
- Simple and easy-to-use API
- Secure authentication via Google Cloud Service Account
- Fully asynchronous using
tokio - Supports structured FCM messages
- Customizable notification payloads
- Well-tested with included unit tests
Installation
To use fcm-service, add the following to your Cargo.toml:
[]
= "0.2.3"
Alternatively, if using GitHub as the source:
[]
= { = "https://github.com/real-ali/fcm-service" }
Usage
Here’s a quick example demonstrating how to send an FCM notification:
use ;
async
Authentication
This service uses a Google Cloud service account JSON file to authenticate API calls. Make sure you have a valid credential file from Google Cloud and provide its path when initializing the FcmService.
Running Tests
To ensure everything is working correctly, run:
Example Test Cases
Package Information
[]
= "fcm-service"
= "0.1.0"
= "2021"
= "A Rust library for sending Firebase Cloud Messaging (FCM) notifications"
= "MIT"
= "https://github.com/real-ali/fcm-service"
= "https://docs.rs/fcm-service"
= ["fcm", "firebase", "notifications", "push"]
= ["api-bindings", "network-programming"]
Dependencies
[]
= { = "0.11", = ["json"] }
= { = "1.0", = ["derive"] }
= "1.0"
= { = "1.0", = ["macros"] }
= "0.12.3"
[]
= { = "1.0", = ["full"] }
= "3.10"
Author
Designed & Developed by Sayed Ali Sina Hussaini
Social Links
- Twitter: real_alisina
- GitHub: real-ali
License
This project is licensed under the MIT License.
Contributors ✨
Thanks goes to these wonderful people (emoji key):
This project follows the all-contributors specification. Contributions of any kind welcome!