Page MenuHomePhabricator

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

Authored by max on Aug 11 2022, 4:15 AM.
Tags
None
Referenced Files
F2131675: D4807.diff
Thu, Jun 27, 6:58 PM
F2125096: D4807.id.diff
Thu, Jun 27, 12:22 AM
Unknown Object (File)
Wed, Jun 26, 5:09 AM
Unknown Object (File)
Wed, Jun 26, 12:56 AM
Unknown Object (File)
Wed, Jun 26, 12:01 AM
Unknown Object (File)
Wed, Jun 19, 7:03 PM
Unknown Object (File)
Wed, Jun 19, 5:32 AM
Unknown Object (File)
Mon, Jun 17, 4:16 PM

Details

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.

Diff Detail

Repository
rCOMM Comm
Branch
update-tunnelbroker-cmake-with-cxx
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

max held this revision as a draft.

Add distinguish between Nix and Docker path for cmake-components.

Rebasing on a parent changes.

max edited the test plan for this revision. (Show Details)
max added reviewers: karol, varun, jon, tomek.
max edited the summary of this revision. (Show Details)
max edited the summary of this revision. (Show Details)
jon requested changes to this revision.Aug 12 2022, 9:53 AM
jon added inline comments.
services/tunnelbroker/rust-notifications/build.rs
2

To force clang to use a more recent C++ standard

This revision now requires changes to proceed.Aug 12 2022, 9:53 AM

Add flag_if_supported("-std=c++17") and rebased on a changes.

max added inline comments.
services/tunnelbroker/rust-notifications/build.rs
2

To force clang to use a more recent C++ standard

Good catch. Done.

max marked an inline comment as done.

Rebase on the parent changes.

This revision is now accepted and ready to land.Aug 23 2022, 7:30 AM

Rebase on parent changes and corrosion-cxx.cmake directory changes.

Failure to build in a Docker will be fixed by copying the cxx-corrosion cmake file in a follow-up update of this diff.

ESLint Failure is not related to these changes:

fetch-pack: unexpected disconnect while reading sideband packet

Rebase on the parent changes.

Rebased on parent changes.

This revision was landed with ongoing or failed builds.Sep 6 2022, 5:21 AM
This revision was automatically updated to reflect the committed changes.