#gpu #vulkan #allocation #no-std

no-std gpu-alloc

Implementation agnostic memory allocator for Vulkan like APIs

11 unstable releases (4 breaking)

0.5.1 Sep 3, 2021
0.4.7 May 22, 2021
0.4.2 Mar 30, 2021
0.2.0 Nov 13, 2020

#6 in Memory management

Download history 11573/week @ 2021-05-31 9389/week @ 2021-06-07 11384/week @ 2021-06-14 11575/week @ 2021-06-21 12327/week @ 2021-06-28 9287/week @ 2021-07-05 9749/week @ 2021-07-12 10295/week @ 2021-07-19 11714/week @ 2021-07-26 9250/week @ 2021-08-02 11416/week @ 2021-08-09 11363/week @ 2021-08-16 13069/week @ 2021-08-23 12526/week @ 2021-08-30 12120/week @ 2021-09-06 12195/week @ 2021-09-13

47,306 downloads per month
Used in 137 crates (3 directly)

MIT/Apache

95KB
2K SLoC

gpu-alloc

crates docs actions MIT/Apache loc

Implementation agnostic memory allocator for Vulkan like APIs.

This crate is intended to be used as part of safe API implementations.
Use with caution. There are unsafe functions all over the place.

Usage

Start with fetching DeviceProperties from gfx-alloc-<backend> crate for the backend of choice.
Then create GpuAllocator instance and use it for all device memory allocations.
GpuAllocator will take care for all necessary bookkeeping like memory object count limit, heap budget and memory mapping.

Backends implementations

Backend supporting crates should not depend on this crate.
Instead they should depend on gpu-alloc-types which is much more stable, allowing to upgrade gpu-alloc version without gfx-alloc-<backend> upgrade.

Supported Rust Versions

The minimum supported version is 1.40. The current version is not guaranteed to build on Rust versions earlier than the minimum supported version.

gpu-alloc-erupt crate requires version 1.48 or higher due to dependency on erupt crate.

License

Licensed under either of

at your option.

Contributions

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Donate

Become a patron

Dependencies

~18–325KB