From d0cea82b7542f810a43ea22cf7e2d50fc43a90be Mon Sep 17 00:00:00 2001 From: Kevin Reid Date: Thu, 19 Sep 2024 18:13:10 -0700 Subject: [PATCH] Add special docs.rs feature to enable all-is-cubes/std. Without this, `all_is_cubes_mesh::dynamic::MeshJobQueue` is documented as `!Send` when it ought to be conditionally `Send`. The crates that need this extra feature are crates that don't already enable all-is-cubes/std through any feature at all. all-is-cubes-mesh Is the only one that actually meets that condition, but all-is-cubes-content only depends indirectly in a way that I want to remove, so I added the feature there too. Also added an empty metadata section to all-is-cubes-ui, to remind myself to fill it out as needed in the future. --- all-is-cubes-content/Cargo.toml | 5 ++++- all-is-cubes-mesh/Cargo.toml | 5 ++++- all-is-cubes-ui/Cargo.toml | 3 +++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/all-is-cubes-content/Cargo.toml b/all-is-cubes-content/Cargo.toml index 9d2164fb3..4acb7df97 100644 --- a/all-is-cubes-content/Cargo.toml +++ b/all-is-cubes-content/Cargo.toml @@ -12,7 +12,7 @@ categories = ["games"] keywords = ["all-is-cubes"] [package.metadata.docs.rs] -features = ["arbitrary"] +features = ["_full-documentation"] [lib] # Disable running as benchmark so that the default doesn't interfere with Criterion usage. @@ -25,6 +25,9 @@ harness = false [features] # Adds `UniverseTemplate::Random`. arbitrary = ["dep:arbitrary", "all-is-cubes/arbitrary"] +# Internal use only. Used to ensure that docs.rs builds have complete information; +# in particular, `all-is-cubes/std` would otherwise be missing, making types appear `!Sync`. +_full-documentation = ["all-is-cubes/std", "arbitrary"] [dependencies] all-is-cubes = { workspace = true } diff --git a/all-is-cubes-mesh/Cargo.toml b/all-is-cubes-mesh/Cargo.toml index 458705df5..3ac16e481 100644 --- a/all-is-cubes-mesh/Cargo.toml +++ b/all-is-cubes-mesh/Cargo.toml @@ -12,7 +12,7 @@ categories = ["games", "graphics", "rendering"] keywords = ["all-is-cubes", "voxel", "mesh"] [package.metadata.docs.rs] -features = [] +features = ["_full-documentation"] [lib] # Disable running as benchmark so that the default doesn't interfere with Criterion usage. @@ -39,6 +39,9 @@ arbitrary = ["dep:arbitrary", "all-is-cubes/arbitrary", "ordered-float/arbitrary # If disabled, `std::thread` is never used. # If enabled, threads may be created and the active `rayon` thread pool may be used. auto-threads = ["dep:rayon"] +# Internal use only. Used to ensure that docs.rs builds have complete information; +# in particular, `all-is-cubes/std` would otherwise be missing, making types appear `!Sync`. +_full-documentation = ["all-is-cubes/std", "arbitrary"] [dependencies] diff --git a/all-is-cubes-ui/Cargo.toml b/all-is-cubes-ui/Cargo.toml index 3c51e3ead..ed818496c 100644 --- a/all-is-cubes-ui/Cargo.toml +++ b/all-is-cubes-ui/Cargo.toml @@ -11,6 +11,9 @@ license = "MIT OR Apache-2.0" categories = ["games", "gui"] keywords = ["all-is-cubes", "voxel"] +[package.metadata.docs.rs] +features = [] + [lib] # Disable running as benchmark so that the default doesn't interfere with Criterion usage. bench = false