summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@gnome.org>2023-04-20 13:03:03 -0600
committerFederico Mena Quintero <federico@gnome.org>2023-04-20 13:49:19 -0600
commit50a0849e045dda0bf5ca8e2192827ad0a5b9a035 (patch)
tree4e795ed2299770d8cf200eb063def12775717cb7
parentd12b0e50007212b9dcb2c7f18aad002b2ad3d4bc (diff)
downloadlibrsvg-50a0849e045dda0bf5ca8e2192827ad0a5b9a035.tar.gz
Use tinyvec's rustc_1_55 feature to reduce compilation time
While casually reading https://hackmd.io/mxdn4U58Su-UQXwzOHpHag (Analysis of rustc-benchmarking-data), I noticed that it mentions https://github.com/Lokathor/tinyvec/issues/161. The tinyvec crate, with the default set of features, can compile on rustc < 1.55 by using large implementations of Default for [T; N]. On Rustc >= 1.55, it can elide this code and just use const generics. Apparently this reduces compilation time for tinyvec by about half - which is not a lot in the context of librsvg, but let's make use of that. Librsvg currently requires Rust >= 1.64.0 anyway, so we can make use of tinyvec's rustc_1_55 feature. Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/822>
-rw-r--r--rsvg/Cargo.toml2
1 files changed, 1 insertions, 1 deletions
diff --git a/rsvg/Cargo.toml b/rsvg/Cargo.toml
index b01e12a4..d78e0efd 100644
--- a/rsvg/Cargo.toml
+++ b/rsvg/Cargo.toml
@@ -75,7 +75,7 @@ regex = "1.7.1"
rgb = { version="0.8", features=["argb"] }
selectors = "0.24.0"
string_cache = "0.8.0"
-tinyvec = { version = "1.2.0", features = ["alloc"] }
+tinyvec = { version = "1.2.0", features = ["alloc", "rustc_1_55"] }
url = "2"
xml5ever = "0.17.0"
yeslogic-fontconfig-sys = { version = "4.0.1", optional = true }