Skip to content

Over 100 MB of warnings emitted during bindgen build #47

Closed
@intgr

Description

@intgr

When building the postgres.rs file generated by bindgen, lots and lots of warnings are emitted like the following:

warning: `extern` block uses type `u128` which is not FFI-safe: 128-bit integers don't currently have a known stable ABI
 --> .../target/debug/build/pg-extend-f7ddabc2586f2e23/out/postgres.rs:3:186600
  |
3 | # [ repr ( C ) ] # [ derive ( Copy ...

This is annoying because line number 3 contains all the code in the generated bindings file, multiplying its size, which results in console output of 183 MB! This can also hide other more relevant warnings.

I couldn't figure out a way to suppress this warning. But I don't understand why all the generated code is on one line, given that bindgen is instructed to use rustfmt:

    let bindings = bindgen::Builder::default()
        ...
        .rustfmt_bindings(true)

Do you have any idea why this is or should I contact bindgen upstream?

Any idea if there may be other solutions to this issue?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions