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

serde: enable no-std support #296

Merged
merged 2 commits into from Jan 31, 2023
Merged

serde: enable no-std support #296

merged 2 commits into from Jan 31, 2023

Conversation

nim65s
Copy link
Contributor

@nim65s nim65s commented Jan 26, 2023

Hi,

This PR enable no-std support on serde, ref. https://serde.rs/no-std.html

Otherwise, trying to compile a project with bitflags 2.0.0-rc.1 -F serde on --target=thumbv7m-none-eabi currently hangs with a huge number of eg.

error[E0432]: unresolved imports `self::core::cmp`, `self::core::iter`, `self::core::mem`, `self::core::num`, `self::core::ptr`, `self::core::slice`, `self::core::str`
   --> /home/nim/.cargo/registry/src/github.com-1ecc6299db9ec823/serde-1.0.152/src/lib.rs:167:26

Copy link
Member

@KodrAus KodrAus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @nim65s! I don't think we need the derive feature here since we only derive serde traits in tests.

Cargo.toml Outdated Show resolved Hide resolved
Co-authored-by: Ashley Mannix <kodraus@hey.com>
Copy link
Member

@KodrAus KodrAus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @nim65s! This is a great catch 👍

@KodrAus KodrAus merged commit 3cd7a61 into bitflags:main Jan 31, 2023
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

Successfully merging this pull request may close these issues.

None yet

2 participants