Skip to content

Releases: Caellian/contiguous_mem

Version 0.4.2

21 Sep 06:31
8597f6a
Compare
Choose a tag to compare

Additions

  • Add ContiguousMemoryStorage::reserve and related functions

Changes

  • Lift Copy or leak requirement from stable
  • Fix possible "use-after-free" in reference state Drop
  • Inline some details impl for later simplification

Version 0.4.1

21 Sep 06:28
1ef2849
Compare
Choose a tag to compare

Additions

  • Add ContiguousEntryRef::with_metadata function for manually specifying Pointee metadata in references.
  • Export static_metadata function
  • Export ByteRange type

Version 0.4.0

18 Sep 00:11
990c336
Compare
Choose a tag to compare

Added

  • Add unsafe functions for turning entry references into pointers.
    • Add ContiguousMemoryStorage::forget.
  • Add source to LockingError::WouldBlock
  • Add ContiguousMemoryStorage::forget utility method.
  • Add ContiguousMemoryStorage::can_push variants:
    • can_push_value
    • can_push_layout
  • Add persisted variants for push methods which ensures values aren't overwritten when using default and concurrent implementations.

Changed

  • Rename ContiguousMemoryStorage::store to push so it's more in line with std containers.
    • Update examples
  • Rename ContiguousMemoryRef to ContiguousEntryRef so naming is more in line with the purpose of the struct.
  • Clean up ByteRange::aligned implementation
  • Fix how AllocationTracker provides available ByteRanges so they're properly aligned.
  • Fix bugs on resizing
    • Edge case where initial capacity is 0 would cause an infinite loop, now automatic resizing is smarter about how it chooses the new size.
  • Clean up return types of most methods.
  • Remove argument from ContiguousMemoryStorage::can_push to be closer to Layout constructor.
  • Rename ContiguousMemoryStorage::new_from_layout to ContiguousMemoryStorage::new_for_layout.

Removed

  • Remove StoreData trait as it wasn't supposed to be used.
  • Remove ContiguousMemoryStorage trait as it only complicated implementation.
  • Remove deprecated re-exports.
  • Remove std feature.
    • See #fd4767d commit message for reasoning.
  • Remove prelude module, use contiguous_mem::* as a drop in replacement.

Management

  • Add semver checking workflow
  • Add clippy workflow
  • Simplify CI workflow
  • Add resizing test to ensure correctness is maintained across versions
  • Improve documentation

0.3.1

31 Aug 15:12
4362153
Compare
Choose a tag to compare

Additions

  • Added reference downcasting through ContiguousMemoryReference::downcast_ref method.
  • Added ContiguousMemoryStorage::copy_storage utility method for unsafe implementation.
  • Moved ContiguousMemoryStorage::store_data implementation to a sealed impl trait.
    • Deprecated StoreData trait.

Changes

  • Renamed RegionBorrowed to RegionBorrowedError.
  • Improved docs.
    • Enabled all features for docs.rs
    • Added some examples to the docs

Release issues

This minor release contains a breaking change because prelude doesn't include StoreData. I'm fairly new to maintaining a crate and I did try to avoid making removal of StoreData a breaking change, but I managed to mess it up for which I apologize. This means that if you depended on the suggested use contiguous_mem::prelude::* import and used the StoreData::store_data function you'd have to add an explicit import for contiguous_mem::StoreData.

To address this and prevent it from happening in the future, a semver check action will be added to the project.

Further, while adding an example I noticed that AllocationTracker doesn't handle alignment properly if base alignment of the container is not align_of::<usize>(). This was the case ever since the initial release. Before initial release, AllocationTracker used to keep a copy of base address and all ByteRanges were absolute which meant that such a problem didn't exist.

These issues have been fixed in v0.4.0.

0.3.0

31 Aug 02:31
b503611
Compare
Choose a tag to compare

Fixes

  • Fixed concurrent implementation.
    • Switched to RwLock in places where concurrent reads should be allowed.
  • Fixed issues with no_std and std features causing the build to fail when enabled at the same time.
  • Fixed debug feature not compiling.

Additions

  • Added read guards to properly handle read/write exclusion.
  • Added more utility methods.
    • ContiguousMemoryStorage::layout
    • ContiguousMemoryStorage::can_store
  • Added a trait for common reference behavior.

Changes

  • Simplified construction of references to dyn Traits (fat pointers).
    • Pointer metadata is automatically inferred from previous and new type.
    • Renamed as_dyn function into into_dyn
  • Moved reference types into refs module.
  • Cleaned up user facing API and exported types.
    • Internal state and other less important structs are no longer accessible.
  • Cleaned up detail implementation inheritance chain and names.
  • Added examples for each targeted use case.
  • Cleaned up the documentation so it's much clearer and easier to understand.
    • Added some examples to the documentation.
    • Everything is documented now.
      • Enabled missing_docs warning.
    • Enabled showing feature requirements for generated docs.

0.2.0

29 Aug 19:19
d6365de
Compare
Choose a tag to compare
  • Renamed some structs, traits and variants.
  • Fixed storage and dropping issues.
  • Fully implemented ptr_metadata support.
  • Cleaned up type interface to be more convenient.
  • Added support for mutation of stored data.
  • Separated library into more modules.
  • Improved tests.

0.1.2

28 Aug 07:29
8083aa5
Compare
Choose a tag to compare

Remove ptr_metadata from default dependencies.
Fix compile errors when the crate is compiled without ptr_metadata feature.

0.1.1

28 Aug 06:59
6e77656
Compare
Choose a tag to compare

Added support for ptr_metadata

This release has been yanked as it was defective:

  • ptr_metadata was left enabled by default
    • Technically this should bump minor, but I decided to yank the release and release a new patch as the crate's been downloaded <20 times. Will take extra care this doesn't happen in future.
  • The crate didn't compile without the flag due to one import not being available with ptr_metadata .

0.1.0

28 Aug 06:57
380fa26
Compare
Choose a tag to compare

Initial release