[services] Tunnelbroker - Rust APNS push notifications A2 library wrapper
Summary:
This is a Rust a2 apns push notifications library wrapper for using the library in the C++ codebase to send the push notifications to iOS devices.
Linear task: ENG-1303
Test Plan:
- Rust:
Patch to D4807 (top of the stack) using arc patch D4807.
Run cargo build from services/tunnelbroker/rust-notifications directory.
Rust library will be successfully built.
- C++ (Docker):
Patch to D4807 (top of the stack) using arc patch D4807.
Running run run-tunnelbroker-service successfully built the Rust library and link it.
- C++ (Nix):
Patch to D4807 (top of the stack) using arc patch D4807.
Call cd services/tunnelbroker.
Running rm -dfr build && cmake -B build . && make -C build -j4 successfully built the Rust library and link it.
Library apns notifications push method can be called from the C++ as:
#include "rust-notifications/src/lib.rs.h" #include "rust/cxx.h" ... const unsigned short responseCode = sendNotifToAPNS( char const *certificatePath, char const *certificatePassword, char const *deviceToken, char const *message, bool const *sandbox );
Reviewers: tomek, karol, jon
Reviewed By: tomek, jon
Subscribers: varun, jon, ashoat, tomek, adrian, atul, karol, abosh
Differential Revision: https://phab.comm.dev/D4540