PackageTrack
Sign in Get early access

enumset

A library for creating compact sets of enums.

1.1.14 42M downloads/mo #1377 most downloaded on crates.io Lymia/enumset

What this package is like to depend on

Last release 1 months ago

20 Jul 2026

Release timing varies

gaps range from 8 days to 10 months

Most releases are documented

notes for 38 of 52 stable releases

8 versions withdrawn

withdrawn after publishing

9 years old

60 releases · first in 2017

4 releases in the last 12 months

see the full history below

Release timeline

60 releases · Oct 2017 to Jul 2026
2018 2019 2020 2021 2022 2023 2024 2025 2026
Release Pre-release Withdrawn

Releases

latest 60
  1. 1.1.14 20 Jul 2026
    Release notes
    • Fixes building on #[no_std] targets with serde enabled.
    • Small improvements and clarifications to the documentation.
    Open source →
  2. 1.1.13 18 May 2026
    Release notes
    • Revert a semver breaking change introduced in 1.1.12 relating to using functions like EnumSet<T>.symmetric_difference with Enum::A.into().
    • Deprecate EnumSet<T>.symmetrical_difference in favor of symmetric_difference, to better match the standard library sets.
    Open source →
  3. 1.1.12 07 May 2026 withdrawn
    Release notes
    • Corrected the mistaken release of 1.1.11 with an outdated version of the public API for MixedEnumSet<T>, where it was at enumset::MixedEnumSet instead of enumset::set::MixedEnumSet to avoid namespace pollution.
    Open source →
  4. 1.1.11 07 May 2026 withdrawn
    Release notes
    • Implement a new MixedEnumSet<T> type that allows unknown bits to be mixed with known enum variants in a single bitset.
    • Added FromIterator implementations for iterators of borrowed items.
    • Added EnumSet::bit_index and EnumSet::is_bit_valid methods to query the bit associated with an enum variant, or if a bit index is valid.
    • Fixed a bug causing #![derive(EnumSetType)] to produce invalid code on big-endian systems.
    • Allowed EnumSet<T> to be Send and Sync. (Thanks @SLUCHABLUB)
    • Allow byte literals such as b'A' to be used as variant discriminants. (Thanks @ronnodas)
    • Minimum required Rust version is now 1.71+ due to updates in dependencies.
    • Minimum required Rust version when the proc-macro-crate feature flag cannot be guaranteed. It uses multiple dependencies without a specified minimum version.
    Open source →
  5. 1.1.10 21 Aug 2025
    Release notes
    • Improve the macro code to avoid exposing the internal repr of EnumSet as a public field.
    • Fixes combinations of repr and serialize_repr that previously resulted in errors.
    • Fixed some minor hygiene issues with the procedural macro.
    • Small improvements and clarifications to the documentation.
    Open source →
  6. 1.1.9 17 Aug 2025
    Release notes
    • Fixes a bug that causes compilation failures when a crate (such as defmt) exposes a macro called assert!. (thanks @bugadani)
    Open source →
  7. 1.1.8 16 Aug 2025
    Release notes

    New Features

    • Add From<[T; N]>, Extend<&'a T>, and Extend<&'a EnumSet<T>> implementations to EnumSet<T>.
    • Added a new #[enumset(map = "...")] annotation that allows controlling how enum variants are mapped to bits in the underlying bitset.

    Enhancements

    • Optimizations for sparse bitsets and sets larger than 64 variants.
    • Added basic support for specifying enum discriminants via simple expressions like 1 << 30.
    Open source →
  8. 1.1.7 08 Jul 2025
    Release notes
    • Fix hygiene issue where the enumset_set! macro with no arguments required EnumSet to be imported into the current context. (Thanks @cbiffle)
    • Fix issue where #[derive(EnumSetType)] used to cause compile errors when cross-compiling with different flags on the host and target sides. (Thanks @dtolnay)
    Open source →
  9. 1.1.6 05 May 2025
    Release notes
    • EnumSet::as_repr is now const. (Thanks @jasonwhite)
    • Added support for the defmt crate via a new feature. (Thanks @katyo)
    Open source →
  10. 1.1.5 22 Jul 2024
    Release notes
    • Add support for using EnumSet<T> values in the enum_set! macro.
    • Added new enum_set_union!, enum_set_intersection!, enum_set_difference!, enum_set_complement! and enum_set_symmetric_difference! macros for doing EnumSet operations at compile time.
    Open source →
  11. 1.1.4 22 Jul 2024
    Release notes
    • The empty, all, bit_width, and variant_count functions of EnumSet<T> are now const.
    • The EMPTY and ALL consts of EnumSet<T> are deprecated in favor of the empty and all functions.
    • The std feature flag has been deprecated in favor of the new proc-macro-crate feature flag. The feature flag was never used for any std-specific functionality beyond that crate.
    • Minimum required Rust version is now 1.61+, due to updates in dependencies and to allow additional functions to be const.
    • Minimum required Rust version when the std or proc-macro-crate feature flags are enabled is now 1.69+.
    • Minor fixes to documentation. (Thanks @xnuk)
    Open source →
  12. 1.1.3 11 Oct 2023
    Release notes
    • Fix an issue where EnumSet::iter was not properly inlined without LTO enabled (such as on debug builds). (thanks @Fuuzetsu)
    • Added a Display implementation for EnumSet<T> for types where T implements Display. (suggested by @tsheinen)
    Open source →
  13. 1.1.2 10 May 2023
    Release notes
    • Fix issue where the code generated by #[derive(EnumSetType)] would cause a clippy warning.
    Open source →
  14. 1.1.1 08 May 2023
    Release notes
    • Fix issue where enumset did not build correctly for no_std programs that did not use alloc. (Thanks @shamchak808)
    Open source →
  15. 1.1.0 08 May 2023
    Release notes
    • Removed the previous 128 variant limit, allowing for enumsets that are backed by an array rather than a single integer.
    • Added as_array, from_array, from_slice, and copy_into_slice functions to EnumSet<T>. In addition, *_truncated and try_* versions of all these functions exist.
    • Added a to_vec function that returns the same data as the array/slice based functions. This requires the alloc feature.
    • Added an EnumSet::<T>::EMPTY constant to help with initializing empty sets in constant contexts.
    • Deprecated #[enumset(serialize_as_list)] in favor of #[enumset(serialize_repr = "list")].
    • Deprecated #[enumset(serialize_as_map)] in favor of #[enumset(serialize_repr = "map")].
    Open source →
  16. 1.0.13 01 May 2023
    Release notes
    • Updated darling to version 0.20 and syn to version 2.0.
    • Added a new #[enumset(serialize_as_map)] attribute to allow serializing EnumSet<T> as a map of enum variants to boolean values. (Thanks @LizzyFleckenstein03)
    • Minimum required Rust version is now 1.56+, due to updates in dependencies.
    Open source →
  17. 1.0.12 03 Oct 2022
    Release notes
    • Updated darling version to reduce compile times when combined with other crates. (Thanks @AlexTMjugador)
    Open source →
  18. 1.0.11 12 Apr 2022
    Release notes
    • Added support for explicitly specifying the internal representation of EnumSet<T> using the #[enumset(repr = "...")] annotation. (Thanks @ahcodedthat)
    • Added new functions for directly converting an EnumSet to and from its internal representation, when it is explicitly specified. (Thanks @ahcodedthat)
    • Added new from_*_unchecked functions that unsafely convert a value into an EnumSet<T> without checking if only valid bits are set.
    Open source →
  19. 1.0.10 05 Apr 2022
    Release notes
    • The proc-macro-crate support has been locked behind the std flag and version 1.0.9 has been yanked due to a regression that causes enumset to fail to compile on #[no_std] platforms in programs that also use serde.
    • Introduced new std and alloc feature flags. These have no current use beyond the previous change, but will be used in the future.
    Open source →
  20. 1.0.9 04 Apr 2022 withdrawn
    Release notes
    • Disable unused default features for the darling crate. (Thanks @glandium)
    • Add a new #[enumset(no_super_impls)] feature which prevents #[derive(EnumSetType)] from automatically generating implementations of Copy, Clone, Eq, or PartialEq. (Thanks @ahcodedthat)
    • Suppressed several clippy warnings.
    • Implemented DoubleEndedIterator for EnumSetIter.
    • #[derive(EnumSetType)] now uses proc-macro-crate to find the path of the enumset crate instead of relying on the user to manually specify it, making it easier to use when the crate has been renamed via cargo.
    • Minimum required Rust version is now 1.36+, due to updates in dependencies.
    Open source →
  21. 1.0.8 05 Nov 2021
    Release notes
    • Optimized EnumSet iteration. (Thanks @MinusKelvin)
    Open source →
  22. 1.0.7 05 Jul 2021
    Release notes
    • Added the #[repr(transparent)] flag to EnumSet<T> to allow for safe usage in FFI code. Note that invalid bits being set in the bitset causes UB, so this should be done with care. (Thanks @Riey)
    Open source →
  23. 1.0.6 27 Feb 2021
    Release notes
    • Fix an unneeded warning in the output for enum_set! for a single value.
    Open source →
  24. 1.0.5 24 Feb 2021
    Release notes
    • Implemented core::iter::Sum for EnumSet<T>.
    • Properly acknowledge that the minimum required Rust version is actually 1.34+ and not 1.31+. A retroactive changelog entry has been added to 1.0.0.
    Open source →
  25. 1.0.4 08 Feb 2021
    Release notes
    • Fixes a bug that caused enumset_derive to require an import of EnumSet in the scope to function.
    Open source →
  26. 1.0.3 27 Jan 2021
    Release notes
    • (This version contains no code changes.)
    • Redirected badges in the README to point at travis-ci.com instead of .org
    • Added README.md, and the license files to the crate distribution.
    Open source →
  27. 1.0.2 25 Jan 2021
    Release notes
    • Fixed critical error compiling on newer versions of syn caused by a mistaken import from a private module. (Thanks @ocboogie)
    Open source →
  28. 1.0.1 09 Aug 2020
    Release notes
    • Implemented ExactSizeIterator for EnumSetIter. (Thanks @dmarcuse)
    Open source →
  29. 1.0.0 06 Apr 2020
    Release notes

    Breaking Changes

    • [WARNING: Potential silent breaking change] Changed EnumSet::insert to return whether a value was newly inserted, rather than whether the value already existed in the set. This corresponds better with the behavior of HashSet::insert and BTreeSet::insert.
    • Renamed to_bits/from_bits to as_u128/from_u128.
    • EnumSet::bit_width and EnumSet::variant_count now return a u32 instead of a u8 for future-proofing.
    • Removed nightly feature flag, as it is no longer required.
    • Minimum required Rust version is now 1.34+.

    New features

    • Added a series of functions like as_u128/from_u128 for other unsigned numeric types. (e.g. as_u8/from_u8, as_u16/from_u16, etc)
    • Added variants of as_u128/from_u128 that return an Option instead of panicking when the conversion cannot be done.
    • Added variants of as_u128/from_u128 that truncate unknown bits instead of panicking.
    • Implemented Extend<EnumSet<T>> and FromIterator<EnumSet<T>> for EnumSet<T>. (Thanks @manuthambi)
    • Added an #[enumset(crate_name = "renamed_enumset")] annotation for handling renamed crates.

    Bugfixes

    • Fixed a bug where the procedural macro would fail on enums with a repr annotation set. While reprs larger than u8 are supported, negative enum variants or enum variants above 127 are still not currently supported.
    Open source →
  30. 0.4.5 19 Feb 2020
    Release notes
    • Fixed a bug where compilation failed when the serde flag was enabled, and another trait that defined serialize or deserialize was in scope.
    Open source →
  31. 0.4.4 12 Oct 2019
    Release notes
    • Fixed a bug where #[enumset(serialize_as_list)] did not work when Result is shadowed.
    Open source →
  32. 0.4.3 08 Oct 2019
    Release notes
    • Implemented Extend and FromIterator for EnumSet<T>.
    Open source →
  33. 0.4.2 29 Sep 2019
    Release notes
    • Fixed a bug preventing empty enums and enums with one value from compiling.
    Open source →
  34. 0.4.1 28 Sep 2019
    Release notes
    • Fixed bug in EnumSetIter::size_hint. (Thanks @manuthambi)
    Open source →
  35. 0.4.0 07 May 2019
    Release notes
    • Removed outdated macros and attributes.
    • All attributes for the custom derive are now written as #[enumset(...)]
    • Implemented #[enumset(serialize_deny_unknown)]
    • Implemented #[enumset(serialize_repr="...")]
    • #[derive(EnumSetType)] now only implements Copy, Clone, PartialEq and Eq automatically.
    Open source →
  36. 0.3.19 02 May 2019
    Release notes
    • Fix a bug when deserializing enums containing invalid bits set.
    Open source →
  37. 0.3.18 17 Apr 2019
    Release notes
    • Fix an off-by-one error causing enums with 9, 17, 33, etc variants to behave unexpectedly.
    Open source →
  38. 0.3.17 11 Mar 2019
    Release notes
    • Add an #[enumset_serialize_as_list] attribute to cause the Deserialize and Serialize implementations for EnumSet<T> to serialize it as a seq of Ts rather than an integer bitmask.
    Open source →
  39. 0.3.16 04 Feb 2019
    Release notes
    • Added Default implementation for EnumSet<T> that returns an empty map. (Thanks @boxdot)
    Open source →
  40. 0.3.15 08 Jan 2019
    Release notes
    • Added optional serde support.
    Open source →
  41. 0.3.14 09 Nov 2018
    Release notes
    • Deprecated the enum_set_type! macro in favor of a custom derive.
    • Added a way to avoid the automatic operator overloads derived from EnumSetTypes.
    • Fixed a major issue that would have prevented enumset from being used in #[no_std] crates.
    • Minimum required version is now 1.30.0+. There should be no more need to bump the minimum Rust version in the foreseeable future.
    Open source →
  42. 0.3.13 08 Nov 2018 withdrawn

    Nothing published for this version

  43. 0.3.12 17 Sep 2018

    Nothing published for this version

  44. 0.3.11 29 Jun 2018

    Nothing published for this version

  45. 0.3.10 25 May 2018

    Nothing published for this version

  46. 0.3.9 25 May 2018

    Nothing published for this version

  47. 0.3.8 25 May 2018

    Nothing published for this version

  48. 0.3.7 25 May 2018 withdrawn

    Nothing published for this version

  49. 0.3.6 24 May 2018

    Nothing published for this version

  50. 0.3.5 24 May 2018

    Nothing published for this version

  51. 0.3.4 24 May 2018

    Nothing published for this version

  52. 0.3.3 09 Dec 2017

    Nothing published for this version

  53. 0.3.2 29 Nov 2017

    Nothing published for this version

  54. 0.3.1 29 Nov 2017 withdrawn

    Nothing published for this version

  55. 0.3.0 29 Nov 2017 withdrawn

    Nothing published for this version

  56. 0.2.1 29 Nov 2017

    Nothing published for this version

  57. 0.2.0 29 Oct 2017 withdrawn

    Nothing published for this version

  58. 0.1.2 29 Oct 2017

    Nothing published for this version

  59. 0.1.1 29 Oct 2017

    Nothing published for this version

  60. 0.1.0 29 Oct 2017

    Nothing published for this version

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive