dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
14.63k stars 4.57k forks source link

[QUIC] Source generators for interop calls #75009

Open ManickaP opened 1 year ago

ManickaP commented 1 year ago

Introduce a source generator for interop calls from: https://github.com/dotnet/runtime/blob/main/src/libraries/System.Net.Quic/src/System/Net/Quic/Internal/MsQuicApi.NativeMethods.cs. Consider addressing comments:

ghost commented 1 year ago

Tagging subscribers to this area: @dotnet/ncl See info in area-owners.md if you want to be subscribed.

Issue Details
Introduce a source generator for interop calls from: https://github.com/dotnet/runtime/blob/main/src/libraries/System.Net.Quic/src/System/Net/Quic/Internal/MsQuicApi.NativeMethods.cs. Consider addressing comments: - make them static, hide `ApiTable` and `Api`: https://github.com/dotnet/runtime/pull/74669#issuecomment-1229853340 - customize `Open...` methods to directly create `MsQuicContextSafeHandle`: https://github.com/dotnet/runtime/pull/74669#discussion_r959823243 - include native call logging - we might create another logging source for this and for callback event details, which logging might be generalized: https://github.com/dotnet/runtime/pull/74479#discussion_r953526173 - common logging issue for Quic: https://github.com/dotnet/runtime/issues/51177
Author: ManickaP
Assignees: -
Labels: `area-System.Net.Quic`
Milestone: 8.0.0
teo-tsirpanis commented 1 year ago

Would #63590 cover your needs?

jkoritzinsky commented 1 year ago

I think we can handle this with https://github.com/dotnet/runtime/pull/68276. MSQuic's table-based API was one of the motivating ideas behind the "no-implicit-this" support in that PR.

ManickaP commented 1 year ago

Triage: we have a functional interop layer in place, there isn't many API changes coming from msquic and this is not a simple task. For those reasons putting into future.