gfx-hal

gfx-rs hardware abstraction layer

15 releases (8 breaking)

0.9.0 Jun 19, 2021
0.7.0 Jan 30, 2021
0.6.0 Aug 16, 2020
0.5.3 Jun 27, 2020
0.1.0 Dec 27, 2018
Download history 2644/week @ 2024-07-22 2452/week @ 2024-07-29 2492/week @ 2024-08-05 5409/week @ 2024-08-12 2782/week @ 2024-08-19 3523/week @ 2024-08-26 3201/week @ 2024-09-02 2548/week @ 2024-09-09 2531/week @ 2024-09-16 3383/week @ 2024-09-23 2453/week @ 2024-09-30 310/week @ 2024-10-07 2227/week @ 2024-10-14 2285/week @ 2024-10-21 2574/week @ 2024-10-28 2331/week @ 2024-11-04

9,447 downloads per month
Used in fewer than 31 crates

MIT/Apache

315KB
4.5K SLoC

Low-level graphics abstraction for Rust. Mostly operates on data, not types. Designed for use by libraries and higher-level abstractions only.

This crate provides a hardware abstraction layer for graphics adapters, for both compute and graphics operations. The API design is heavily inspired by the Vulkan API, and borrows some of the terminology.

Usage

Most of the functionality is implemented in separate crates, one for each backend. This crate only exposes a few generic traits and structures. You can import all the necessary traits through the [prelude][prelude] module.

The first step to using gfx-hal is to initialize one of the available [backends][Backend], by creating an [Instance][Instance]. Then proceed by enumerating the available graphics adapters and querying their available [features][Features] and queues.

You can use the open method on a PhysicalDevice to get a logical device handle, from which you can manage all the other device-specific resources.

Dependencies

~5MB
~106K SLoC