2022-01-17 20:45:10 +01:00
## Ash-window
2020-07-04 15:21:39 +02:00
2023-11-17 16:55:05 +01:00
Interoperability between [`ash` ](https://github.com/ash-rs/ash ) and [`raw-window-handle` ](https://github.com/rust-windowing/raw-window-handle ) for surface creation.
2020-07-04 15:21:39 +02:00
2021-07-30 12:32:52 +02:00
[![Crates.io Version ](https://img.shields.io/crates/v/ash-window.svg )](https://crates.io/crates/ash-window)
[![Documentation ](https://docs.rs/ash-window/badge.svg )](https://docs.rs/ash-window)
2023-11-17 16:55:05 +01:00
[![Build Status ](https://github.com/ash-rs/ash/workflows/CI/badge.svg )](https://github.com/ash-rs/ash/actions?workflow=CI)
2021-07-30 12:32:52 +02:00
[![LICENSE ](https://img.shields.io/badge/license-MIT-blue.svg )](LICENSE-MIT)
[![LICENSE ](https://img.shields.io/badge/license-apache-blue.svg )](LICENSE-APACHE)
2022-09-22 18:07:17 +02:00
[![Join the chat at https://gitter.im/MaikKlein/ash ](https://badges.gitter.im/MaikKlein/ash.svg )](https://gitter.im/MaikKlein/ash?utm_source=badge& utm_medium=badge& utm_campaign=pr-badge& utm_content=badge)
2023-12-02 20:04:57 +01:00
[![MSRV ](https://img.shields.io/badge/rustc-1.69.0+-ab6000.svg )](https://blog.rust-lang.org/2023/04/20/Rust-1.69.0.html)
2020-07-04 15:21:39 +02:00
## Usage
2021-07-30 12:32:52 +02:00
```toml
2023-02-24 22:01:58 +01:00
ash-window = "0.12.0"
2021-07-30 12:32:52 +02:00
```
2020-07-04 15:21:39 +02:00
The library exposes two functions:
2022-09-23 12:40:12 +02:00
- [`enumerate_required_extensions` ] returns the required instance extensions needed for surface creation from a specific display handle.
2020-07-04 15:21:39 +02:00
2022-09-23 12:40:12 +02:00
- [`create_surface` ] allows to create a surface from a type implementing [`RawDisplayHandle` ] and [`RawWindowHandle` ]:
2020-07-04 15:21:39 +02:00
2021-07-30 12:32:52 +02:00
```rust
ash_window::create_surface(& entry, & instance, & window, None)?;
```
[`enumerate_required_extensions` ]: https://docs.rs/ash-window/latest/ash_window/fn.enumerate_required_extensions.html
[`create_surface` ]: https://docs.rs/ash-window/latest/ash_window/fn.create_surface.html
2022-09-23 12:40:12 +02:00
[`RawDisplayHandle` ]: https://docs.rs/raw-window-handle/latest/raw_window_handle/enum.RawDisplayHandle.html
[`RawWindowHandle` ]: https://docs.rs/raw-window-handle/latest/raw_window_handle/enum.RawWindowHandle.html
2020-07-04 15:21:39 +02:00
## Versions
2023-04-16 22:19:09 +02:00
2020-07-04 15:21:39 +02:00
```toml
2022-03-23 22:04:12 +01:00
ash = "0.37"
2020-07-04 15:21:39 +02:00
```
## Support
- [x] Windows (`VK_KHR_win32_surface` )
- [x] Unix (`VK_KHR_xlib_surface` /`VK_KHR_xcb_surface` /`VK_KHR_wayland_surface` )
- [x] MacOS/IOS (`VK_EXT_metal_surface` )
- [x] Android (`VK_KHR_android_surface` )
## License
Licensed under either of
2023-04-16 22:19:09 +02:00
- Apache License, Version 2.0, ([LICENSE-APACHE ](LICENSE-APACHE ) or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license ([LICENSE-MIT ](LICENSE-MIT ) or http://opensource.org/licenses/MIT)
2020-07-04 15:21:39 +02:00
at your option.
## Contribution
Unless you explicitly state otherwise, any Contribution intentionally submitted for inclusion in this crate by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.