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

Progress towards no_std #865

Merged
merged 17 commits into from
Jul 19, 2021
Merged

Conversation

Manishearth
Copy link
Member

Progress towards #812

This contains some progress towards no_std support. The main accomplishments of this PR are:

  • Most of the utils are no_std compatible now
  • serde is built with no_std unless otherwise necessary.

This should not regress any behavior, and should generally be desirable for these crates anyway. We do not use any of serde's std features, so we do not need to pull it in with std. Rust unifies features so if icu4x is used by a crate that does need serde-with-std, it will pull in the appropriate dependency as needed.

There is nothing to test as a result of this PR since we do not yet have a complete icu_capi no_std build.

Making a PR now because this work bitrots really easily.

@codecov-commenter
Copy link

Codecov Report

Merging #865 (b5a5421) into main (56b5cf8) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #865      +/-   ##
==========================================
+ Coverage   74.35%   74.37%   +0.01%     
==========================================
  Files         206      206              
  Lines       13042    13032      -10     
==========================================
- Hits         9697     9692       -5     
+ Misses       3345     3340       -5     
Impacted Files Coverage Δ
utils/writeable/src/lib.rs 90.00% <ø> (ø)
utils/yoke/src/lib.rs 100.00% <ø> (ø)
utils/yoke/src/macro_impls.rs 0.00% <ø> (ø)
utils/yoke/src/yoke.rs 88.88% <ø> (ø)
utils/yoke/src/yokeable.rs 81.81% <ø> (ø)
utils/yoke/src/zero_copy_from.rs 77.77% <ø> (ø)
utils/writeable/src/ops.rs 100.00% <100.00%> (ø)
provider/core/src/resource.rs 82.02% <0.00%> (-0.17%) ⬇️
components/locale_canonicalizer/src/provider.rs 8.00% <0.00%> (ø)
experimental/provider_ppucd/src/parse_ppucd.rs 93.13% <0.00%> (+0.13%) ⬆️
... and 4 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 56b5cf8...b5a5421. Read the comment docs.

@coveralls
Copy link

coveralls commented Jul 17, 2021

Pull Request Test Coverage Report for Build 2fdce6248056fa6a7326998b4f61fe45ec4ad2f9-PR-865

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • 33 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.02%) to 74.411%

Files with Coverage Reduction New Missed Lines %
experimental/segmenter/src/line_breaker.rs 33 81.69%
Totals Coverage Status
Change from base Build e30e7c3f491feb84f30214bc0b1dc751b191e9dc: -0.02%
Covered Lines: 9820
Relevant Lines: 13197

💛 - Coveralls

@@ -13,6 +13,8 @@ tidy = "make tidy"
# field-reassign-with-default: https://github.com/rust-lang/rust-clippy/issues/6559 (fixed in nightly but not stable)
clippy-all = "clippy --all-features --all-targets -- -D warnings -Aclippy::field-reassign-with-default"

check-thumb = "check --target thumbv7m-none-eabi"
Copy link
Member Author

Choose a reason for hiding this comment

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

I can remove these if necessary

Copy link
Member

Choose a reason for hiding this comment

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

Request: Add a comment for what these are for

@@ -13,6 +13,8 @@ tidy = "make tidy"
# field-reassign-with-default: https://github.com/rust-lang/rust-clippy/issues/6559 (fixed in nightly but not stable)
clippy-all = "clippy --all-features --all-targets -- -D warnings -Aclippy::field-reassign-with-default"

check-thumb = "check --target thumbv7m-none-eabi"
Copy link
Member

Choose a reason for hiding this comment

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

Request: Add a comment for what these are for

@@ -2,6 +2,8 @@
// called LICENSE at the top level of the ICU4X source tree
// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).

#![cfg_attr(not(test), no_std)]
Copy link
Member

Choose a reason for hiding this comment

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

Request: Make this more consistent between writeable and yoke

sffc
sffc previously approved these changes Jul 19, 2021
@Manishearth Manishearth requested a review from sffc July 19, 2021 17:36
@Manishearth Manishearth merged commit a837779 into unicode-org:main Jul 19, 2021
@Manishearth Manishearth deleted the no-std-one branch July 19, 2021 18:29
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.

4 participants