Closed
Description
In our project we use rustc nightly-2021-10-15
and we encountered a compiler bug that prevents us upgrading from hyper 0.13, warp 0.2, reqwest 0.10, tokio 0.2
to hyper 0.14, warp 0.3, reqwest 0.11, tokio 1.2
(working, not working commit).
It seems that the cause is the C ffi:
Line 23 in 8062714
Removing that line solves the issue: alexkornitzer@1199048
I know that this is not exactly a bug in hyper
, but since the C API is unstable I wonder if there is a way to set that crate-type
only in the build that generates the C library. At least, until the compiler is fixed.
Metadata
Metadata
Assignees
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
seanmonstar commentedon Nov 5, 2021
Unfortunately we currently can't. There's no way for people to enable only a
cdylib
on-demand. But #2685 is tracking that.sfackler commentedon Nov 5, 2021
Couldn't the C interface be moved to a separate crate from
hyper
itself?seanmonstar commentedon Nov 5, 2021
The C interface makes uses of private details, so to use them in a separate crate would require making those "public".
bjorn3 commentedon Nov 5, 2021
An option would be to only expose them when a certain cfg is used. If it is something like
foo
and notfeature = "foo"
you can only set it usingRUSTFLAGS
and not when specifying it as dependency.