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 2024Releases
latest 18-
0.7.319 Aug 2024Release notes
Open source →Changed
- Bumped MSRV to 1.71.0
- Updated hashbrown to 0.14.0
- Updated dashmap to 0.6.0
-
0.7.215 May 2023Nothing published for this version
-
0.7.115 May 2023Nothing published for this version
-
0.7.002 Apr 2023 withdrawnRelease notes
Open source →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
ThreadedRodeoto 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
ReaderandResolverfor&Tand&mut Treferences to types that implement those traits, andInternerlikewise for&mut T - Added
Cloneimplementation forRodeo - Added the
Rodeo::try_clone()andRodeo::try_clone_from()functions
-
0.6.001 Sep 2021Release notes
Open source →Changed
- Changed the
Debugimplementations of all key types to be more condensed
Added
- Added an
.into_inner()method to each key type that exposes the backingNonZeroU*it's made of
- Changed the
-
0.5.101 Jun 2021Release notes
Open source →Fixed
- Fixed compile error in release mode when using the
serializefeature
- Fixed compile error in release mode when using the
-
0.5.019 Feb 2021Release notes
Open source →Added
- Implemented
Interner,ReaderandResolverfor&ThreadedRodeo - Added optional implementations of
Abomonationfor key types under theabomonationfeature flag - Added optional implementations of
DeepSizeOffor key types under thedeepsizefeature flag - Added iterators for
ThreadedRodeo
Changed
- Moved the
.into_reader()and.into_resolver()traits fromInternerandReaderinto the newIntoReader,IntoResolverandIntoReaderAndResolvertraits - Updated dependencies
Fixed
- Fixed race condition on key insertion for
ThreadedRodeo
- Implemented
-
0.4.103 Jan 2021Release notes
Open source →Changed
- Updated dependencies to latest versions
- Made
Interner,ReaderandResolverdefault their generic arguments toSpur
-
0.4.002 Jan 2021Release notes
Open source →Added
- Added the
MemoryLimitsstruct for creating memory limits on interners - Gave
Rodeo&ThreadedRodeothe 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_limitsandwith_capacity_memory_limits_and_hashermethods toRodeo&ThreadedRodeofor creating interners with memory limits - Added
set_memory_limitstoRodeo&ThreadedRodeofor in-flight modification of memory limits - Added
current_memory_usageandmax_memory_usagemethods toRodeo&ThreadedRodeofor introspection of current memory usage maximum memory usage - Added
FromIterator,ExtendandIntoIteratorimplementations forRodeo - Added
ExactSizeIteratorimplementations forIterandStrings - Added
IntoIteratorimplementations forRodeoReaderandRodeoResolver - Added the
inline-morefeature to enable inlining (off by default) - Added
FromIteratorandExtendimplementations toThreadedRodeo - Added the
.contains()and the.contains_key()methods toRodeo,ThreadedRodeo,RodeoReaderandRodeoResolver - Implemented
SerializeandDeserializeforRodeo,ThreadedRodeo,RodeoReaderandRodeoResolver - Added
EqandPartialEqimplementations through the various interners - Added
Indeximplementations for all interners - Added the
Interner,ReaderandResolvertraits - Loosened trait bounds on
Rodeomethods
Changed
- Debug views of all interners now show their arenas
- Made
Key::into_usizesafe - External apis are no longer
#[inline]by default, for that use theinline-morefeature .get_or_intern()and.get_or_intern_static()now return aResult<T, LassoError>to allow intelligently handling failure- Bumped MSRV to 1.40.0
- Removed dependency on serde derive
- Added the
-
0.3.125 Jul 2020Release notes
Open source →Added
- Added the
get_or_intern_staticandtry_get_or_intern_staticmethods toThreadedRodeo(Thanks to @jonas-schievink)
Fixed
- Added the
-
0.3.013 Jul 2020Release notes
Open source →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_staticandtry_get_or_intern_staticmethods for zero-copy static string internment - Added the
Capacitystruct 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!
RodeoandRodeoReadernow use less memory since they only store their interned strings' pointers onceRodeoandRodeoReaderuse 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
Vecis used). This allows for fewer allocations to happen as more strings are interned hashbrownis now a default dependency due toHashMap'sraw_apinot being stable- Relaxed trait bounds of many structs and functions
- Made custom
Debugimplementations to cut the excess and unneeded output - Exported the
StringsandIterstructs - The
with_capacitymethods now use theCapacitystruct
Removed
- Removed the
hashbrown-tableandnightlyfeatures
- Added the
-
0.2.320 May 2020 withdrawnNothing published for this version
-
0.2.218 May 2020 -
0.2.118 May 2020 withdrawnNothing published for this version
-
0.2.014 May 2020Release notes
Open source →Added
- Added single-threaded interner
- Added
try_get_or_intern - Added feature for
hashbrown - Added feature for
parking_lot - Added
no-stdfeature - Added
Key::try_from_usize - Added
MiniSpur - Added
MicroCord - Removed blanket impls for
u8-usize& the nonzero varieties - Added lifetimes to all
Rodeotypes - Added lifetime to
Key - Added the ID requirement to
Key - Added
try_resolves andresolve_uncheckeds - Added
strings()anditer()methods toRodeo,RodeoResolverandRodeoReader - Strings are now allocated via an arena allocator
Changed
- Renamed
LassotoThreadedRodeo - Renamed
ReadOnlyLassotoRodeoReader - Renamed
ResolverLassotoRodeoResolver - Changed default impl of
Key::from_usize - Added
SendandSyncbounds forThreadedRodeo,RodeoResolverandRodeoReader - Changed internals of
get_or_internto betry_get_or_intern.expect() multi-threadedis now actually disabled by default
Removed
- Removed
.internfrom all structs RodeoandThreadedRodeono longer implementClone
Fixed
- Fixed memory leaks and possible unsoundness
- Fixed data races on
ThreadedRodeo - Fixed memory leaks in
ThreadedRodeo, for real this time
-
0.1.229 Mar 2020Nothing published for this version
-
0.1.129 Mar 2020Nothing published for this version
-
0.1.028 Mar 2020Release notes
Open source →<!-- 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