youyuanwu / msquic-tokio Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
0.56 generated code has the right struct
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Networking_WinSock"))]
pub struct QUIC_API_TABLE {//
0.57 this struct is missing and APIs are not usable.
Due to: microsoft/windows-rs#3100
given winmd:
public struct QUIC_SETTINGS
{
[StructLayout(LayoutKind.Explicit)]
public struct _Anonymous1_e__Union
{
public struct _IsSet_e__Struct
{
[NativeBitfield("MaxBytesPerKey", 0L, 1L)]
[NativeBitfield("HandshakeIdleTimeoutMs", 1L, 1L)]
public ulong _bitfield;
}
[FieldOffset(0)]
public ulong IsSetFlags;
[FieldOffset(0)]
public _IsSet_e__Struct IsSet;
}
public _Anonymous1_e__Union Anonymous1;
public ulong MaxBytesPerKey;
public ulong HandshakeIdleTimeoutMs;
}
There is no NativeBitfield support in generated Rust:
#[repr(C)]
pub struct QUIC_SETTINGS {
pub Anonymous1: QUIC_SETTINGS_0,
pub MaxBytesPerKey: u64,
pub HandshakeIdleTimeoutMs: u64
}
#[repr(C)]
pub union QUIC_SETTINGS_0 {
pub IsSetFlags: u64,
pub IsSet: QUIC_SETTINGS_0_0,
}
#[repr(C)]
pub struct QUIC_SETTINGS_0_0 {
pub _bitfield: u64,
}
C code is like this that is used to generate winmd:
typedef struct QUIC_SETTINGS {
union {
uint64_t IsSetFlags;
struct {
uint64_t MaxBytesPerKey : 1;
uint64_t HandshakeIdleTimeoutMs : 1;
} IsSet;
};
} QUIC_SETTINGS;
The intended use in c:
// config
QUIC_SETTINGS Settings = {0};
Settings.MaxBytesPerKey = 1000;
Settings.IsSet.MaxBytesPerKey = TRUE;
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.