diff mbox series

[bug#70685,03/30] gnu: Add rust-binary-layout-2.

Message ID 979db614e19fdf1d30427a7e0c146ea10fa6c258.1714515573.git.w@wmeyer.eu
State New
Headers show
Series Add rust-osm-io. | expand

Commit Message

Wilko Meyer April 30, 2024, 10:27 p.m. UTC
* gnu/packages/crates-io.scm (rust-binary-layout-2): New variable.

Change-Id: I316251bc9f973b27d6ef484f0d76e5bb339bae43
---
 gnu/packages/crates-io.scm | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
diff mbox series

Patch

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index d0ba421dd4..b6b8912b11 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -6124,6 +6124,32 @@  (define-public rust-bigdecimal-0.1
         #:cargo-development-inputs
         (("rust-serde-json" ,rust-serde-json-1))))))
 
+(define-public rust-binary-layout-2
+  (package
+    (name "rust-binary-layout")
+    (version "2.1.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (crate-uri "binary-layout" version))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32 "01csg7ikzik767m7i38ankihs6cnd22449krc2ingw86vg5ppyq9"))))
+    (build-system cargo-build-system)
+    (arguments
+     `(#:cargo-inputs (("rust-doc-comment" ,rust-doc-comment-0.3)
+                       ("rust-paste" ,rust-paste-1))))
+    (home-page "https://github.com/smessmer/binary-layout")
+    (synopsis
+     "Type-safe, inplace, zero-copy access to structured binary data")
+    (description
+     "The binary-layout library allows type-safe, inplace, zero-copy access to
+structured binary data.  You define a custom data layout and give it a slice of
+binary data, and it will allow you to read and write the fields defined in the
+layout from the binary data without having to copy any of the data.  It's
+similar to transmuting to/from a `#[repr(packed)]` struct, but much safer.")
+    (license (list license:expat license:asl2.0))))
+
 (define-public rust-binascii-0.1
   (package
     (name "rust-binascii")