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 + alloc support for ucd-util #1

Closed
wants to merge 1 commit into from

Conversation

ZackPierce
Copy link

What

The addition of feature flags and conditional compilation blocks to make ucd-util work in either std or no_std + alloc environments.

The default-on "std" feature flag controls whether or not to compile in #![no_std] mode, but due to the presence of String in core APIs, the "alloc" feature flag must also specified and the toolchain fixed to nightly.

How

As usual, building and testing for standard use does not change.

From the repo's root directory test out the no_std build with at nightly toolchain:

cargo test --lib --manifest-path ucd-util/Cargo.toml --no-default-features --features "alloc"

Why

This PR is part of an effort to get regex and its dependencies to operate in no_std + alloc mode, and ucd-util is used by regex-syntax, which regex uses.

See also: BurntSushi/utf8-ranges#8 and BurntSushi/aho-corasick#28

@BurntSushi
Copy link
Owner

@ZackPierce Thanks! I'd like to discuss this process more with you here: rust-lang/regex#476

@BurntSushi
Copy link
Owner

I'm going to close this for now as stale. (regex no longer depends on ucd-util, but I'd generally be happy to make this an alloc-only crate at some point in the future.)

@BurntSushi BurntSushi closed this Jan 9, 2020
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