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

Add #![no_std] compatibility #60

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ben-krieger
Copy link

  • Add std feature flag to allow disabling std lib for no_std environments
  • Add tests to ensure no_std support isn't broken by future changes
  • Add documentation on how to use library in a no_std environment

Note: extern crate alloc is still required, but I didn't want to add another alloc feature flag, since virtually nothing would be possible without it.

@@ -185,6 +194,7 @@ impl QrCode {

/// Checks whether a module at coordinate (x, y) is a functional module or
/// not.
#[cfg(feature = "std")]
Copy link
Author

Choose a reason for hiding this comment

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

Note that this is the only function actually enabled with std. All other std usage is already behind svg and image flags.

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.

1 participant