Oh wait this is build dep vs real deep. Quick fix is to build with --target=$host
-
-
Replying to @ManishEarth @rustlang
I'm building for thumbv8m.main-none-eabi, which is set as the default target in .cargo/config.toml
1 reply 0 retweets 1 like -
Replying to @therealjpster @rustlang
Oh, hmm. In that case the build dependency should get compiled separately anyway, no? I guess feature unification happens beforehand :(
1 reply 0 retweets 0 likes -
yeah p sure this is a long standing cargo issue that different kinds of deps all share which features are enabled
1 reply 0 retweets 1 like -
Yeah, I think I've seen it before. Makes embedded projects a roll of the dice. Everything was fine until I added 'heapless' and my two dep trees turn overlapped.
2 replies 0 retweets 1 like -
Replying to @therealjpster @fitzgen and
I was trying to be good - I deleted my hacky 'SmallString' implementation and replaced it with heapless:: String. Feels like I've been punished for doing the right thing.
1 reply 0 retweets 1 like -
Wait actually: do you *need* the no_std support? Because if you just want the crate to be shared with std mode, the problem is the byteorder crate's feature flags
1 reply 0 retweets 0 likes -
Replying to @ManishEarth @therealjpster and
Like I said, features are supposed to be additive, so the right thing to do is a default std feature, not a non-default no_std feature. If byteorder does that, it then becomes easy for you to use.
1 reply 0 retweets 0 likes -
Replying to @ManishEarth @therealjpster and
If you actually need your non-build-dep to be built in no_std mode, that's where the cargo bug kicks in
2 replies 0 retweets 0 likes -
I have fixed my build using cargo's patch feature. I've vendored
@burntsushi5's byteorder locally and deleted the default=["std"] line, and patched that into my tree. Now it's all happy.1 reply 0 retweets 0 likes
It sounds like that implies a crate you're using depends on byteorder, but unnecessarily keeps the std feature enabled. Otherwise, if it needed std, then I think your patch here would have failed?
-
-
Replying to @burntsushi5 @ManishEarth and
std is default, so yes, one of my transitive deps could have disabled default features on byteorder but didn't bother. Not sure I can blame them though.
0 replies 0 retweets 0 likesThanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.