Crates.io | volcell |
lib.rs | volcell |
version | 1.0.0 |
source | src |
created_at | 2023-06-24 18:34:24.703587 |
updated_at | 2023-06-24 18:34:24.703587 |
description | A container type that can hold volatile data and allow for safe reads and mutation of its contents with support for use in packed structs |
homepage | |
repository | https://codeberg.org/TeleportAura/volcell |
max_upload_size | |
id | 899088 |
size | 22,736 |
The volcell crate provides the container type VolatileCell
which prevents memory accesses to its data
from being optimized away by the compiler.
This is useful for example when writing to memory that needs to be read by either another process or the kernel
and when writing to buffers that are used to interface with hardware (e.g. the VGA buffer or an APIC register).
VolatileCell
can be used in packed structs when enabling the unstable
feature and using the nightly Rust toolchain.
This project is open to any sorts of contributions, be it by notifying me of an issue with the library or by directly contributing code. Since I want to keep this library small and simple, however, you should open an issue to discuss the changes you want to make before starting work on a pull request.
Copyright 2023, TeleportAura This software is licensed under the MPL 2.0 license