Giter Site home page Giter Site logo

nicklassundin / vulkanalia Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kylemayes/vulkanalia

0.0 0.0 0.0 21.69 MB

Vulkan bindings for Rust.

License: Apache License 2.0

Shell 0.02% Python 0.04% Rust 97.61% PowerShell 0.01% Kotlin 2.25% Makefile 0.01% GLSL 0.06%

vulkanalia's Introduction

vulkanalia

Crate Documentation CI MSRV

Vulkan bindings for Rust.

Released under the Apache License 2.0.

Heavily inspired by the ash crate.

For users new to Vulkan, there is a complete adaptation of https://vulkan-tutorial.com by Alexander Overvoorde to use Rust and vulkanalia instead of C++. The published version of this tutorial can be found here and the sources for the tutorial (including standalone working code examples for each chapter) are in this repository in the tutorial directory.

Overview

vulkanalia-sys consists of the Vulkan types and command signatures generated from the Vulkan API Registry. If you want to use the raw Vulkan API and are willing to handle function loading yourself you can use this crate.

vulkanalia offers a fairly thin wrapper around vulkanalia-sys that handles function loading for you and makes the Vulkan API somewhat less error prone and more idiomatic to use from Rust. For a detailed overview of how vulkanalia wraps the Vulkan API, see the API Concepts section of the Overview chapter of the Vulkan tutorial which can be found here.

Cargo Features

The vulkanalia crate has the following notable non-default Cargo features:

  • libloading (non-default) – enables integration with libloading (adds the LibloadingLoader struct which can be used to load the initial Vulkan commands from a Vulkan shared library)
  • window (non-default) – enables integration with raw-window-handle (adds the window module which can be used to create surfaces for windows from libraries that support raw-window-handle (e.g., winit)
  • provisional (non-default) – enables access to provisional Vulkan extensions (WARNING: these extensions are not guaranteed to be backwards compatible and are not intended to be used in production applications)

By default, the vulkanalia-sys and vulkanalia crates depend on the Rust standard library. However, by disabling the default features for these crates, you can use either of these crates in a no_std environment. If you do this, the following features are of note:

  • no_std_error (non-default): enables implementations of the Error trait for various error types in vulkanalia and vulkanalia-sys when the default std feature is not enabled (the usage of the Error trait in core is not yet stable and requires the core-error feature to be enabled)

Example

See the examples directory for an implementation of the classic triangle example using vulkanalia.

vulkanalia's People

Contributors

kylemayes avatar dariuswiles avatar chuigda avatar alvaro-sch avatar nicholicaron avatar ciel-mc avatar mfs avatar follower avatar mo-ba avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.