#bevy #no-std

no-std bevy_ptr

Utilities for working with untyped pointers in a more safe way

3 unstable releases

Uses new Rust 2021

0.8.1 Aug 23, 2022
0.8.0 Jul 30, 2022
0.0.1 Jun 18, 2022

#51 in #game-engine

Download history 21/week @ 2022-06-15 4/week @ 2022-06-22 1/week @ 2022-06-29 2/week @ 2022-07-06 2/week @ 2022-07-13 1/week @ 2022-07-20 3265/week @ 2022-07-27 3920/week @ 2022-08-03 4021/week @ 2022-08-10 5927/week @ 2022-08-17 7661/week @ 2022-08-24 4630/week @ 2022-08-31 4549/week @ 2022-09-07 4089/week @ 2022-09-14 4105/week @ 2022-09-21 4562/week @ 2022-09-28

17,929 downloads per month
Used in 222 crates (4 directly)

MIT/Apache

13KB
151 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.

No runtime deps