**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 apnsReturnStatus result = sendNotifToAPNS(
char const * cert_path,
char const * cert_pass,
char const * device_token,
char const * message_body,
bool true);
```
**Behavior testings:**
- Test when the error is not `ResponseError` type:
- Wrong certificate path or password will throw a Rust Result exception which is caught by the `catch`. (Produces read error message).
- Test when wrong device token is provided:
- Function returns an `apnsReturnStatus` enum with the value of `BadDeviceToken`.
- Test with good device token:
- Function returns an `apnsReturnStatus` enum with the value of `Ok`.