diff --git a/CHANGELOG.md b/CHANGELOG.md index 81f913e..b0b8537 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ - Fix bug that meant URLs in SVG `` elements were resolved relative to the current working directory, not to the SVG itself (see [#60](https://github.com/flother/spreet/issues/60)) - Update [resvg](https://crates.io/crates/resvg) dependency to v0.35 - Update [clap](https://crates.io/crates/clap) dependency to v4.4 -- Update [Rayon](https://crates.io/crates/rayon) dependency to v1.8 +- Remove [Rayon](https://crates.io/crates/rayon) dependency. This means the Spreet CLI no longer parses SVGs in parallel, but that was a fun-but-unnecessary optimisation in the first place that generally saved only a handful of milliseconds Because of the change to Rayon, Spreet's minimum Rust version is now 1.63.0 (released August 2022). diff --git a/Cargo.lock b/Cargo.lock index 797a804..ee7dcc1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1028,7 +1028,6 @@ dependencies = [ "oxipng", "png", "predicates", - "rayon", "resvg", "serde", "serde_json", diff --git a/Cargo.toml b/Cargo.toml index b3c6d63..beafdb0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,7 @@ categories = ["command-line-utilities", "encoding", "filesystem", "graphics"] [features] default = ["cli"] -cli = ["dep:clap", "dep:exitcode", "dep:rayon"] +cli = ["dep:clap", "dep:exitcode"] [dependencies] clap = { version = "4.4", features = ["derive"], optional = true } @@ -22,7 +22,6 @@ exitcode = { version = "1.1", optional = true } multimap = "0.9" oxipng = { version = "8.0", features = ["parallel", "zopfli", "filetime"], default-features = false } png = "0.17" -rayon = { version = "1.8", optional = true } resvg = "0.35" serde = { version = "1", features = ["derive"] } serde_json = "1" diff --git a/README.md b/README.md index 50df295..d140e99 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Compared to other tools for creating spritesheets from SVGs, Spreet: - outputs smaller spritesheets (both fewer pixels and fewer bytes) - is a self-contained ~2.2 MB binary -- is faster (multi-threaded) +- is faster _Spreet_ (also _spreit_, _spret_, _sprit_) is the [Scots](https://en.wikipedia.org/wiki/Scots_language) word for a sprite, the fairy-like creature from Western folklore. diff --git a/src/bin/spreet/main.rs b/src/bin/spreet/main.rs index 734987f..d776eed 100644 --- a/src/bin/spreet/main.rs +++ b/src/bin/spreet/main.rs @@ -1,7 +1,6 @@ use std::collections::BTreeMap; use clap::Parser; -// use rayon::prelude::*; use spreet::fs::{get_svg_input_paths, load_svg}; use spreet::sprite; @@ -21,7 +20,6 @@ fn main() { // bitmapped SVGs will be added to the spritesheet, and the keys will be used as the unique // sprite ids in the JSON index file. let sprites = get_svg_input_paths(&args.input, args.recursive) - // .par_iter() .iter() .map(|svg_path| { if let Ok(svg) = load_svg(svg_path) {