nobs-vk 0.1.5

A very basic, non rich wrapper for binding vulkan commands and extension loading
Documentation
# nobs-vk
no bullshit vulkan bindings.

This crate is auto generated by python scripts and provides types, constants and functions for
[vulkan](https://www.khronos.org/vulkan/).

1. [Existential questions]#existential-questions
2. [Dokumentation]#dokucmentation
3. [Setup]#setup
  1. [linux]#linux
  2. [windows]#windows
  3. [mac]#mac
4. [Using nobs-vk]#using-nobs-vk
  1. [Vulkan Core]#vulkan-core
  2. [Instance Extensions]#instance-extensions
  3. [Device Extensions]#device-extensions
5. [Generating the rust source with python]#generating-the-rust-source-with-python
6. [Contributing]#contributing

## Existential questions
Why does nobs-vk exists? nobs-vk...
1. is used how the vulkan api is documented
2. is auto generated from a python script that sources the vk.xml from the vulkan registry
3. gives you the freedom to do as you please in your design decisions (but therefore doesn't protect you from your own stupidity)
4. is not a full blown window creating bloat library in the back, just to execute some small compute shader with a headless vulkan build

While more involved wrappers for vulkan do exist they also strife to completely hide the vulkan api behind another layer of rust code and might force you into design decisions you would normally avoid. This library tries to be as simple as possible by just exposing callable functions to vulkan.

## Documentation
Find a complete documentation of this library at [docs.rs](https://docs.rs/nobs-vk).

## Setup

To use nobs-vk you need a GPU with vulkan compatible drivers installed on your system. Optionally you may choose to install the [vulkan sdk](https://www.lunarg.com/vulkan-sdk/).

Right now the only tested environment is linux. Contributions are welcome!

### Linux
When using a NVIDIA GPU, install the proprietary driver from NVIDIA (full support for vulkan 1.1 since driver version 387). 
```
# apt install  vulkan-utils
```

On AMD and Intel GPUs it is enough to install the packages (in case of apt):
```
# apt install libvulkan1 mesa-vulkan-drivers vulkan-utils
```

### Windows
Install a current driver for your GPU and the vulkan sdk.
TODO: Try if that actually works...

### Mac
TODO: no idea, who uses that?


### Using nobs-vk
Since the idea of this library is to NOT introduce more complexity to the already existing vulkan API, please refer to the official vulkan [documentation](https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html) or [referece](https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/). Here we only briefly give an introduction on how to set things up:

#### Vulkan Core
First we to load the core library:
```rust
extern crate nobs_vk as vk;
let vk_lib = vk::Core::new(); // or with_feature(vk::VERSION_x_x) to use specific feature level
```
*Note: Core function are both bound as members of the `vk::Core` object, as well as free functions in the `vk` namespace*

#### Unstance Extensions
After we created an instance, we can load instance extensions (automatically loads all extensions specified during instance creation):
```rust
// ...
// vk::CreateInstance(&create_info, ptr::null(), &mut inst)
let instance_ext = vk::InstanceExtensions::new(inst);
```
*Note: Instance extensions are only bound as members of the `vk::InstanceExtensions` object.*

#### Device Extensions
Same pattern as we did for the instance:
```rust  
let device_ext = vk::DeviceExtensions::new(device_handle);  
```  
*Note: Device extensions are only bound as members of the `vk::DeviceExtensions` object.*

## Generating the rust source with python
The rust library may be built with `python generate/generate.py`. This will replace the lib.rs in the src directory.

## Contributing
Feel encouraged to contribute! Especially everything that helps to make this library run on all varieties of platforms would be useful at this stage of the project.