Message-ID: <20230404105015.2a1a65fa@Tarkus>
Date: 2023-04-04T07:50:15Z
From: Ivan Krylov
Subject: Breaking Change in Rcomplex Layout?
In-Reply-To: <3787c02c-2f7a-96b7-3299-35734db89a0f@gmail.com>
On Tue, 4 Apr 2023 09:31:33 +0200
Tomas Kalibera <tomas.kalibera at gmail.com> wrote:
> it also matters how Rust can handle anonymous nested structures, or
> what is the right mapping of the involved C types to Rust
It's worth mentioning that Rust's RFC 2102 [1] defines unnamed structs
and unions for the purpose of C interoperability, but it's not yet
implemented.
Would it help Rust's bindgen (and, potentially, other C declaration
parsers) if R could optionally give a name to the anonymous union
member, like it's done in Windows API [2]?
--
Best regards,
Ivan
[1] https://github.com/rust-lang/rust/issues/49804
[2] https://devblogs.microsoft.com/oldnewthing/20170907-00/?p=96956