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
F3270076: D4807.id15929.diff
Sat, Nov 16, 4:20 AM
Unknown Object (File)
Tue, Nov 12, 12:13 PM
Unknown Object (File)
Tue, Nov 12, 8:51 AM
Unknown Object (File)
Sat, Nov 9, 3:42 AM
Unknown Object (File)
Fri, Nov 8, 5:12 AM
Unknown Object (File)
Tue, Nov 5, 9:10 AM
Unknown Object (File)
Oct 15 2024, 8:55 PM
Unknown Object (File)
Oct 10 2024, 5:00 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.