quinn-rs / quinn

Async-friendly QUIC implementation in Rust
Apache License 2.0
3.57k stars 364 forks source link

Add CI for mobile platforms (iOS & Android) #1778

Open thomaseizinger opened 3 months ago

thomaseizinger commented 3 months ago

Currently, quinn (and quinn-udp) is only tested on Linux, Windows and MacOS: https://github.com/quinn-rs/quinn/blob/main/.github/workflows/rust.yml#L36

There have been a number of PRs that fix things on other platforms:

All of those have only been validated with manual testing which isn't great for maintenance. Simple refactorings could easily break those features again.

It would be great to test the features of GRO & GSO as well as retrieval of the additional packet meta data on Android as well as iOS.

grodin commented 3 months ago

I could help with the Android side of this.

I think the likely most straightforward solution is to run the test binary generated by cargo on the official Android emulator. There are well maintained GH actions to assist with provisioning emulators for different versions of Android and different profiles, so there'll be some investigation to find out what kernels those correspond to but it seems eminently doable.

I think it's only fair to warn you that Android can be a major pain to support though; every device manufacturer ships a custom version of Android, from the kernel to the user space and up to the Android platform APIs, often with a number of incompatibilities.

The upshot of this is you may find things failing in the wild which pass CI (unless your CI includes testing on a decent number of real devices, which is obviously slow and costly. Most large Android apps do this one way or another.)

I don't want to be too pessimistic though, it's possible none of the above will matter for this project! I just thought it was fair to bring it up as you mentioned elsewhere you didn't have much Android dev experience.