Skip to content

Commit

Permalink
Disable wgpu-core documentation as a workaround for gfx-rs#4905 (gfx-…
Browse files Browse the repository at this point in the history
…rs#5987)

This enables `cargo doc` to succeed in a reasonable amount of time,
as long as the reader isn't looking for documentation for `wgpu-core`
itself.

(cherry picked from commit b5934e8)

# Conflicts:
#	CHANGELOG.md
  • Loading branch information
kpreid authored and cwfitzgerald committed Jul 31, 2024
1 parent a1c5e09 commit f5003d4
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ Bottom level categories:
- Fix crash when dropping the surface after the device. By @wumpf in [#6052](https://github.com/gfx-rs/wgpu/pull/6052)
- Fix length of copy in `queue_write_texture`. By @teoxoy in [#6009](https://github.com/gfx-rs/wgpu/pull/6009)
- Fix error message that is thrown in create_render_pass to no longer say `compute_pass`. By @matthew-wong1 [#6041](https://github.com/gfx-rs/wgpu/pull/6041)
- As a workaround for [issue #4905](https://github.com/gfx-rs/wgpu/issues/4905), `wgpu-core` is undocumented unless `--cfg wgpu_core_doc` feature is enabled. By @kpreid in [#5987](https://github.com/gfx-rs/wgpu/pull/5987)

## 22.0.0 (2024-07-17)

Expand Down
14 changes: 14 additions & 0 deletions wgpu-core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,20 @@
//! It is designed for integration into browsers, as well as wrapping
//! into other language-specific user-friendly libraries.
//!
#![cfg_attr(
not(any(not(doc), wgpu_core_doc)),
doc = r#"\
## Documentation hidden
As a workaround for [an issue in rustdoc](https://github.com/rust-lang/rust/issues/114891)
that [affects `wgpu-core` documentation builds \
severely](https://github.com/gfx-rs/wgpu/issues/4905),
the documentation for `wgpu-core` is empty unless built with
`RUSTFLAGS="--cfg wgpu_core_doc"`, which may take a very long time.
"#
)]
#![cfg(any(not(doc), wgpu_core_doc))]
//!
//! ## Feature flags
#![doc = document_features::document_features!()]
//!
Expand Down

0 comments on commit f5003d4

Please sign in to comment.