1 unstable release

0.1.0 Jan 28, 2021

#24 in #positive


Used in vulkayes-window

MIT/Apache

325KB
9K SLoC

This crate provides core components for the vulkayes project.

Crate features:

host_allocator and rust_host_allocator

host_allocator adds Custom variant to HostMemoryAllocator. This makes the type sized, but enables the use of custom host memory allocators.

rust_host_allocator adds Rust() constructor to HostMemoryAllocator that uses Rusts std::alloc methods. Requires host_allocator feature.

naive_device_allocator

Adds a simple memory allocator NaiveDeviceMemoryAllocator that allocates memory for each resource separately. It should not be used in production applications.

multi_thread

Enables multi thread support by using Arc<T> and Mutex<T> (dubbed as Vrc and Vutex) instead of Rc<T> and RefCell<T> (wrapped to have compatible API).

parking_lot_vutex

Uses Mutex from parking_lot crate instead of the standard library. Requires multi_thread feature.

insecure_hash

Uses rustc_hash::{FxHashMap, FxHashSet} instead of std::collections::{HashMap, HashSet} (dubbed as VHashMap and VHashSet).

runtime_implicit_validations

Some implicit validations cannot be checked statically. This feature enables runtime checks of those validations. Note that in some circumstances, such as Instance creation and extension name checking, the validation is part of the input argument transformation and turning it off would not bring any advantages.

These validations might not be cheap. It is recommended to only enabled them when debugging, not in release/production builds.

vulkan1_1 and vulkan1_2

vulkan1_1 enables methods that will panic on Vulkan 1.0

vulkan1_2 enables methods that will panic on Vulkan 1.0 and 1.1. Requires vulkan1_1 feature.

log_max_level_* and log_release_max_level_*

These features directly correspond to the features on the log crate.

Dependencies

~6.5MB
~152K SLoC