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

feat: support no_std #15

Merged
merged 3 commits into from
Aug 27, 2024
Merged

feat: support no_std #15

merged 3 commits into from
Aug 27, 2024

Conversation

CPunisher
Copy link
Contributor

closes #12

  1. bytes and simdutf8 support for no_std makes it possible for faststr to support no_std.

  2. According to https://doc.rust-lang.org/cargo/reference/features.html#dependency-features:

    The "package-name/feature-name" syntax will also enable package-name if it is an optional dependency. Often this is not what you want. You can add a ? as in "package-name?/feature-name" which will only enable the given feature if something else enables the optional dependency.

    Changing serde/std to serde?/std decreases the library size from 159kb to 142kb on aarch64.

@CLAassistant
Copy link

CLAassistant commented Aug 25, 2024

CLA assistant check
All committers have signed the CLA.

@PureWhiteWu
Copy link
Contributor

Thanks very much for your contribution!

Could you please add an CI accourding to https://www.lurklurk.org/effective-rust/no-std.html#writing-code-for-no_std ?

Copy link
Contributor

@PureWhiteWu PureWhiteWu left a comment

Choose a reason for hiding this comment

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

Thanks again for your contribution!

@PureWhiteWu PureWhiteWu merged commit 68ea98a into volo-rs:main Aug 27, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Support no_std environment
3 participants