Emilio Cobos Álvarez

Results 777 comments of Emilio Cobos Álvarez

Oh! Ok I was indeed thinking the other way around, that the "fast case" would be changing the structs and not the API.

This is a more general problem of cbindgen not being quite module-aware. Maybe we could export the top-level crate module documentation as the top-level header docs or something though.

So, how would the ideal API for this look like? Would a way to parse, but not emit items in an specific module / crate be enough here?

Yeah, we filter out stuff later after parsing, so we still get the parsing warnings. My guess is that this shouldn't be hard to fix.

I couldn't reproduce the issue with `cbindgen src/lib.rs --config cbindgen.toml`, checking out that branch. It generates the expected code... How are you invoking cbindgen?

Ah, ok, I can repro that, thank you :)

You can probably use byte literals instead, so `const READY = b'A'`, which is the right thing to do anyway. Supporting casts may be doable though. I don't plan to...

which clang version are you using? Also, it's weird that clang has g++ symlinked to clang, lol. Removing this line should work around it anyhow: https://github.com/eqrion/cbindgen/blob/a519f1bda444a0c6c01464296a052d9a05e1d9c4/tests/tests.rs#L89

Can you paste the `offsetof` error? Other than that I think it's expected that some tests (the ones for nightly-only features) work only on nightly. We could skip it if...

The `the option Z is only accepted on the nightly compiler` is expected, that is testing Nightly-only features. The -Z flag comes from here: https://github.com/eqrion/cbindgen/blob/3527e0f1e3c4e8da4f235166b36cb093c2018af6/src/bindgen/cargo/cargo_expand.rs#L120 The `test_enum` failure is unexpected...