utils
Utility crates used in RustCrypto (by RustCrypto)
tinyvec
Just, really the littlest Vec you could need. So smol. (by Lokathor)
utils | tinyvec | |
---|---|---|
8 | 4 | |
404 | 605 | |
2.5% | - | |
8.9 | 4.4 | |
11 days ago | about 2 months ago | |
Rust | Rust | |
- | Apache License 2.0 |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
utils
Posts with mentions or reviews of utils.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-02-22.
-
Announcing `compact_str` version 0.7! A small string optimization for Rust
I didn't use any inline asm, instead I wrote the simplest if statement possible, which I confirmed on x86_64, x86, and aarch64 compiles down to use the platform's supported conditional move instructions. If this changes in the future and there's a need to write inline asm, you can do so in a portable way, e.g. the cmov crate.
-
Shoot me straight.
There's also cpufeatures which might suit your use case better (depending on exactly how you want to do it).
-
Crate for AES256 - which one to choose? Questions about block cipher modes and AEAD too.
I have seen that RustCrypto also offers a create for securely zeroing memory with: zeroize
-
`kindly`: a simplistic (and hopefully educational) implementation of a set-user-ID-root program (think mini `sudo`) for Linux
The zeroing routine itself looks fine to me. You might want to compare your code with the (already mentioned) zeroize crate, which does something similar (or maybe identical?).
-
Maybe found a Y2k bug in the rust-crypto DER-encoding util?
To save a few clicks, this was found to be, indeed, a Y2K issue, and der v0.4.1 has just been released to fix it. Citing the comment added to the issue after the fact:
-
Incredibly fast UTF-8 validation
I opened a tracking issue for that.
-
Now that the long-awaited const generics (MVP) have come to stable in 1.51, what crates are going to gain the most from it?
https://github.com/RustCrypto/utils/pull/325#issuecomment-791503136
tinyvec
Posts with mentions or reviews of tinyvec.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2022-05-01.
-
The Better Alternative to Lifetime GATs
funny indeed. i changed all my projects to use tinyvec
-
"pure safe crates"
I've seen the cost of zeroing memory be measurable, or maybe significant enough to care about, but I've never seen 90% of cycles spent on it, the only case I know of that gets close is creating an empty TinyVec versus an empty SmallVec with an inline buffer of 256 bytes. In my opinion that's an unreasonably large inline buffer. At inline buffers of 128 bytes and below, the overhead is less than 50%, and that's on a microbenchmark of the Default impl; the effect is rapidly diluted in a real program.
-
single-producer single-consumer concurrent queue
My point is that "implementation that doesn't use unsafe" is not necessarily always slower than "implementation that does use unsafe". Often people assume that this is the case, and it isn't. tinyvec currently beats smallvec in more than a few benchmarks. Not all, but some. And this sometimes visible to users. The point is that if you want speed, you don't necessarily need to give up any safety at all. Most differences in performance are due to the amount of effort or expertise that has been spent on the codebase, not the amount of unsafe in it.
-
Now that the long-awaited const generics (MVP) have come to stable in 1.51, what crates are going to gain the most from it?
https://github.com/Lokathor/tinyvec will definitely benefit, although not as much as something currently relying on typenum.
What are some alternatives?
When comparing utils and tinyvec you can also consider the following projects:
reference - The Rust Reference
heapless - Heapless, `static` friendly data structures
sudo_pair - Plugin for sudo that requires another human to approve and monitor privileged sudo sessions
trantor - a non-blocking I/O tcp network lib based on c++14/17
block-ciphers - Collection of block cipher algorithms written in pure Rust
storages-api
totally-safe-transmute
rust-crypto - A (mostly) pure-Rust implementation of various cryptographic algorithms.
tyrade - A pure functional language for type-level programming in Rust
RustCrypto - Authenticated Encryption with Associated Data Algorithms: high-level encryption ciphers
serde - Serialization framework for Rust