ash/ash-rewrite/Cargo.toml
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

38 lines
1,008 B
TOML

[package]
name = "ash-rewrite"
# TODO: placeholder version for the rewrite
version = "0.999.0+1.3.238"
description = "Vulkan bindings for Rust"
license = "MIT OR Apache-2.0"
repository = "https://github.com/ash-rs/ash"
readme = "../README.md"
keywords = ["gamedev", "graphics", "vulkan", "bindings"]
categories = [
"api-bindings",
"external-ffi-bindings",
"game-development",
"graphics",
"rendering::graphics-api",
]
# TODO: Remove when crate is renamed, this is the default
documentation = "https://docs.rs/ash"
edition = "2021"
# TODO: reevaluate, then update in ci.yml
rust-version = "1.69.0"
[dependencies]
libloading = { version = "0.8", optional = true }
[features]
default = ["loaded", "debug"]
# Link the Vulkan loader at compile time.
linked = []
# Support searching for the Vulkan loader manually at runtime.
loaded = ["libloading"]
# Whether Vulkan structs should implement Debug.
debug = []
[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]