16 unstable releases (6 breaking)
0.13.2 | Apr 4, 2024 |
---|---|
0.13.1 | Mar 18, 2024 |
0.13.0 | Feb 17, 2024 |
0.12.1 | Nov 30, 2023 |
0.8.0 | Jul 30, 2022 |
#2113 in Game dev
60,632 downloads per month
Used in 925 crates
(5 directly)
23KB
260 lines
Bevy Ptr
The bevy_ptr
crate provides low-level abstractions for working with pointers in a more safe way than using rust's raw pointers.
Rust has lifetimed and typed references (&'a T
), unlifetimed and typed references (*const T
), but no lifetimed but untyped references.
bevy_ptr
adds them, called Ptr<'a>
, PtrMut<'a>
and OwningPtr<'a>
.
These types are lifetime-checked so can never lead to problems like use-after-frees and must always point to valid data.