Skip to content

Commit

Permalink
Add special docs.rs feature to enable all-is-cubes/std.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
kpreid committed Sep 20, 2024
1 parent f711fda commit d0cea82
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
5 changes: 4 additions & 1 deletion all-is-cubes-content/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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 }
Expand Down
5 changes: 4 additions & 1 deletion all-is-cubes-mesh/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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]
Expand Down
3 changes: 3 additions & 0 deletions all-is-cubes-ui/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d0cea82

Please sign in to comment.