Page MenuHomePhabricator

[services] Tunnelbroker - Add Cargo manifest file
ClosedPublic

Authored by max on Jul 14 2022, 7:17 AM.
Tags
None
Referenced Files
F3586912: D4534.id14502.diff
Mon, Dec 30, 12:29 AM
Unknown Object (File)
Thu, Dec 26, 7:30 AM
Unknown Object (File)
Thu, Dec 26, 7:30 AM
Unknown Object (File)
Thu, Dec 26, 7:30 AM
Unknown Object (File)
Thu, Dec 26, 7:30 AM
Unknown Object (File)
Fri, Dec 20, 11:59 PM
Unknown Object (File)
Fri, Dec 20, 8:57 PM
Unknown Object (File)
Fri, Dec 20, 6:16 PM

Details

Summary

This diff introduces a Rust Cargo manifest file for the notification library wrapper in Rust for using it from C++ using corrosion tool.

Linear task: ENG-1330

Test Plan

No tests, this is a manifest-only file. This file will be updated with the dependencies and built using cargo build in a follow-up diff of the stack.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

max held this revision as a draft.
max published this revision for review.Jul 14 2022, 7:22 AM
max edited the summary of this revision. (Show Details)
max edited the test plan for this revision. (Show Details)
max added reviewers: karol, varun, tomek.
varun requested changes to this revision.Jul 14 2022, 7:52 AM

can we make the directory services/tunnelbroker/rust-notifications? the convention in rust is for the directory name to match the package name

services/tunnelbroker/rust/Cargo.toml
3 ↗(On Diff #14488)

small nit

5 ↗(On Diff #14488)

typically the last number is reserved for patches

This revision now requires changes to proceed.Jul 14 2022, 7:52 AM
In D4534#129014, @varun wrote:

can we make the directory services/tunnelbroker/rust-notifications? the convention in rust is for the directory name to match the package name

In the case of Rust to C++ integration, we need a "wrapper" for it, that's why our Rust notification library is a kind of adapter between the C and Rust packages functions. To use any other packages we need to include this adapter library. That's why even if we will add another package to use from Rust we should still import only one Rust adapter library to call Rust API from C++. That's why I think it's better to use something common like rust or rust-lib...

services/tunnelbroker/rust/Cargo.toml
3 ↗(On Diff #14488)

small nit

Thx!

5 ↗(On Diff #14488)

typically the last number is reserved for patches

As a pre-release (Alpha) I used 0 versions, but I don't mind we are switching to the first ;)

max marked 2 inline comments as done.
In D4534#129137, @geekbrother wrote:
In D4534#129014, @varun wrote:

can we make the directory services/tunnelbroker/rust-notifications? the convention in rust is for the directory name to match the package name

In the case of Rust to C++ integration, we need a "wrapper" for it, that's why our Rust notification library is a kind of adapter between the C and Rust packages functions. To use any other packages we need to include this adapter library. That's why even if we will add another package to use from Rust we should still import only one Rust adapter library to call Rust API from C++. That's why I think it's better to use something common like rust or rust-lib...

ok, then all of the code pertaining to the rust-notifications package should be in a subdirectory services/tunnelbroker/rust/rust-notifications

Description and version number was changed.

varun requested changes to this revision.Jul 14 2022, 10:56 AM

back to your queue to address most recent comment

This revision now requires changes to proceed.Jul 14 2022, 10:56 AM
services/tunnelbroker/rust/Cargo.toml
3 ↗(On Diff #14488)

also i don't think this was fixed in the most recent revision

In D4534#129150, @varun wrote:
In D4534#129137, @geekbrother wrote:
In D4534#129014, @varun wrote:

can we make the directory services/tunnelbroker/rust-notifications? the convention in rust is for the directory name to match the package name

In the case of Rust to C++ integration, we need a "wrapper" for it, that's why our Rust notification library is a kind of adapter between the C and Rust packages functions. To use any other packages we need to include this adapter library. That's why even if we will add another package to use from Rust we should still import only one Rust adapter library to call Rust API from C++. That's why I think it's better to use something common like rust or rust-lib...

ok, then all of the code pertaining to the rust-notifications package should be in a subdirectory services/tunnelbroker/rust/rust-notifications

We would have only one adapter Rust library and will have an empty folder with a subfolder inside in this case. It doesn't look good to me.
services/tunnelbroker/rust-notifications is much better compared to an empty nesting...

I don't mind changing it to the services/tunnelbroker/rust-notifications if it looks much more organic way for you.

max added inline comments.
services/tunnelbroker/rust/Cargo.toml
3 ↗(On Diff #14488)

also i don't think this was fixed in the most recent revision

Seems we had a "race condition" )) It was fixed on a recent update. Thanks!

max marked an inline comment as done.

The Rust directory was changed to services/tunnelbroker/rust-notifications from services/tunnelbroker/rust.
.gitignore file is updating on the updated Rust directory for the Tunnelbroker.

max removed a reviewer: tomek. max added 1 blocking reviewer(s): varun.Jul 15 2022, 8:39 AM
This revision is now accepted and ready to land.Jul 15 2022, 10:12 AM
services/tunnelbroker/rust-notifications/Cargo.toml
6

Seems like we should use the same license here as do in the mainline repo

max added inline comments.
services/tunnelbroker/rust-notifications/Cargo.toml
6

Seems like we should use the same license here as do in the mainline repo

Seems it is. I've put D4552 with the license changes in all Cargo.toml files in the project.