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

[ucd] [char] [utils] Make libraries no_std #179

Merged
merged 13 commits into from
Nov 6, 2017
Merged

[ucd] [char] [utils] Make libraries no_std #179

merged 13 commits into from
Nov 6, 2017

Conversation

behnam
Copy link
Member

@behnam behnam commented Nov 6, 2017

Most of the transition was a matter of changing the namespace from std to core.

  • Unit tests for Display implementations are moved into integration tests, allowing use of format!() in test code.

  • [char-range] needed special attention, because of having an API using std::collections::Bound as input. Although the datatype is safe for core, it's part of liballoc APIs and therefore not available in libcore. Therefore, a new std feature is added to the package, which enables the part of the API.

  • [char-range] Feature implementations are refactored into separate files to simplify configuration conditioning.

  • [char-property] To be able to be used in no_std libraries, had to bring in some code for ASCII-case-insensitive char and str matching.

  • [char-property] The char_property!() macro now depends on the caller package to include extern crate core; explicitly iff it's a normal (use-std) package.

Tracker: #144

behnam added 13 commits November 2, 2017 13:57
Testing `fmt::Display` under `no_std` can get too much overhead,
therefore it's moved to `tests/` so it can use `std::string` and
friends.
Add `std` feature, which enabled the API based on `std::collections::Bound`.

Add example code that tests the library in use-std environment. (A
no-std example to be added later.)
@behnam behnam added this to the UNIC-0.7 milestone Nov 6, 2017
@behnam
Copy link
Member Author

behnam commented Nov 6, 2017

bors: r+

bors bot added a commit that referenced this pull request Nov 6, 2017
179: [ucd] [char] [utils] Make libraries no_std r=behnam a=behnam

Most of the transition was a matter of changing the namespace from `std` to `core`.

* Unit tests for `Display` implementations are moved into integration tests, allowing use of `format!()` in test code.

* [`char-range`] needed special attention, because of having an API using `std::collections::Bound` as input. Although the datatype is safe for core, it's part of `liballoc` APIs and therefore not available in `libcore`. Therefore, a new `std` feature is added to the package, which enables the part of the API.

* [`char-range`] Feature implementations are refactored into separate files to simplify configuration conditioning.

* [`char-property`] To be able to be used in `no_std` libraries, had to bring in some code for ASCII-case-insensitive char and str matching.

* [`char-property`] The `char_property!()` macro now depends on the caller package to include `extern crate core;` explicitly iff it's a normal (use-std) package.
@bors
Copy link
Contributor

bors bot commented Nov 6, 2017

Build succeeded

@bors bors bot merged commit 53f7796 into master Nov 6, 2017
@behnam behnam deleted the no-std branch November 6, 2017 12:13
bors bot added a commit that referenced this pull request Nov 6, 2017
180: [ucd] [char] Make libraries no_std r=behnam a=behnam

Follow up on <#179>, marking more libraries as `no_std`.

Rename `unic-ucd-core` to `unic-ucd-version`, as `core` is a language library and `version` represents better what the component is providing.

Tracker: <#144>
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