rust-bindgen
rust-bindgen copied to clipboard
Add annotation-based custom field attributes support
This PR adds support for specifying custom field attributes through annotations.
Given the following input,
struct S {
/// <div rustbindgen attribute="#[Attr1] #[Attr2]" attribute="#[Attr3(value)]"></div>
int field_1;
char field_2;
};
the generated bindings will contain the specified attributes
pub struct S {
/// <div rustbindgen attribute="#[Attr1] #[Attr2]" attribute="#[Attr3(value)]"></div>
#[Attr1]
#[Attr2]
#[Attr3(value)]
pub field_1: ::std::os::raw::c_int,
pub field_2: ::std::os::raw::c_char,
}
r? @emilio
Error: The feature assign is not enabled in this repository.
To enable it add its section in the triagebot.toml in the root of the repository.
Please file an issue on GitHub at triagebot if there's a problem with this bot, or reach out on #t-infra on Zulip.
Hey! Is there any chance this patch will get considered any soon?