Conversation
Unfortunately, this is a breaking change, for two reasons:
So there are problems here, but I think they can be solved. It's a little annoying to need 2.0 though -- do you have a motivating use case for this? If it's just "because we can", I'd say we shouldn't bother...
Yeah, style-wise I'd prefer to use |
|
|
||
| pub mod collections { | ||
| pub mod hash_map { | ||
| pub use hashmap_core::map::*; |
There was a problem hiding this comment.
I just realized this changes our default RandomState type, normally defined only in std, which is also a breaking change.
There was a problem hiding this comment.
Yes, I think hashmap_core should be dropped from this PR, because it only adds this, which we don't want.
We'd like to not have a default hasher, that should work, and not have IndexMap::new() at all when we are no-std.
IMHO we don't need to care about this. Because this crate has no default features to start with, we should not let ourselves be held hostage by those that configure like this. I.e |
|
Well FWIW, I got called out on default-features for num: rust-num/num#297 You could choose to write off such users, but #95 shows how to do it without features. |
|
Ok! I agree, #95 seems good and you've taken it in the right direction for sure. I just didn't understand the build script stuff (because it was not complete). |
This PR adds the ability to use this crate with
no_std. It has no breaking changes, using a defaultstdfeature with an optionalcorefeature. SinceHashMapis only included inlibstd, it uses thehashmap_corecrate to replace it when compiling withno_std.It may be cleaner to replace uses of
stdwithcoreoralloc, rather than creating a fakestd. Please let me know if you'd prefer that.