Emilio Cobos Álvarez

Results 779 comments of Emilio Cobos Álvarez

So you want to put non-repr(C) stuff inside repr(C) structs and pass those by value? That sounds to me like, unless those types are very simple, it could go wrong...

So the only thing that it potentially allows you is to avoid a heap allocation, right?

cbindgen doesn't hook into the rust compiler so it doesn't seem particularly easy to do it in the general case.

Hmm, right... I think the issue is that cbindgen is not parsing `epoll_event` / `sockaddr` so it doesn't really know it's a struct rather than e.g. an enum. We could...

Yeah... in practice in Firefox we use cbindgen from the cli interface for these kinds of things.

A reduced test-case or link to that repository would be useful to be able to investigate this.

So like `[export.include]`?

Using features should work, as long as you define it in the features section. It should generate `#ifdef`d functions nontheless. It may be an option to treat a feature as...