befb8cdd36
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.
35 lines
924 B
TOML
35 lines
924 B
TOML
[package]
|
|
name = "ash-window"
|
|
version = "0.12.0"
|
|
authors = [
|
|
"msiglreith <m.siglreith@gmail.com>",
|
|
"Marijn Suijten <marijn@traverseresearch.nl>",
|
|
]
|
|
license = "MIT OR Apache-2.0"
|
|
description = "Interop library between ash and raw-window-handle"
|
|
repository = "https://github.com/ash-rs/ash"
|
|
keywords = ["windowing", "ash", "graphics", "vulkan", "raw-window-handle"]
|
|
categories = [
|
|
"api-bindings",
|
|
"game-development",
|
|
"graphics",
|
|
"rendering::graphics-api"
|
|
]
|
|
edition = "2021"
|
|
rust-version = "1.69.0"
|
|
|
|
[dependencies]
|
|
ash = { path = "../ash", version = "0.37", default-features = false }
|
|
raw-window-handle = "0.5"
|
|
|
|
[target.'cfg(any(target_os = "macos", target_os = "ios"))'.dependencies]
|
|
raw-window-metal = "0.3"
|
|
|
|
[dev-dependencies]
|
|
winit = "0.28.0"
|
|
ash = { path = "../ash", version = "0.37", default-features = false, features = ["linked"] }
|
|
|
|
[[example]]
|
|
name = "winit"
|
|
required-features = ["ash/linked"]
|