**App building:**
1. Rust:
Run `cargo build` from `services/tunnelbroker/rust-notifications` directory.
Rust library will be successfully built.
2. C++ (Docker):
Running `run run-tunnelbroker-service` successfully built the Rust library and link it.
3. C++ (Nix):
Call `cd services/tunnelbroker`.
Running `rm -dfr build && cmake -B build . && make -C build -j4` successfully built the Rust library and link it.
**Notifications testings:**
Library notifications push method can be called from the C++ as:
```
#include "rust_notifications/src/lib.rs.h"
#include "rust/cxx.h"
...
const fcmReturnStatus result = sendNotifToFCM = sendNotifToFCM(
char const *fcmAPIKey,
char const *deviceRegistrationID,
char const *messageTitle,
char const *messageBody
);
```
Behavior testings:
- Test where errors are not related to the tokens appears and must be thrown and caught by the C++ `catch`:
- Wrong server key throws a Rust exception error.
- Test token-related errors:
- Wrong token format returns an `fcmReturnStatus` enum with the value of `InvalidRegistration`.
- The client requested a new token and we are sending notifs to the old one: return a `fcmReturnStatus` enum with the value of `NotRegistered`.
- Test with good device token:
- Returns an `fcmReturnStatus` enum with the value of `Ok`.