[package] name = "all-is-cubes-gpu" version = "0.8.0" authors.workspace = true edition.workspace = true rust-version.workspace = true description = "Optional GPU rendering implementation for the all-is-cubes crate." # TODO: add homepage = "..." when we have one repository.workspace = true license = "MIT OR Apache-2.0" # TODO: revisit categories once it's more settled how useful this is as an engine categories = ["games", "graphics", "rendering", "rendering::engine"] [package.metadata.docs.rs] all-features = true [lib] # Disable running as benchmark so that the default doesn't interfere with Criterion usage. bench = false # Disable doctest running to reduce total noise in `cargo test` output. # Doctests are so slow, and not well applicable here, so we don't currently have any. doctest = false [[test]] name = "shaders" required-features = ["wgpu"] [[bench]] name = "wgpu" harness = false required-features = ["wgpu"] [features] # Adds support for render info logging to Rerun. rerun = ["all-is-cubes/rerun", "all-is-cubes-mesh/rerun"] # Enable wgpu support. # (The library is useless without this, but we used to have multiple GPU API support # and I don't want to go entirely deleting it quite yet.) wgpu = ["dep:wgpu"] # Adds automatic parallelism to some algorithms. # 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", # this cascade is not mandatory, but almost certainly wanted "all-is-cubes-mesh/auto-threads", "all-is-cubes-render/auto-threads", ] [dependencies] all-is-cubes = { workspace = true, features = ["std"] } all-is-cubes-mesh = { workspace = true } all-is-cubes-render = { workspace = true, features = ["raytracer"] } bytemuck = { workspace = true, features = ["derive"] } cfg-if = { workspace = true } # Used to implement ensure_polled(). Also a `wgpu` dependency already. flume = { workspace = true } futures-channel = { workspace = true, features = ["sink"] } futures-core = { workspace = true } futures-util = { workspace = true, features = [ "async-await", # needed for select! "async-await-macro", # needed for select! "std", # needed for select! "sink" ] } # f16 support for working with floating point textures. half = { workspace = true, features = ["bytemuck"] } itertools = { workspace = true } log = { workspace = true } once_cell = { workspace = true } # Used to implement ensure_polled on non-Wasm targets, and in the `rerun` support. pollster = { workspace = true } rand = { workspace = true } rand_xoshiro = { workspace = true } rayon = { workspace = true, optional = true } resource = "0.5.0" send_wrapper = { workspace = true } wasm-bindgen-futures = { workspace = true } # For initializing tests on web. (This is not a dev-dependency because some of said tests are not in this package.) web-sys = { version = "0.3.67", features = ["OffscreenCanvas"] } web-time = { workspace = true } wgpu = { workspace = true, optional = true } [target.'cfg(target_family = "wasm")'.dependencies] # Used in the `poll` module to implement timeout gloo-timers = { version = "0.3.0", default-features = false, features = ["futures"]} # If we don't set this feature, it will try to access files at run time and fail # since web wasm has no std::fs. resource = { version = "0.5.0", features = ["force-static"] } wgpu = { workspace = true, optional = true } [dev-dependencies] criterion = { workspace = true, features = ["async_tokio"] } # Used in shader tests. TODO: Not really necessary image = { workspace = true } # Used in benchmark scopeguard = { workspace = true } # Using tokio for async test-running. tokio = { workspace = true, features = ["macros", "rt", "rt-multi-thread", "parking_lot", "sync"] } [lints] workspace = true