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]] [[package]]
name = "spirv-to-dxil" name = "spirv-to-dxil"
version = "0.1.1-beta.3" version = "0.2.1"
dependencies = [ dependencies = [
"bitflags", "bitflags",
"bytemuck", "bytemuck",
@ -216,7 +216,7 @@ dependencies = [
[[package]] [[package]]
name = "spirv-to-dxil-sys" name = "spirv-to-dxil-sys"
version = "0.1.1-beta.3" version = "0.2.2"
dependencies = [ dependencies = [
"bindgen", "bindgen",
"cmake", "cmake",

View file

@ -1,6 +1,6 @@
[package] [package]
name = "spirv-to-dxil" name = "spirv-to-dxil"
version = "0.2.1" version = "0.2.2"
edition = "2021" edition = "2021"
description = "Rust bindings to spirv-to-dxil" description = "Rust bindings to spirv-to-dxil"
license = "MIT" license = "MIT"
@ -13,5 +13,12 @@ readme = "../README.md"
spirv-to-dxil-sys = { version = "0.2.0", path = "../spirv-to-dxil-sys" } spirv-to-dxil-sys = { version = "0.2.0", path = "../spirv-to-dxil-sys" }
bitflags = "1.3.2" bitflags = "1.3.2"
[features]
included-bindings = ["spirv-to-dxil-sys/included-bindings"]
[dev-dependencies] [dev-dependencies]
bytemuck = "1.13.0" 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 { pub(crate) fn new(raw: spirv_to_dxil_sys::dxil_spirv_object) -> Self {
Self { inner: raw } Self { inner: raw }
} }
pub fn requires_runtime_data(&self) -> bool {
self.inner.metadata.requires_runtime_data
}
} }
impl Deref for DxilObject { impl Deref for DxilObject {