mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-30 18:27:00 +01:00
rayon becomes an optional dependency behind a new parallel feature, off by default, as in craft-texture, craft-dds and craft-jpeg. The default build is serial, uses no rayon and builds for wasm32-unknown-unknown. The craft facade forwards it as raster3d-parallel. - With parallel, bands of rows, resolved rows, encoded pixels and shadow maps run on several threads with rayon, as before. Without it, the same per-item code runs in order on one thread, through small helpers in lib.rs. Both stop at the first error. - Outputs are the same either way. When several bands or shadow maps fail, the serial build returns the first one's error and the threaded build the error of one of them, and the needed count of TooMuchWork can differ. - Targets, images, shadow maps and the working buffers that grow with the raster or the vertex or triangle count are reserved fallibly, and a failed reservation returns the new RenderError::OutOfMemory. - rayon is added as a dev-dependency. The differential tests in tests/it/reference/effectcraft use it. - CI's default-feature test pass also runs craft-raster3d, so the serial build is tested. - The README and the crate docs describe the feature.