rust-bindgen icon indicating copy to clipboard operation
rust-bindgen copied to clipboard

macro_fallback with many headers fails because pch file name is too long

Open corecode opened this issue 3 months ago • 1 comments

When generating bindings for many headers, try_ensure_fallback_translation_unit fails because pch is constructed with a excessively long filename. Replacing it just by "precompile.h.pch" fixes this.

corecode avatar Sep 13 '25 16:09 corecode

A workaround is to create a header full of #includes and then only using .header() for that one file.

corecode avatar Sep 15 '25 13:09 corecode