Vendor dependencies

This commit is contained in:
2026-08-01 16:11:49 +03:00
parent 7f139a0241
commit 6b5e7f0f8b
29706 changed files with 9575646 additions and 0 deletions
+40
View File
@@ -0,0 +1,40 @@
# Bit-Level Access Instructions
This trait extends [`Radium`] in order to manipulate specific bits in an element
according to the crate’s logic. It drives all memory access instructions and is
responsible for translating the bit-selection logic of the [`index`] module into
real effects.
This is blanket-implemented on all types that permit shared-mutable memory
access via the [`radium`] crate. Its use is constrained in the [`store`] module.
It is required to be a publicly accessible symbol, as it is exported in other
traits, but it is a crate-internal item and is not part of the public API. Its
blanket implementation for `<R: Radium>` prevents any other implementations from
being written.
## Implementation and Safety Notes
This trait is automatically implemented for all types that implement `Radium`,
and relies exclusively on `Radium`’s API and implementations for its work. In
particular, `Radium` has no functions which operate on **pointers**: it
exclusively operates on memory through **references**. Since references must
always refer to initialized memory, `BitAccess` and, by extension, all APIs in
`bitvec` that touch memory, cannot be used to operate on uninitialized memory in
any way.
While you may *create* a `bitvec` pointer object that targets uninitialized
memory, you may not *dereference* it until the targeted memory has been wholly
initialized with integer values.
This restriction cannot be loosened without stable access to pointer-based
atomic intrinsics in the Rust standard library and corresponding updates to the
`Radium` trait.
Do not attempt to access uninitialized memory through `bitvec`. Doing so will
cause `bitvec` to produce references to uninitialized memory, which is undefined
behavior.
[`Radium`]: radium::Radium
[`index`]: crate::index
[`radium`]: radium
[`store`]: crate::store
+16
View File
@@ -0,0 +1,16 @@
# Read-Only Semivolatile Handle
This trait describes views of memory that are not permitted to modify the value
they reference, but must tolerate external modification to that value.
Implementors must tolerate shared-mutability behaviors, but are not allowed to
expose shared mutation APIs. They are permitted to modify the referent only
under `&mut` exclusive references.
This behavior enables an important aspect of the `bitvec` memory model when
working with memory elements that multiple [`&mut BitSlice`][0] references
touch: each `BitSlice` needs to be able to give the caller a view of the memory
element, but they also need to prevent modification of bits outside of their
span. This trait enables callers to view raw underlying memory without
improperly modifying memory that *other* `&mut BitSlice`s expect to be stable.
[0]: crate::slice::BitSlice
+12
View File
@@ -0,0 +1,12 @@
# Read-Only Shared-Mutable Handle
This type marks a handle to a shared-mutable type that may be modified through
*other* handles, but cannot be modified through *this* one. It is used when a
[`BitSlice`] region has partial ownership of an element and wishes to expose the
entire underlying raw element to the user without granting them write
permissions.
Under the `feature = "atomic"` build setting, this uses `radium`’s best-effort
atomic alias; when this feature is disabled, it reverts to `Cell`.
[`BitSlice`]: crate::slice::BitSlice