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 alloc and no_std features #12

Merged
merged 5 commits into from
Jun 12, 2024
Merged

Add alloc and no_std features #12

merged 5 commits into from
Jun 12, 2024

Conversation

mycognosist
Copy link
Collaborator

  • Adds feature flags
    • std (enabled by default)
    • alloc
    • dev

I have followed the no_std support pattern used by wasm-bindgen, ie. define a std feature which is enabled by default and conditionally provides extra functionality.

The IntoVec types are not compiled if neither the std nor alloc features are selected.

The dev flag compiles the scramblers for use with fuzzers.

@AljoschaMeyer
Copy link
Contributor

Nice =)

Could you make sure that cargo doc provides docs as if all flags were enabled, and then merge?

@mycognosist
Copy link
Collaborator Author

Good thinking! That should now be the case; I have explicitly added #[cfg(doc)] for the scrambler modules and type exports.

@mycognosist mycognosist merged commit 86cb00c into main Jun 12, 2024
1 check failed
@mycognosist mycognosist deleted the add_alloc_nostd_features branch June 12, 2024 13:20
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.

2 participants