-
Notifications
You must be signed in to change notification settings - Fork 28
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
2018 edition, no_std and use hashbrown #20
Conversation
Signed-off-by: Yu Ding <dingelish@gmail.com>
It looks like switching to the 2018 edition has no impact at all on this crate. It also has no impact on dependencies, you can mix crates of different editions in the same program. Just providing a type alias does not feel worth taking on a public dependency: whenever hashbrown 0.2 or 1.0 is released and people start to use it, they won’t want to also have 0.1 in their dependency graph. So this crate would need to be updated, with a semver-breaking change to its own version number. So I’d rather not make that change. Note that you can already use This leaves
Is |
Hi Simon, thanks for your explanation. I'm working on rust-sgx-sdk and working closely with several blockchain projects. I noticed that many of the popular crates used in blockchain projects depend on rust-fnv and people would like to see it could be used in a Your concerns make sense. I do agree with you. For |
I fork might not really help you with your dependencies that depend on fnv, unless you convince them to switching to using your fork. At that point it’s better for everyone if you instead ask them to update to fnv 2.0 which is |
Note, this is still a breaking change, as it would remove functionality from the featureless crate. There's no real reason anyone should use You could manage the change with a server bump and a semver-trick re-export in the old, which is what I did to add |
@cuviper I see. With off-by-default in fnv 2.0 then, do you think it’s worth having type aliases at all? @dingelish Did you mean to close this? Sorry if I came across as opposed to any change, I think making fnv |
I would still like to have the aliases in some way, even if I have to opt in to a feature. The types are cumbersome to type otherwise. IMO, it's fine to keep |
@SimonSapin I think that another PR on |
@cuviper I agree that no type alias at all is cumbersome. What would you think of having type alisases in documentation that you can copy/paste into your crates? |
I was thinking that you meant all of the aliases would be going away, but I suppose you can at least keep |
Changes:
(1) Migrate to the 2018 edition.
(2) Turns this crate into a
no_std
crate. It'll benefit a lot of target platforms without a full functional libstd.(3) Use hashbrown, a high-performance SwissTable hash map (no_std), to replace the one in libstd.
Signed-off-by: Yu Ding dingelish@gmail.com
This change is