Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,19 @@ edition = "2018"

[features]
default = [ "std" ]
std = [ "alloc", "serde/std", "unicode-normalization/std" ]
std = [ "alloc", "serde/std", "unicode-normalization?/std" ]
rand = [ "crate_rand", "rand_core" ]
alloc = [ "unicode-normalization" ]
alloc = []
unicode-normalization = [ "dep:unicode-normalization", "alloc" ]

Choose a reason for hiding this comment

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

doesn't work in old rust

Copy link

Choose a reason for hiding this comment

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

@stevenroose What was the ancient Rust version we need to get it to work on? :D

Copy link

Choose a reason for hiding this comment

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

@elsirion I guess we don't really need to use dep: which is somehow recent addition.

And we can have unicode-normalization-std to avoid using ?.


# Note: English is the standard for bip39 so always included
chinese-simplified = []
chinese-traditional = []
chinese-simplified = [ "unicode-normalization" ]
chinese-traditional = [ "unicode-normalization" ]
czech = []
french = []
italian = []
japanese = []
korean = []
japanese = [ "unicode-normalization" ]
korean = [ "unicode-normalization" ]
Comment on lines +22 to +28
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Idk if that's the right way to go about it, but it seems reasonable to want UN if you are dealing with these languages. I can also make it an entirely optional feature, which is cleaner but imo risks misuse.

portuguese = []
spanish = []

Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ pub extern crate rand_core;
#[cfg(feature = "serde")]
pub extern crate serde;

#[cfg(feature = "alloc")]
#[cfg(feature = "unicode-normalization")]
use alloc::borrow::Cow;
use core::{fmt, str};

Expand Down