PackageTrack
Sign in Get early access

slotmap

Slotmap data structure

1.1.1 96M downloads/mo #822 most downloaded on crates.io orlp/slotmap

What this package is like to depend on

Last release 8 months ago

06 Dec 2025

Release timing varies

gaps range from 8 days to 2.3 years

Most releases are documented

notes for 4 of 6 stable releases

15 versions withdrawn

withdrawn after publishing

8 years old

21 releases · first in 2018

2 releases in the last 12 months

see the full history below

Release timeline

21 releases · Jul 2018 to Dec 2025
2019 2020 2021 2022 2023 2024 2025 2026
Release Pre-release Withdrawn

Releases

latest 21
  1. 1.1.1 06 Dec 2025
    Release notes
    • Added as_slices and as_mut_slices to DenseSlotMap. The other methods added in 1.1.0 (keys_as_slice, values_as_slice and values_as_mut_slice) will likely be removed in 2.0.
    Open source →
  2. 1.1.0 06 Dec 2025
    Release notes
    • Bumped MSRV to 1.58.
    • Fixed memory leak in clone_from.
    • Added keys_as_slice, values_as_slice, and values_as_mut_slice to DenseSlotMap.
    • Ensured that is_null() keys print as null in their Debug representation.
    • Made KeyData::new and KeyData::from_ffi const.
    • Resolved a Miri error in get_disjoint_mut under the Stacked Borrows model.
    • Added detach and reattach methods to SlotMap and DenseSlotMap which let you temporarily remove key/value pairs from the slot map before adding them back.
    • Deprecated HopSlotMap, preparing for removal in 2.0.
    Open source →
  3. 1.0.7 30 Nov 2023
    Release notes
    • Added clone_from implementations for all slot maps.
    • Added try_insert_with_key methods that accept a fallible closure.
    • Improved performance of insertion and key hashing.
    • Made new_key_type resistant to shadowing.
    • Made iterators clonable regardless of item type clonability.
    Open source →
  4. 1.0.6 30 Aug 2021
    Release notes
    • Made Key trait unsafe, as it was erroneously safe to implement.
    Open source →
  5. 1.0.5 03 Jul 2021 withdrawn
    Release notes
    • Added fuzzing for extra testing.
    • Fixed an issue that could cause a segfault when using HopSlotMap::retain that had the same underlying cause as the fix in 1.0.4 but was missed.
    Open source →
  6. 1.0.4 01 Jul 2021 withdrawn
    Release notes
    • Fixed an issue that could cause a segfault when using HopSlotMap::drain. All versions 0.3+ are affected, and thus yanked.
    Open source →
  7. 1.0.3 09 Apr 2021 withdrawn
    Release notes
    • Made get_disjoint_mut available on stable Rust 1.51 and up.
    • Added unchecked variants for the getters on SparseSecondaryMap.
    Open source →
  8. 1.0.2 09 Jan 2021 withdrawn
    Release notes
    • Fixed the new_key_type! macro, it assumed the Key trait was in scope.
    • Updated code base with more stringent (clippy) warnings, and many small code quality and documentation changes.
    • Documented the minimum required stable Rust version, which is 1.49.
    Open source →
  9. 1.0.1 04 Jan 2021 withdrawn
    Release notes
    • Fixed an instance where an uninitialized [u32; N] was created. The uninitialized values were never read - the code always initialized them before reading - but simply having the variable be uninitialized (despite all bit patterns being valid) is technically undefined behavior.
    Open source →
  10. 1.0.0 04 Jan 2021 withdrawn
    Release notes
    • Removed all Copy trait restrictions of value types stable Rust! There are no longer any restrictions on the types you can store in any of the slot maps. For that reason Slottable was deprecated as well.

    • no_std support was added, use it by opting out of the default feature std.

    • Added sm.get_disjoint_mut([k1, k2, ...]) which allows you to get mutable references from multiple disjoint keys at the same time. This requires min-const-generics to be stabilized, so until Rust 1.51 comes out this is only available on nightly by setting the unstable feature.

    • Added an Entry API to the secondary maps.

    • Added derive(Clone) for iterators where possible.

    • Replaced Into<KeyData> with Key::data().

    • SecondaryMap now uses minimal space overhead. Each slot now uses max(sizeof(T), 4) bytes.

    • Moved SlotMap to the basic module.

    Open source →
  11. 0.4.3 30 Aug 2021

    Nothing published for this version

  12. 0.4.2 03 Jul 2021 withdrawn

    Nothing published for this version

  13. 0.4.1 01 Jul 2021 withdrawn
    Release notes
    • Backport of fix made in 1.0.4.
    Open source →
  14. 0.4.0 25 Aug 2019 withdrawn
    Release notes
    • Codebase moved to 2018 Edition.

    • Reintroduce DenseSlotMap - an overzealous removal in 0.3.0.

    • Added support for try_reserve.

    • Added support for custom hashers in SparseSecondaryMap.

    • SparseSecondaryMap and SecondaryMap can now be cloned.

    • Keys have a more terse debug output.

    • Fixed a bug that caused an overflowing left shift on 32-bit targets.

    Open source →
  15. 0.3.2 30 Aug 2021

    Nothing published for this version

  16. 0.3.1 03 Jul 2021 withdrawn

    Nothing published for this version

  17. 0.3.0 28 Oct 2018 withdrawn
    Release notes
    • Massive rework, with a focus on secondary maps and custom keys to prevent cross-slotmap key usage.

    • Removed DenseSlotMap in favour of HopSlotMap as the latter performs better when secondary maps are in use.

    • Unfortunately due to the redesign the first slot in a slot map must now always be empty. This means some deserializations of slot maps serialized with a version before 0.3.0 can fail.

    • Added SecondaryMap and SparseSecondaryMap, which allows you to associate extra data with keys given by a slot map.

    • Added DefaultKey, custom key types, and support for them on all slot maps and secondary maps. You must now always specify the key type you're using with a slot map, so SlotMap<i32> would be SlotMap<DefaultKey, i32>. It is recommended to make a custom key type with new_key_type! for any slot map you create, as this entirely prevents using the wrong key on the wrong slot map.

    • KeyData now has as_ffi and from_ffi functions that convert the data that makes up a key to/from an u64. This allows you to use slot map keys as opaque handles in FFI code.

    Open source →
  18. 0.2.1 16 Sep 2018 withdrawn
    Release notes
    • Fixed a potential uninitialized memory vulnerability. No uninitialized memory was read or used directly, but Rust's assumptions could lead to it. Yanked all previous versions as they were all vulnerable.

    • Made a Key member non-zero so that Option<Key> is optimized.

    Open source →
  19. 0.2.0 17 Jul 2018 withdrawn
    Release notes

    Start of version history.

    Open source →
  20. 0.1.1 10 Jul 2018 withdrawn

    Nothing published for this version

  21. 0.1.0 02 Jul 2018 withdrawn

    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