PackageTrack
Sign in Get early access

lasso

A multithreaded and single threaded string interner that allows strings to be cached with a minimal memory footprint, associating them with a unique key that can be used to retrieve them at any time.

0.7.3 11M downloads/mo #2920 most downloaded on crates.io Kixiron/lasso

What this package is like to depend on

Last release 2 years ago

no release in 18 months

Release timing varies

gaps range from 2 weeks to 1.6 years

Most releases are documented

notes for 11 of 15 stable releases

3 versions withdrawn

withdrawn after publishing

6 years old

18 releases · first in 2020

0 releases in the last 12 months

see the full history below

Release timeline

18 releases · Mar 2020 to Aug 2024
2021 2022 2023 2024 2025 2026
Release Pre-release Withdrawn

Releases

latest 18
  1. 0.7.3 19 Aug 2024
    Release notes

    Changed

    • Bumped MSRV to 1.71.0
    • Updated hashbrown to 0.14.0
    • Updated dashmap to 0.6.0
    Open source →
  2. 0.7.2 15 May 2023

    Nothing published for this version

  3. 0.7.1 15 May 2023

    Nothing published for this version

  4. 0.7.0 02 Apr 2023 withdrawn
    Release notes

    Changed

    • Bumped MSRV to 1.61.0
    • Updated to 2021 edition
    • Interning empty strings no longer counts towards the memory limit of any interners. Empty strings now take up zero bytes and therefore will neither allocate nor cause methods to return errors or throw panics if the interner is out of memory.
    • Changed ThreadedRodeo to use a new lockfree interner that no longer requires taking a mutex in order to allocate within it
    • Updated DashMap and Hashbrown dependencies

    Added

    • Added blanket implementations of Reader and Resolver for &T and &mut T references to types that implement those traits, and Interner likewise for &mut T
    • Added Clone implementation for Rodeo
    • Added the Rodeo::try_clone() and Rodeo::try_clone_from() functions
    Open source →
  5. 0.6.0 01 Sep 2021
    Release notes

    Changed

    • Changed the Debug implementations of all key types to be more condensed

    Added

    • Added an .into_inner() method to each key type that exposes the backing NonZeroU* it's made of
    Open source →
  6. 0.5.1 01 Jun 2021
    Release notes

    Fixed

    • Fixed compile error in release mode when using the serialize feature
    Open source →
  7. 0.5.0 19 Feb 2021
    Release notes

    Added

    • Implemented Interner, Reader and Resolver for &ThreadedRodeo
    • Added optional implementations of Abomonation for key types under the abomonation feature flag
    • Added optional implementations of DeepSizeOf for key types under the deepsize feature flag
    • Added iterators for ThreadedRodeo

    Changed

    • Moved the .into_reader() and .into_resolver() traits from Interner and Reader into the new IntoReader, IntoResolver and IntoReaderAndResolver traits
    • Updated dependencies

    Fixed

    • Fixed race condition on key insertion for ThreadedRodeo
    Open source →
  8. 0.4.1 03 Jan 2021
    Release notes

    Changed

    • Updated dependencies to latest versions
    • Made Interner, Reader and Resolver default their generic arguments to Spur
    Open source →
  9. 0.4.0 02 Jan 2021
    Release notes

    Added

    • Added the MemoryLimits struct for creating memory limits on interners
    • Gave Rodeo & ThreadedRodeo the ability to be given a hard memory capacity, currently only limiting the amount of memory allocated within the arena it uses
    • Added the with_memory_limits, with_capacity_and_memory_limits and with_capacity_memory_limits_and_hasher methods to Rodeo & ThreadedRodeo for creating interners with memory limits
    • Added set_memory_limits to Rodeo & ThreadedRodeo for in-flight modification of memory limits
    • Added current_memory_usage and max_memory_usage methods to Rodeo & ThreadedRodeo for introspection of current memory usage maximum memory usage
    • Added FromIterator, Extend and IntoIterator implementations for Rodeo
    • Added ExactSizeIterator implementations for Iter and Strings
    • Added IntoIterator implementations for RodeoReader and RodeoResolver
    • Added the inline-more feature to enable inlining (off by default)
    • Added FromIterator and Extend implementations to ThreadedRodeo
    • Added the .contains() and the .contains_key() methods to Rodeo, ThreadedRodeo, RodeoReader and RodeoResolver
    • Implemented Serialize and Deserialize for Rodeo, ThreadedRodeo, RodeoReader and RodeoResolver
    • Added Eq and PartialEq implementations through the various interners
    • Added Index implementations for all interners
    • Added the Interner, Reader and Resolver traits
    • Loosened trait bounds on Rodeo methods

    Changed

    • Debug views of all interners now show their arenas
    • Made Key::into_usize safe
    • External apis are no longer #[inline] by default, for that use the inline-more feature
    • .get_or_intern() and .get_or_intern_static() now return a Result<T, LassoError> to allow intelligently handling failure
    • Bumped MSRV to 1.40.0
    • Removed dependency on serde derive
    Open source →
  10. 0.3.1 25 Jul 2020
    Release notes

    Added

    • Added the get_or_intern_static and try_get_or_intern_static methods to ThreadedRodeo (Thanks to @jonas-schievink)

    Fixed

    Open source →
  11. 0.3.0 13 Jul 2020
    Release notes

    This version really wouldn't be possible without the amazing work of @CAD97. They were an amazing asset in improving the memory efficiency of lasso and I can't thank them enough

    Added

    • Added the get_or_intern_static and try_get_or_intern_static methods for zero-copy static string internment
    • Added the Capacity struct for better internment estimates and more accurate pre-allocation

    Changed

    • Lasso's single-threaded configuration now supports back to Rust 1.34! Thanks to @jyn514 for their hard work!
    • Rodeo and RodeoReader now use less memory since they only store their interned strings' pointers once
    • Rodeo and RodeoReader use a different hashing strategy for their maps, instead of using a hashed string and key pair, they now use the key hashed as their paired string. This allows for decreased memory usage
    • The arena backing all interners now increases the amount of memory it allocates exponentially (The same doubling strategy used by Vec is used). This allows for fewer allocations to happen as more strings are interned
    • hashbrown is now a default dependency due to HashMap's raw_api not being stable
    • Relaxed trait bounds of many structs and functions
    • Made custom Debug implementations to cut the excess and unneeded output
    • Exported the Strings and Iter structs
    • The with_capacity methods now use the Capacity struct

    Removed

    • Removed the hashbrown-table and nightly features
    Open source →
  12. 0.2.3 20 May 2020 withdrawn

    Nothing published for this version

  13. 0.2.2 18 May 2020
    Release notes

    Fixed

    • Fixed Send for Rodeo
    Open source →
  14. 0.2.1 18 May 2020 withdrawn

    Nothing published for this version

  15. 0.2.0 14 May 2020
    Release notes

    Added

    • Added single-threaded interner
    • Added try_get_or_intern
    • Added feature for hashbrown
    • Added feature for parking_lot
    • Added no-std feature
    • Added Key::try_from_usize
    • Added MiniSpur
    • Added MicroCord
    • Removed blanket impls for u8-usize & the nonzero varieties
    • Added lifetimes to all Rodeo types
    • Added lifetime to Key
    • Added the ID requirement to Key
    • Added try_resolves and resolve_uncheckeds
    • Added strings() and iter() methods to Rodeo, RodeoResolver and RodeoReader
    • Strings are now allocated via an arena allocator

    Changed

    • Renamed Lasso to ThreadedRodeo
    • Renamed ReadOnlyLasso to RodeoReader
    • Renamed ResolverLasso to RodeoResolver
    • Changed default impl of Key::from_usize
    • Added Send and Sync bounds for ThreadedRodeo, RodeoResolver and RodeoReader
    • Changed internals of get_or_intern to be try_get_or_intern.expect()
    • multi-threaded is now actually disabled by default

    Removed

    • Removed .intern from all structs
    • Rodeo and ThreadedRodeo no longer implement Clone

    Fixed

    • Fixed memory leaks and possible unsoundness
    • Fixed data races on ThreadedRodeo
    • Fixed memory leaks in ThreadedRodeo, for real this time
    Open source →
  16. 0.1.2 29 Mar 2020

    Nothing published for this version

  17. 0.1.1 29 Mar 2020

    Nothing published for this version

  18. 0.1.0 28 Mar 2020
    Release notes

    <!-- next-url --> [Unreleased]: https://github.com/Kixiron/lasso/compare/v0.7.3...HEAD [0.7.3]: https://github.com/Kixiron/lasso/compare/v0.7.2...v0.7.3 [0.7.2]: https://github.com/Kixiron/lasso/compare/v0.7.1...v0.7.2 [0.7.1]: https://github.com/Kixiron/lasso/compare/v0.7.0...v0.7.1 [0.7.0]: https://github.com/Kixiron/lasso/compare/v0.6.0...v0.7.0 [0.6.0]: https://github.com/Kixiron/lasso/compare/v0.5.1...v0.6.0 [0.5.1]: https://github.com/Kixiron/lasso/compare/v0.5.0...v0.5.1 [0.5.0]: https://github.com/Kixiron/lasso/compare/v0.4.1...v0.5.0 [0.4.1]: https://github.com/Kixiron/lasso/compare/v0.4.0...v0.4.1 [0.4.0]: https://github.com/Kixiron/lasso/compare/v0.3.1...v0.4.0 [0.3.1]: https://github.com/Kixiron/lasso/compare/v0.3.0...v0.3.1 [0.3.0]: https://github.com/Kixiron/lasso/compare/v0.3.0

    Open source →

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