- Breaking: feat: introduce
RestrictAccess<To>and generalizerestrictto all access types by @mkroening in #60 - feat: implement derive macro for all access types by @mkroening in #61
- fix: add
#[must_use]to volatile types,read, andas_raw_ptrby @mkroening in #58 - Add a semver checks CI job by @phil-opp in #63
Full Changelog: https://github.com/rust-osdev/volatile/compare/v0.5.4...0.6.0
- fix(access): properly seal access traits by @mkroening in #59
- fix(macro): support
#[repr(align(N))]in#[derive(VolatileFieldAccess)]macro by @mkroening in #57 - Fix warnings by @mkroening in #56
- Add
#[derive(VolatileFieldAccess)]for easy, access-limited field-based access to structs by @mkroening in #49 - Add
VolatileRef::restrictandVolatilePtr::restrictby @mkroening in #47 - Add
VolatileRef::borrowandVolatileRef::borrow_mutby @mkroening in #46 - Add support for nested
map_fieldoperations by @phil-opp in #50 - docs: remove unused
NonNullimports by @mkroening in #48 - fix(Cargo.toml): add categories by @mkroening in #52
- Add implementations for
fmt::Pointer,PartialEq,Eq,PartialOrd,OrdandHash. - Update
very_unstablefeature to latest nightly - Remove
Sizedrequirement forSendandSyncimpls onVolatileRef
- Fix: Add missing documentation of the
mapmacro
- Breaking: New design based on raw pointers
- The previous reference-based design was unsound because it allowed the compiler to insert spurious reads.
- The new design features two wrapper types for raw pointers:
VolatilePtrandVolatileRef VolatilePtrprovides safe read and write access to volatile values. Like raw pointers, it implementsCopyand is!Sync.VolatileRefis a pointer type that respects Rust's aliasing rules. It doesn't implementCopy, requires a&mutreference for modification, and implementsSync. It can converted to temporaryVolatilePtrinstances through theas_ptr/as_mut_ptrmethods.
- We now provide methods for volatile slice operations and a
map!macro for struct field projection. These advanced features are gated behind a cargo feature named "unstable".
- Fix UB in slice methods when Deref returns different references (#27)
- Remove the
const_genericsfeature flag (#25)
- Replace feature "range_bounds_assert_len" with "slice_range" (#21)
- Fixes the
unstablefeature on the latest nightly.
- Fixes the
- Add methods to restrict access (#19)
- Change
slice::check_rangetoRangeBounds::assert_len(#16)- Fixes build on latest nightly.
- Small documentation and metadata improvements
- Breaking: Rewrite crate to operate on reference values (#13)
- Breaking: Remove
DebugandClonederives forWriteOnly(#12)
- Derive
DefaultforVolatile,WriteOnlyandReadOnly(#10)