We should not expose libc (or any other uncontrolled libraries) in our external inferences. This is brittle for both our library and the downstream libraries. What I recommend is that if we expose an interface that we intent to be used by the client, we either use a native rust type or define our own for the interface.
eg *const libc::c_void should either be *const () (as glutin uses) or *const void where void is defined as a public type by our library.
I suspect that this style should be applied to other projects (glfw, gl-rs) but for now making sure we are following it would be a good start to helping sanitize the rust gamedev ecosystem.
The rule should be there is no API inside of gfx that requires an added [dependencies] section in the Cargo.toml file of a downstream project. The exception is when the library is an extension of the another, gfx_window_glutin.
We should not expose
libc
(or any other uncontrolled libraries) in our external inferences. This is brittle for both our library and the downstream libraries. What I recommend is that if we expose an interface that we intent to be used by the client, we either use a native rust type or define our own for the interface.eg
*const libc::c_void
should either be*const ()
(asglutin
uses) or*const void
wherevoid
is defined as a public type by our library.I suspect that this style should be applied to other projects (
glfw
,gl-rs
) but for now making sure we are following it would be a good start to helping sanitize the rust gamedev ecosystem.The rule should be there is no API inside of
gfx
that requires an added[dependencies]
section in theCargo.toml
file of a downstream project. The exception is when the library is an extension of the another,gfx_window_glutin
.