rs: fix docs.rs and add runtime-data

This commit is contained in:
chyyran 2023-02-04 18:39:22 -05:00
parent 3252599d3c
commit 1a5625d57a
3 changed files with 14 additions and 3 deletions

4
Cargo.lock generated
View file

@ -207,7 +207,7 @@ checksum = "43b2853a4d09f215c24cc5489c992ce46052d359b5109343cbafbf26bc62f8a3"
[[package]]
name = "spirv-to-dxil"
version = "0.1.1-beta.3"
version = "0.2.1"
dependencies = [
"bitflags",
"bytemuck",
@ -216,7 +216,7 @@ dependencies = [
[[package]]
name = "spirv-to-dxil-sys"
version = "0.1.1-beta.3"
version = "0.2.2"
dependencies = [
"bindgen",
"cmake",

View file

@ -1,6 +1,6 @@
[package]
name = "spirv-to-dxil"
version = "0.2.1"
version = "0.2.2"
edition = "2021"
description = "Rust bindings to spirv-to-dxil"
license = "MIT"
@ -13,5 +13,12 @@ readme = "../README.md"
spirv-to-dxil-sys = { version = "0.2.0", path = "../spirv-to-dxil-sys" }
bitflags = "1.3.2"
[features]
included-bindings = ["spirv-to-dxil-sys/included-bindings"]
[dev-dependencies]
bytemuck = "1.13.0"
[package.metadata.docs.rs]
targets = []
features = ["included-bindings"]

View file

@ -20,6 +20,10 @@ impl DxilObject {
pub(crate) fn new(raw: spirv_to_dxil_sys::dxil_spirv_object) -> Self {
Self { inner: raw }
}
pub fn requires_runtime_data(&self) -> bool {
self.inner.metadata.requires_runtime_data
}
}
impl Deref for DxilObject {