ash/ash-window
Marijn Suijten befb8cdd36
Switch to safe CStr::from_bytes_until_nul on sized c_char array wrapper (#746)
Certain structs contain sized character arrays that are converted to
`CStr` for convenient accss to the user and our `Debug` implementation
using unsafe `CStr::from_ptr(...as_ptr())`.  There is no need to
round-trip to a pointer and possibly read out of bounds if the
NUL-terminator index (string length) is instead searched for by the
newly stabilized `CStr::from_bytes_until_nul()` fn since Rust 1.69
(which panics if no NUL-terminator is found before the end of the
slice).

Unfortunately `unsafe` is still needed to cast the array from a `c_char`
(`i8` on most platforms) to `u8`, which is what `from_bytes_until_nul()`
accepts.
2023-12-02 20:04:57 +01:00
..
examples fix clippy::uninlined_format_args (#705) 2023-02-17 18:11:44 +01:00
src Resolve lint warnings for deprecated_in_future, rust_2018_idioms and unused_qualifications (#803) 2023-10-26 08:30:16 +02:00
Cargo.toml Switch to safe CStr::from_bytes_until_nul on sized c_char array wrapper (#746) 2023-12-02 20:04:57 +01:00
Changelog.md Switch to safe CStr::from_bytes_until_nul on sized c_char array wrapper (#746) 2023-12-02 20:04:57 +01:00
LICENSE-APACHE Adds LICENSE-* files to crate subdirectories (#452) 2021-07-09 12:21:15 +02:00
LICENSE-MIT Adds LICENSE-* files to crate subdirectories (#452) 2021-07-09 12:21:15 +02:00
README.md Switch to safe CStr::from_bytes_until_nul on sized c_char array wrapper (#746) 2023-12-02 20:04:57 +01:00

Ash-window

Interoperability between ash and raw-window-handle for surface creation.

Crates.io Version Documentation Build Status LICENSE LICENSE Join the chat at https://gitter.im/MaikKlein/ash MSRV

Usage

ash-window = "0.12.0"

The library exposes two functions:

Versions

ash = "0.37"

Support

  • Windows (VK_KHR_win32_surface)
  • Unix (VK_KHR_xlib_surface/VK_KHR_xcb_surface/VK_KHR_wayland_surface)
  • MacOS/IOS (VK_EXT_metal_surface)
  • Android (VK_KHR_android_surface)

License

Licensed under either of

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.