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
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
Unknown Object (File)
Mon, Jun 17, 1:10 PM
Unknown Object (File)
Sun, Jun 16, 11:21 PM
Unknown Object (File)
Sat, Jun 15, 7:13 AM
Unknown Object (File)
Fri, Jun 14, 3:47 AM
Unknown Object (File)
Thu, Jun 13, 9:53 AM

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
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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 ↗(On Diff #15595)

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 ↗(On Diff #15595)

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.