Skip to content

Best practices for multiple large header files? #2877

@Supreeeme

Description

@Supreeeme

I have several (5-10+) ~6000 line headers I want to generate bindings for. (These headers have a lot of the same types but I post-process the bindings from bindgen to deduplicate them.) My question is what is the best practice to efficiently generate bindings for these files? Obviously I can stick them all in one bindgen call, but that seems to really slow down as I add headers. My second thought was to split up the bindgen invocations and run them in parallel, but with fewer files this seems slower than just doing it all in one call.

Is there some kind of best number of lines/files where it makes sense to split invocations across threads? Or is bindgen already multi threaded and this is pointless?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions