|0.1.0||Jan 26, 2023|
|0.0.1||Nov 25, 2022|
#804 in #graphics
22 downloads per month
Blade is a low-level GPU library in Rust with the focus on ergonomics. It's unsafe, it's incomprehensive, but it's small, fast, and actually fun to prototype with!
The backend is selected automatically based on the host platform.
- Desktop Linux/Windows
- Desktop macOS
Run the minimal example:
cargo run --example mini
GLES is also supported at a basic level. It's enabled for
wasm32-unknown-unknown target, and can also be force-enabled on native:
RUSTFLAGS="--cfg gles" CARGO_TARGET_DIR=./target-gl cargo test
This path can be activated on all platforms via Angle library.
For example, on macOS it's sufficient to place
libGLESv2.dylib in the working directory.
Following command will start a web server offering the
cargo run-wasm --example bunnymark
First, ensure to load the environment from the Vulkan SDK:
cd /opt/VulkanSDK && source setup-env.sh
Vulkan backend can be forced on using "vulkan" config flag. Example invocation that produces a vulkan (portability) build into another target folder:
RUSTFLAGS="--cfg vulkan" CARGO_TARGET_DIR=./target-vk cargo test