6 releases (breaking)

0.7.0 Apr 9, 2024
0.6.0 May 30, 2023
0.5.0 Jun 9, 2022
0.4.0 Feb 26, 2022
0.2.0 Aug 15, 2021

#345 in Memory management

Download history 23/week @ 2023-12-24 53/week @ 2024-01-07 25/week @ 2024-01-14 4/week @ 2024-01-21 23/week @ 2024-01-28 230/week @ 2024-02-04 460/week @ 2024-02-11 1931/week @ 2024-02-18 1758/week @ 2024-02-25 1365/week @ 2024-03-03 1211/week @ 2024-03-10 1210/week @ 2024-03-17 1092/week @ 2024-03-24 1135/week @ 2024-03-31 979/week @ 2024-04-07

4,592 downloads per month
Used in 6 crates (2 directly)

MIT/Apache

30KB
302 lines

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 gpu-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 gpu-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

~5.5MB
~139K SLoC