- Breaking: feat: introduce
RestrictAccess<To>
and generalizerestrict
to 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_ptr
by @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::restrict
andVolatilePtr::restrict
by @mkroening in #47 - Add
VolatileRef::borrow
andVolatileRef::borrow_mut
by @mkroening in #46 - Add support for nested
map_field
operations by @phil-opp in #50 - docs: remove unused
NonNull
imports by @mkroening in #48 - fix(Cargo.toml): add categories by @mkroening in #52
- Add implementations for
fmt::Pointer
,PartialEq
,Eq
,PartialOrd
,Ord
andHash
. - Update
very_unstable
feature to latest nightly - Remove
Sized
requirement forSend
andSync
impls onVolatileRef
- Fix: Add missing documentation of the
map
macro
- 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:
VolatilePtr
andVolatileRef
VolatilePtr
provides safe read and write access to volatile values. Like raw pointers, it implementsCopy
and is!Sync
.VolatileRef
is a pointer type that respects Rust's aliasing rules. It doesn't implementCopy
, requires a&mut
reference for modification, and implementsSync
. It can converted to temporaryVolatilePtr
instances through theas_ptr
/as_mut_ptr
methods.
- 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_generics
feature flag (#25)
- Replace feature "range_bounds_assert_len" with "slice_range" (#21)
- Fixes the
unstable
feature on the latest nightly.
- Fixes the
- Add methods to restrict access (#19)
- Change
slice::check_range
toRangeBounds::assert_len
(#16)- Fixes build on latest nightly.
- Small documentation and metadata improvements
- Breaking: Rewrite crate to operate on reference values (#13)
- Breaking: Remove
Debug
andClone
derives forWriteOnly
(#12)
- Derive
Default
forVolatile
,WriteOnly
andReadOnly
(#10)