This repository was archived by the owner on Nov 26, 2020. It is now read-only.

Description
Rust's powerful macro system can greatly improve readability for the generated code and facilitate creation of bindings by hand, should such a need arise.
Ideally, declarations of binding types for GObject could look like this:
gobject_decl! {
class FileInputStream : InputStream {
type_fn g_file_input_stream_get_type();
}
sync class Cancellable {
type_fn g_cancellable_get_type();
}
interface AsyncResult {
type_fn g_async_result_get_type();
}
}
The type structs and much of the boilerplate traits for type ID, casting and wrapping can be generated from such compact descriptions.
Another area to benefit from macroization is transformation of parameters and output values between Rust and C.