doc(lib): hack to remove wgpu dependency on docsrs
This commit is contained in:
parent
f058134944
commit
4259b65ee0
|
@ -17,18 +17,19 @@ librashader-common = { path = "../librashader-common", version = "0.2.0-beta.11"
|
|||
librashader-presets = { path = "../librashader-presets", version = "0.2.0-beta.11" }
|
||||
librashader-preprocess = { path = "../librashader-preprocess", version = "0.2.0-beta.11" }
|
||||
librashader-reflect = { path = "../librashader-reflect", version = "0.2.0-beta.11" }
|
||||
librashader-cache = { path = "../librashader-cache", version = "0.2.0-beta.11" }
|
||||
librashader-runtime = { path = "../librashader-runtime", version = "0.2.0-beta.11" }
|
||||
librashader-runtime-d3d11 = { path = "../librashader-runtime-d3d11", version = "0.2.0-beta.11", optional = true }
|
||||
librashader-runtime-d3d12 = { path = "../librashader-runtime-d3d12", version = "0.2.0-beta.11", optional = true }
|
||||
librashader-runtime-gl = { path = "../librashader-runtime-gl", version = "0.2.0-beta.11", optional = true }
|
||||
librashader-runtime-vk = { path = "../librashader-runtime-vk", version = "0.2.0-beta.11", optional = true }
|
||||
librashader-runtime-wgpu = { path = "../librashader-runtime-wgpu", version = "0.2.0-beta.11", optional = true }
|
||||
librashader-runtime-mtl = { path = "../librashader-runtime-mtl", version = "0.2.0-beta.11", optional = true }
|
||||
|
||||
librashader-cache = { path = "../librashader-cache", version = "0.2.0-beta.11" }
|
||||
|
||||
ash = { version = "0.37", optional = true }
|
||||
|
||||
[target.'cfg(not(all(target_vendor="apple", docsrs)))'.dependencies]
|
||||
wgpu = { version = "0.19", default-features = false, optional = true }
|
||||
librashader-runtime-wgpu = { path = "../librashader-runtime-wgpu", version = "0.2.0-beta.11", optional = true }
|
||||
wgpu-types = { version = "0.19", optional = true }
|
||||
|
||||
[target.'cfg(windows)'.dependencies.windows]
|
||||
|
@ -74,4 +75,5 @@ docsrs = ["librashader-cache/docsrs", "objc2/unstable-docsrs"]
|
|||
|
||||
[package.metadata.docs.rs]
|
||||
targets = ["x86_64-pc-windows-msvc", "x86_64-unknown-linux-gnu", "x86_64-apple-darwin", "aarch64-apple-darwin", "aarch64-apple-ios"]
|
||||
features = [ "librashader-cache/docsrs", "objc2/unstable-docsrs"]
|
||||
features = ["docsrs"]
|
||||
rustc-args = ["--cfg", "docsrs"]
|
||||
|
|
|
@ -295,7 +295,13 @@ pub mod runtime {
|
|||
#[cfg(feature = "runtime-wgpu")]
|
||||
#[doc(cfg(feature = "runtime-wgpu"))]
|
||||
/// Shader runtime for wgpu
|
||||
#[cfg_attr(all(feature = "runtime-wgpu", all(target_vendor = "apple", feature = "docsrs")),
|
||||
doc = "\n\nThe wgpu runtime is available on macOS and iOS, but technical reasons prevent them from rendering on docs.rs.
|
||||
\n\n This is because wgpu on macOS and iOS link to [metal-rs](https://github.com/gfx-rs/metal-rs), which can not build on docs.rs.
|
||||
See [SSheldon/rustc-objc-exception#13](https://github.com/SSheldon/rust-objc-exception/issues/13) for more details.
|
||||
\n\n The wgpu runtime is identical for all supported operating systems, so please refer to documentation from another operating system.")]
|
||||
pub mod wgpu {
|
||||
#[cfg(not(all(target_vendor = "apple", feature = "docsrs")))]
|
||||
pub use librashader_runtime_wgpu::{
|
||||
error,
|
||||
options::{
|
||||
|
|
Loading…
Reference in a new issue