HomePhabricator
Diffusion Comm 3fb5533c5d5d

[services] Tunnelbroker - Creating Cargo config file for Tunnelbroker as a Rust…

Description

[services] Tunnelbroker - Creating Cargo config file for Tunnelbroker as a Rust app

Summary:
This diff is a part of the flat diffs stack to transform the current Tunnelbroker project into a Rust app by calling the current C++ codebase from Rust. The related transition task is ENG-1072.

This diff creates the Cargo project file for the Tunnelbroker application and its dependencies.

Related Linear task: ENG-2061

Dependencies description:
cxx - Needed for the C++ and Rust interop.
cxx-build - Building C++ codebase.
glob - Used in the helper function to traverse the directory for .cpp files (used in D5434).
tracing - We will use it for logging in threads.
log - Logging.
env_logger - Getting log level from env variable.
tokio - Asynchronous runtime needed for Tokio and our threads.
lazy_static - Lazy static initialization.
a2 - Notification library dependency.
fcm - Notification library dependency.
anyhow - Trait object-based error type for easy idiomatic error handling, that is used in the Notification library.
openssl - Notification library dependency.
tonic - gRPC server dependency (used in D5477).
tonic-build - Compiling the proto file (used in D5360).
prost - Tonic dependency (used in D5477).
prost-types - gRPC well-known types dependency (used in D5477).
futures - Used for handling stream in Tonic (used in D5477).

CI Notice:
The CI will fail on these diffs until the D5461 with the changes to CI build commands.
This stack will be landed all in one to prevent CI from failing on diffs out of this stack.

Test Plan:
Run nix develop from the root of the repo.
Go to tunnelbroker service directory services/tunnelbroker and run the Cargo building process cargo build or cargo run.
The Rust application will be successfully built.

Reviewers: jon, varun, marcin, tomek, ashoat

Reviewed By: jon, tomek, ashoat

Subscribers: ashoat, tomek, atul, abosh

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