#bevy #pointers #no-std #safe #untyped #ptr #lifetime-checked

no-std bevy_ptr

Utilities for working with untyped pointers in a more safe way

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

#2116 in Game dev

Download history 8883/week @ 2023-12-23 9014/week @ 2023-12-30 10391/week @ 2024-01-06 10770/week @ 2024-01-13 10693/week @ 2024-01-20 9997/week @ 2024-01-27 9228/week @ 2024-02-03 9892/week @ 2024-02-10 17916/week @ 2024-02-17 12951/week @ 2024-02-24 13915/week @ 2024-03-02 13122/week @ 2024-03-09 14366/week @ 2024-03-16 15897/week @ 2024-03-23 15211/week @ 2024-03-30 13985/week @ 2024-04-06

60,632 downloads per month
Used in 931 crates (5 directly)

MIT/Apache

23KB
260 lines

Bevy Ptr

License Crates.io Downloads Docs Discord

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.

No runtime deps