diff mbox series

[bug#73896,v4,07/20] gnu: Add rust-hamming-0.1.

Message ID 20241105231519.22378-7-ngraves@ngraves.fr
State New
Headers show
Series [bug#73896,v4,01/20] gnu: rust-widestring-0.4: Update to 0.4.3. | expand

Commit Message

Nicolas Graves Nov. 5, 2024, 11:14 p.m. UTC
* gnu/packages/crates-io.scm (rust-hamming-0.1): New variable.
---
 gnu/packages/crates-io.scm | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)
diff mbox series

Patch

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index e7124b088d..e551600dc7 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -31388,6 +31388,30 @@  (define-public rust-hamcrest2-0.3
      "This package provides a port of the Hamcrest testing library.")
     (license (list license:expat license:asl2.0))))
 
+(define-public rust-hamming-0.1
+  (package
+    (name "rust-hamming")
+    (version "0.1.3")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (crate-uri "hamming" version))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32 "1q9hri1l1x1y7vv153kvdw9lkqslmbwgia5r3qj6i39pfji3s135"))))
+    (build-system cargo-build-system)
+    (arguments
+     `(#:cargo-development-inputs
+       (("rust-quickcheck" ,rust-quickcheck-0.2)
+        ("rust-rand" ,rust-rand-0.3))))
+    (home-page "https://github.com/huonw/hamming")
+    (synopsis "Count ones fast")
+    (description
+     "This package provides a tool to count ones, using rapid popcount
+(hamming weight) techniques.  This provides a performant popcount and bitwise
+hamming distance for a slice of bytes.")
+    (license (list license:expat license:asl2.0))))
+
 (define-public rust-hash-hasher-2
   (package
     (name "rust-hash-hasher")