NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
crates.io · #1410 most downloaded on crates.io
A library for creating compact sets of enums.
Last release 2 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
Fixes building on #[no_std] targets with serde enabled.
#[no_std] targets with serde enabled.Revert a semver breaking change introduced in 1.1.12 relating to using functions like EnumSet .symmetric_difference with Enum::A.into().
EnumSet<T>.symmetric_difference with Enum::A.into().EnumSet<T>.symmetrical_difference in favor of
symmetric_difference, to better match the standard library sets.One column per quarter.
Corrected the mistaken release of 1.1.11 with an outdated version of the public API for MixedEnumSet , where it was at enumset::MixedEnumSet instead o
MixedEnumSet<T>, where it was at enumset::MixedEnumSet
instead of enumset::set::MixedEnumSet to avoid namespace pollution.Implement a new MixedEnumSet type that allows unknown bits to be mixed with known enum variants in a single bitset.
MixedEnumSet<T> type that allows unknown bits to be mixed
with known enum variants in a single bitset.FromIterator implementations for iterators of borrowed items.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.#![derive(EnumSetType)] to produce invalid code on
big-endian systems.EnumSet<T> to be Send and Sync. (Thanks @SLUCHABLUB)b'A' to be used as variant discriminants.
(Thanks @ronnodas)proc-macro-crate feature flag
cannot be guaranteed. It uses multiple dependencies without a specified
minimum version.Improve the macro code to avoid exposing the internal repr of EnumSet as a public field.
EnumSet as
a public field.repr and serialize_repr that previously resulted
in errors.Fixes a bug that causes compilation failures when a crate (such as defmt) exposes a macro called assert!. (thanks @bugadani)
defmt)
exposes a macro called assert!. (thanks @bugadani)Add From<[T; N]>, Extend<&'a T>, and Extend<&'a EnumSet > implementations to EnumSet .
From<[T; N]>, Extend<&'a T>, and Extend<&'a EnumSet<T>>
implementations to EnumSet<T>.#[enumset(map = "...")] annotation that allows controlling how
enum variants are mapped to bits in the underlying bitset.1 << 30.Fix hygiene issue where the enumset_set! macro with no arguments required EnumSet to be imported into the current context. (Thanks @cbiffle)
enumset_set! macro with no arguments required
EnumSet to be imported into the current context. (Thanks @cbiffle)#[derive(EnumSetType)] used to cause compile errors when
cross-compiling with different flags on the host and target sides.
(Thanks @dtolnay)EnumSet::as_repr is now const. (Thanks @jasonwhite)
EnumSet::as_repr is now const. (Thanks @jasonwhite)defmt crate via a new feature. (Thanks @katyo)Add support for using EnumSet values in the enum_set! macro.
EnumSet<T> values in the enum_set! macro.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.The EMPTY and ALL consts of EnumSet are deprecated in favor of the empty and all functions.
empty, all, bit_width, and variant_count functions of
EnumSet<T> are now const.EMPTY and ALL consts of EnumSet<T> are deprecated in favor of the
empty and all functions.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.const.std or proc-macro-crate feature
flags are enabled is now 1.69+.Fix an issue where EnumSet::iter was not properly inlined without LTO enabled (such as on debug builds). (thanks @Fuuzetsu)
EnumSet::iter was not properly inlined without LTO
enabled (such as on debug builds). (thanks @Fuuzetsu)Display implementation for EnumSet<T> for types where T
implements Display. (suggested by @tsheinen)Fix issue where the code generated by #[derive(EnumSetType)] would cause a clippy warning.
#[derive(EnumSetType)] would cause
a clippy warning.Fix issue where enumset did not build correctly for no_std programs that did not use alloc. (Thanks @shamchak808)
enumset did not build correctly for no_std programs that
did not use alloc. (Thanks @shamchak808)Deprecated #[enumset(serialize_as_list)] in favor of #[enumset(serialize_repr = "list")].
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.to_vec function that returns the same data as the array/slice
based functions. This requires the alloc feature.EnumSet::<T>::EMPTY constant to help with initializing empty
sets in constant contexts.#[enumset(serialize_as_list)] in favor of
#[enumset(serialize_repr = "list")].#[enumset(serialize_as_map)] in favor of
#[enumset(serialize_repr = "map")].Updated darling to version 0.20 and syn to version 2.0.
#[enumset(serialize_as_map)] attribute to allow serializing
EnumSet<T> as a map of enum variants to boolean values.
(Thanks @LizzyFleckenstein03)Updated darling version to reduce compile times when combined with other crates. (Thanks @AlexTMjugador)
Added support for explicitly specifying the internal representation of EnumSet using the #[enumset(repr = "...")] annotation. (Thanks @ahcodedthat)
EnumSet<T> using the #[enumset(repr = "...")] annotation.
(Thanks @ahcodedthat)from_*_unchecked functions that unsafely convert a value into
an EnumSet<T> without checking if only valid bits are set.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
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.std and alloc feature flags. These have no current use
beyond the previous change, but will be used in the future.Disable unused default features for the darling crate. (Thanks @glandium)
darling crate. (Thanks @glandium)#[enumset(no_super_impls)] feature which prevents
#[derive(EnumSetType)] from automatically generating implementations of
Copy, Clone, Eq, or PartialEq. (Thanks @ahcodedthat)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.Optimized EnumSet iteration. (Thanks @MinusKelvin)
EnumSet iteration. (Thanks @MinusKelvin)Added the #[repr(transparent)] flag to EnumSet to allow for safe usage in FFI code. Note that invalid bits being set in the bitset causes UB, so this
#[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)Fix an unneeded warning in the output for enum_set! for a single value.
enum_set! for a single value.Implemented core::Sum for EnumSet .
core::iter::Sum for EnumSet<T>.Fixes a bug that caused enumset_derive to require an import of EnumSet in the scope to function.
enumset_derive to require an import of EnumSet
in the scope to function.(This version contains no code changes.)
README.md, and the license files to the crate distribution.Fixed critical error compiling on newer versions of syn caused by a mistaken import from a private module. (Thanks @ocboogie)
syn caused by a
mistaken import from a private module. (Thanks @ocboogie)Implemented ExactSizeIterator for EnumSetIter. (Thanks @dmarcuse)
ExactSizeIterator for EnumSetIter. (Thanks @dmarcuse)[WARNING: Potential silent breaking change] Changed EnumSet::insert to return whether a value was newly inserted, rather than whether the value alread…
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.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.nightly feature flag, as it is no longer required.as_u128/from_u128 for other unsigned
numeric types. (e.g. as_u8/from_u8, as_u16/from_u16, etc)as_u128/from_u128 that return an Option instead of
panicking when the conversion cannot be done.as_u128/from_u128 that truncate unknown bits instead
of panicking.Extend<EnumSet<T>> and FromIterator<EnumSet<T>> for
EnumSet<T>. (Thanks @manuthambi)#[enumset(crate_name = "renamed_enumset")] annotation for
handling renamed crates.Fixed a bug where compilation failed when the serde flag was enabled, and another trait that defined serialize or deserialize was in scope.
serde flag was enabled, and
another trait that defined serialize or deserialize was in scope.Fixed a bug where #[enumset(serialize_as_list)] did not work when Result is shadowed.
#[enumset(serialize_as_list)] did not work when Result
is shadowed.Implemented Extend and FromIterator for EnumSet .
Extend and FromIterator for EnumSet<T>.Fixed a bug preventing empty enums and enums with one value from compiling.
Fixed bug in EnumSetIter::size_hint. (Thanks @manuthambi)
EnumSetIter::size_hint. (Thanks @manuthambi)Removed outdated macros and attributes.
#[enumset(...)]#[enumset(serialize_deny_unknown)]#[enumset(serialize_repr="...")]#[derive(EnumSetType)] now only implements Copy, Clone, PartialEq and
Eq automatically.Fix a bug when deserializing enums containing invalid bits set.
Fix an off-by-one error causing enums with 9, 17, 33, etc variants to behave unexpectedly.
Add an #[enumset_serialize_as_list] attribute to cause the Deserialize and Serialize implementations for EnumSet to serialize it as a seq of Ts rather
#[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.Added Default implementation for EnumSet that returns an empty map. (Thanks @boxdot)
Default implementation for EnumSet<T> that returns an empty map.
(Thanks @boxdot)* Added optional serde support.
serde support.Deprecated the enum_set_type! macro in favor of a custom derive.
enum_set_type! macro in favor of a custom derive.enumset from being used in
#[no_std] crates.Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →