Hi all,
Thanks to the ##rust IRC wizards, I was able to get past a code organization problem. The problem was as follows:
I have a lib crate, let's call it mylib
, which has a bunch of dependencies that require a library -- somelib
.
My compilation target does not include libc, which somelib
makes a few calls to. What we had was a module in mylib
that stubbed out the libc calls with extern { } (they do nothing basically) and we vendor the entire somelib
.
Now, I have moved out somelib
source to a new crate -- somelib-sys
, and moved the stubbed libc extern functions to lib.rs
of somelib-sys
. Much nicer. In mylib
i can now use somelib-sys
as a dependency.
The new problem is that, in order for mylib
to actually find the symbols in lib.rs
of somelib-sys
I have to use somelib-sys;
even though I don't actually call those extern functions in mylib
(only the dependencies do...). So now I have to allow unused imports.
Is there a problem with this new organization or usage of sys crate?