-
Notifications
You must be signed in to change notification settings - Fork 24
Description
A common feature among unicode crates is that many of them are no_std
or are opt-out std
.
Do we want to support the no_std
use case? If we do, we should do so soon to avoid including std
things in our crates.
For the UCD at the very least, no_std
does not seem difficult. char_property
works as-is with #![no_std] use core as std
. (caveat: my small test didn't cover the macro...) char_range
works so long as the Bound
-based construction API is gated on std
support. utils
has iter_all_chars
still (why? that should probably be removed since we have CharRange
) which returns a Box
, but works if that is dropped.
A quick search of the ucd
directory shows one use of std::collections
, which is in a test. Other than that, I don't think any non-core
apis are used in ucd. std::ascii
fn can be easily shimmed for those that are being used (I know they exist some places). I mean, we're writing a text-processing library, I hope we could shim it 😆.
Working in a no_std
would also force us to think Iterator-first, as we would no longer have allocating APIs available at all.
normal
has one use of VecDeque
. Other than that, String
, and std::ascii
, I don't think we're using any non-core APIs in the libraries. (I of course exclude the source generation tools.)