From 688180a1e29783f4772f34f104d9a696d4af6931 Mon Sep 17 00:00:00 2001 From: Sebastian Messmer Date: Fri, 9 Feb 2024 19:37:53 -1000 Subject: [PATCH] Improve README --- README.md | 4 +++- src/lib.rs | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d2bec45..7ead1ac 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,9 @@ Anything that needs inplace zero-copy access to structured binary data. - Convenient and simple macro DSL to define layouts. - Define a fixed endianness in the layout, ensuring cross platform compatibility. - Fully written in safe Rust, no [std::mem::transmute](https://doc.rust-lang.org/std/mem/fn.transmute.html) or similar shenanigans. -- Const generics make sure that all offset calculations happen at compile time and will not have a runtime overhead. +- Const generics ensure that all offset calculations happen at compile time. + This, together with inlining annotations, makes this library zero-overhead. + Using it is just as performant as writing manual slice accesses into your code. - Comprehensive test coverage. ### Why not `#[repr(packed)]`? diff --git a/src/lib.rs b/src/lib.rs index 2b17bf1..ac71bd5 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -56,7 +56,9 @@ //! - Convenient and simple macro DSL to define layouts. //! - Define a fixed endianness in the layout, ensuring cross platform compatibility. //! - Fully written in safe Rust, no [std::mem::transmute](https://doc.rust-lang.org/std/mem/fn.transmute.html) or similar shenanigans. -//! - Const generics make sure that all offset calculations happen at compile time and will not have a runtime overhead. +//! - Const generics ensure that all offset calculations happen at compile time. +//! This, together with inlining annotations, makes this library zero-overhead. +//! Using it is just as performant as writing manual slice accesses into your code. //! - Comprehensive test coverage. //! //! ## Why not `#[repr(packed)]`?