📅  最后修改于: 2023-12-03 15:35:39.243000             🧑  作者: Mango
Vulkano is a Rust library that provides high-level bindings to the Vulkan graphics API. With Vulkano, you can write efficient and safe graphics applications without sacrificing performance.
To get started with Vulkano, you'll need to install the Rust compiler and the Vulkan SDK. You can find instructions for installing Rust at rust-lang.org and instructions for installing the Vulkan SDK at vulkan.lunarg.com.
Once you have Rust and the Vulkan SDK installed, you can create a new Vulkano project using the cargo new
command:
cargo new my-vulkano-project --bin
cd my-vulkano-project
Next, you'll need to add Vulkano to your project's dependencies in the Cargo.toml
file:
[dependencies]
vulkano = "0.21.0"
Now you can start writing your Vulkano application! Here's a basic example:
use vulkano::instance::Instance;
fn main() {
let instance = Instance::new(None, &vulkano_win::required_extensions(), None).unwrap();
println!("Vulkano instance created");
}
Vulkano is a powerful and easy-to-use library for writing graphics applications with Rust. With its high-level bindings to the Vulkan API, memory and thread safety, and support for multiple platforms, Vulkano is an ideal choice for graphics programmers who value performance, safety, and productivity.