Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use of build-dependency cargo-metadata breaks no_std crates that use serde #268

Closed
ho-ho-ho opened this issue Aug 5, 2021 · 2 comments
Closed

Comments

@ho-ho-ho
Copy link

ho-ho-ho commented Aug 5, 2021

cargo-metadata depends on serde with std enabled.
Using another crate which depends on serde - even when used in a no_std context - therefore forces usage of std (related to rust-lang/cargo#5730 ), rendering it unable to compile for a thumb target.
I've ran into this issue today when trying to use the usbd-hid crate and it failed to compile because of that :(

Would it be possible to remove the dependency on cargo-metadata?

@ho-ho-ho
Copy link
Author

ho-ho-ho commented Aug 5, 2021

Well looks like I posted too soon ...
for everyone running into this problem: the new cargo resolver already fixed that (adding resolver = "2" to Cargo.toml package section works).

@ho-ho-ho ho-ho-ho closed this as completed Aug 5, 2021
@Sh3Rm4n
Copy link
Member

Sh3Rm4n commented Aug 6, 2021

Thanks for reporting that either way.

It is definitely important to know, that it does not work with resolver = "1" and as that is still the default IIRC it should be mentioned somewhere to use the newer resolver.

Fortunately the MSRV is 1.51 because of minimal const generics support and that is also the version, where the new resolver is released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants