containerd / ttrpc-rust

Rust implementation of ttrpc (GRPC for low-memory environments)
Apache License 2.0
197 stars 47 forks source link

Android support #167

Closed powturns closed 1 year ago

powturns commented 1 year ago

AOSP has vsock support via the cuttlefish hypervisor. This PR enables vsock functionality on android, in addition to linux.

codecov[bot] commented 1 year ago

Codecov Report

Base: 25.95% // Head: 25.95% // No change to project coverage :thumbsup:

Coverage data is based on head (d31099a) compared to base (8c27584). Patch coverage: 100.00% of modified lines in pull request are covered.

:exclamation: Current head d31099a differs from pull request most recent head 15fe7ed. Consider uploading reports for the commit 15fe7ed to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #167 +/- ## ======================================= Coverage 25.95% 25.95% ======================================= Files 16 16 Lines 2416 2416 ======================================= Hits 627 627 Misses 1789 1789 ``` | [Impacted Files](https://codecov.io/gh/containerd/ttrpc-rust/pull/167?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=containerd) | Coverage Δ | | |---|---|---| | [src/asynchronous/server.rs](https://codecov.io/gh/containerd/ttrpc-rust/pull/167/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=containerd#diff-c3JjL2FzeW5jaHJvbm91cy9zZXJ2ZXIucnM=) | `0.00% <ø> (ø)` | | | [src/common.rs](https://codecov.io/gh/containerd/ttrpc-rust/pull/167/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=containerd#diff-c3JjL2NvbW1vbi5ycw==) | `34.57% <ø> (ø)` | | | [src/sync/server.rs](https://codecov.io/gh/containerd/ttrpc-rust/pull/167/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=containerd#diff-c3JjL3N5bmMvc2VydmVyLnJz) | `0.00% <ø> (ø)` | | | [src/proto.rs](https://codecov.io/gh/containerd/ttrpc-rust/pull/167/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=containerd#diff-c3JjL3Byb3RvLnJz) | `90.16% <100.00%> (ø)` | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=containerd). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=containerd)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

powturns commented 1 year ago

It seems like clippy got new lints in 1.65 which is causing unchanged parts of this PR to fail the build.

I previously had attempted to fix some of these in an isolated commit, but now I believe the volume of them warrants a separate merge request.

Tim-Zhang commented 1 year ago

@powturns Thank you for your pull request and sorry for the late response, We will review it ASAP.

Tim-Zhang commented 1 year ago

@mxpv @lifupan @liubin would you mind taking a look at this patch? thank you!

powturns commented 1 year ago

Any opinions on how to resolve the clippy errors? Should I rebase on top of something?

liubin commented 1 year ago

@powturns there is a hint about how to fix:

error: the borrowed expression implements the required traits --> build.rs:17:17 17 .inputs(&["src/ttrpc.proto"]) ^^^^^^^^^^^^^^^^^^^^ help: change this to: ["src/ttrpc.proto"]

= note: -D clippy::needless-borrow implied by -D warnings

powturns commented 1 year ago

Would you like me do the fixes in this MR? Do you know if the lint failures are due to new linting rules or due to new language features in 1.65? My concern would be by fixing some of the lint failures, I inadvertently increase the minimum rust version.

liubin commented 1 year ago

@powturns We do not specify a Rust version in GitHub actions, it may be the reason that leads to this clippy warning @Tim-Zhang .

And I think you can add a separate commit to fix the clippy warning in shit PR.

Tim-Zhang commented 1 year ago

@powturns @liubin We already have a pr https://github.com/containerd/ttrpc-rust/pull/166 which try to fix it. Though it has some problems, I think we could wait for the author one or two days.

Tim-Zhang commented 1 year ago

And I will force merge this by ignoring CI errors.