Skip to content

Commit 50a0849

Browse files
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 Lokathor/tinyvec#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>
1 parent d12b0e5 commit 50a0849

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rsvg/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ regex = "1.7.1"
7575
rgb = { version="0.8", features=["argb"] }
7676
selectors = "0.24.0"
7777
string_cache = "0.8.0"
78-
tinyvec = { version = "1.2.0", features = ["alloc"] }
78+
tinyvec = { version = "1.2.0", features = ["alloc", "rustc_1_55"] }
7979
url = "2"
8080
xml5ever = "0.17.0"
8181
yeslogic-fontconfig-sys = { version = "4.0.1", optional = true }

0 commit comments

Comments
 (0)