gi-rust / grust

GObject introspection bindings for the Rust programming language
GNU Lesser General Public License v2.1
37 stars 3 forks source link

A generation mode for -sys crates #24

Closed mzabaluev closed 9 years ago

mzabaluev commented 9 years ago

A smaller goal than #1 is to implement the generation mode to produce just the sys crates, to stop manually editing the currently maintained -sys crates and enable generation of many more linkage crates from GIR.

A list of existing -sys crates that could benefit from this:

gkoz commented 9 years ago

To be clear, has any progress toward this goal been made so far?

mzabaluev commented 9 years ago

There is an old branch, 'codegen', with some preliminary groundwork in Python reusing the parser and AST from gobject-introspection.

gkoz commented 9 years ago

Some observations after playing with GIR... As mentioned in #1, typelibs alone are indeed inadequate for this purpose.

I'm sure there's more. So even this smaller goal requires kludges, possibly some manual overlay definitions.

mzabaluev commented 9 years ago

@gkoz GIR XML has none of those issues, and that is what I intend to use as the source format.

gkoz commented 9 years ago

Interesting. I've been making the XMLs out of typelibs assuming they're equivalent. I'll have to try generating them from sources then.

gkoz commented 9 years ago

You're right, the GIR definitions generated from source files are much more comprehensive, they should be workable.

mzabaluev commented 9 years ago

Development of the generator is underway in https://github.com/gi-rust/grust-gen.