HomePhabricator
Diffusion Comm 13f2e1f40883

[services] Tunnelbroker - Update CMakeLists and Cargo build with the CXX…

Description

[services] Tunnelbroker - Update CMakeLists and Cargo build with the CXX integration updates

Summary:
This diff updates CMakeLists file to use corrosion-cxx.cmake from D4805 and it's function add_library_rust to use Corrosion and CXX to build and link Rust library to the C++ app. To use CXX bridge the build.rs file was also added.

Related Linear task: ENG-1438

Test Plan:
Building in Docker:
Run yarn run-tunnelbroker-service successfully built the app, rust library, and link it to the app.

Building in Nix:
Run nix develop, cd services/tunnelbroker, rm -dfr build && cmake -B build . && make -C build -j4, successfully built the app, rust library, and link it to the app.

Reviewers: karol, varun, jon, tomek

Reviewed By: jon, tomek

Subscribers: ashoat, tomek, adrian, atul, karol, abosh

Differential Revision: https://phab.comm.dev/D4807