Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • G gnome-class
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 32
    • Issues 32
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 3
    • Merge requests 3
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Federico Mena Quintero
  • gnome-class
  • Issues
  • #8
Closed
Open
Issue created Mar 13, 2018 by Federico Mena Quintero@federicoOwner

Brainstorm how to generate GObject Introspection data automatically, plus C header files

It should be possible to make our procedural macro generate GObject Introspection data (foo.gir) automatically. This will let the generated code be consumed by language bindings, like if it were written in C.

While we are at it, it should also be possible to generate C header files for the generated GObject API.

I'm not sure how this should work. Should this be specified in the same place as the gobject_gen! invocation? (Is it possible to specify attributes before a proc macro invocation?)

#[generate_gir("foo.gir")]
#[generate_c_header("foo.h")]
gobject_gen! {
    "foo.gir",
    "foo.h",

    class Foo {
        ...
    }

    impl Foo {
        ...
    }
}
Assignee
Assign to
Time tracking