* gnu/packages/rust.scm (rust-fnv): New variable. --- gnu/packages/rust.scm | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+)
diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm index 047f6d21e..6f02eb7ca 100644 --- a/gnu/packages/rust.scm +++ b/gnu/packages/rust.scm @@ -1170,3 +1170,29 @@ clippy's procedural macro checks.") Unicode strings, including Canonical and Compatible Decomposition and Recomposition, as described in Unicode Standard Annex #15.") (license (list license:expat license:asl2.0)))) + +(define-public rust-fnv + (package + (name "rust-fnv") + (version "1.0.5") + (source + (origin + (method url-fetch) + (uri (crate-uri "fnv" version)) + (file-name + (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "0i73zsc7q1hapamwfv793k3xhan11jb9ylkgypx88a0y5y289i3c")))) + (build-system cargo-build-system) + (home-page "https://github.com/servo/rust-fnv") + (synopsis "Implementation of the Fowler–Noll–Vo hash function") + (description + "The FNV hash function is a custom Hasher implementation that is +more efficient for smaller hash keys. + +The Rust FAQ states that while the default Hasher implementation, +SipHash, is good in many cases, it is notably slower than other +algorithms with short keys, such as when you have a map of integers to +other values. In cases like these, FNV is demonstrably faster.") + (license (list license:expat license:asl2.0)))) -- 2.11.0