Registry / utility / bevy-ptr

bevy-ptr

JSON →
library0.18.1rscratesunverified

Utilities for working with untyped pointers in a safer way within the Bevy engine.

# Cargo.toml [dependencies] bevy_ptr = "0.18.1"
INSTALL
IMPORT
SIG · BEVY-PTR
B
bevy-ptr
utilityrustv0.18.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Ptr
use bevy_ptr::Ptr;

Create and use a typed pointer from an untyped one

use bevy_ptr::Ptr; fn main() { let mut data = 42u32; let ptr = Ptr::from(&mut data); unsafe { *ptr.as_mut::<u32>() = 100; } println!("{}", data); }
Debug
Known issues
gotchaUnsafe operations require careful handling; misuse can cause undefined behavior.
fix
Always ensure correct alignment and lifetime when using Ptr.
affects: >=0.18.0
Upgrade
Version history
0.18.1latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
10 hits · last 30 days
node
10
Resources
bevy-ptr — cargo add bevy-ptr · libregistry