mozilla / cbindgen

A project for generating C bindings from Rust code
Mozilla Public License 2.0
2.38k stars 307 forks source link

Bindgen error in build.rs when ran from tarpaulin #382

Open xd009642 opened 5 years ago

xd009642 commented 5 years ago

When running cbindgen::generate_with_config in the build.rs it works fine unless the project is built via cargo-tarpaulin where the following error is returned CargoMetadata("polyline-ffi/Cargo.toml", Json(Error("EOF while parsing a value", line: 1, column: 0))) .

Reference tarpaulin issue and example project https://github.com/xd009642/tarpaulin/issues/241 https://github.com/urschrei/polyline-ffi

Wondering if this is an actual error or whether there's some part of Cargo::Config which could stop this from working?

emilio commented 5 years ago

What is cargo-tarpaulin? Does master work? There were a bunch of fixes to cargo projects.

xd009642 commented 5 years ago

A code coverage tool, it sets some linker flags and runs cargo to build a project. I'll try it again when I get home tonight

xd009642 commented 4 years ago

I tried again an the issue persists with the latest version on crates.io I didn't install from github though. I can do that again if there are changes between 0.9.1 and the latest master that may affect things. What is the CargoMetadata and how does cbindgen get it?