#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

#2070 in Game dev

Download history 10754/week @ 2024-01-19 10184/week @ 2024-01-26 9134/week @ 2024-02-02 9961/week @ 2024-02-09 16899/week @ 2024-02-16 13193/week @ 2024-02-23 14190/week @ 2024-03-01 13806/week @ 2024-03-08 13332/week @ 2024-03-15 16025/week @ 2024-03-22 14326/week @ 2024-03-29 14445/week @ 2024-04-05 13194/week @ 2024-04-12 14199/week @ 2024-04-19 11528/week @ 2024-04-26 13860/week @ 2024-05-03

54,683 downloads per month
Used in 972 crates (7 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