utils
Utility crates used in RustCrypto (by RustCrypto)
compact_str
A memory efficient string type that can store up to 24* bytes on the stack (by ParkMyCar)
utils | compact_str | |
---|---|---|
8 | 16 | |
404 | 541 | |
2.5% | - | |
8.9 | 7.6 | |
12 days ago | 7 days ago | |
Rust | Rust | |
- | MIT License |
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
compact_str
Posts with mentions or reviews of compact_str.
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
Not that I know of! As part of compact_str v0.6 we tried to make the API of CompactString 1:1 with String, inevitably we missed a few (1, 2, 3) things but they were fixed in this latest release.
... and more! Please see the CHANGELOG for more detail
-
Is there a type like `std::num::NonZero*` but for other values than zero?
(See the compact_str implementation as an example.)
-
Announcing `compact_str` version 0.6! A small string optimization for Rust
Along with performance improvements, this release includes implementing multiple methods for CompactString, to bring its API nearly 1:1 with String. The only exception being methods that don't have a direct port for a small string optimization, e.g. into_bytes, or methods that aren't yet stable. A full change log can be found here.
- What is Box and how is it different from String in Rust?
-
Announcing `compact_str` version 0.5! A small string optimization for Rust
Doing this has been on the back of my mind for a while, just filed an issue to track this! #119
-
Announcing `compact_str` version 0.4! A small string optimization for Rust
There's a draft pr for this.
-
Why is it so hard to get traction learning rust?
Here're a few projects I considered interesting (including my own project) and relatively easy to participate: - pushgen Push-style design pattern for processing of ranges and data-streams. - compact_str A memory efficient immutable string type that can store up to 24* bytes on the stack - openssh-rs Scriptable SSH through OpenSSH in Rust - pegasus A multi-node parametrized command runner with a focus on simplicity - concurrent_arena Container that can have elements insert/removed concurrently and uses a 'u32' as key.
-
Inlined string (in ~200 LOC)
I wrote something similar to compact_str, but it is: - a Box when on the heap - (so clone is O(n)) - (but still immutable) - 2 usizes in size
-
Is there any other programming language aside from C++ that has move semantics feature available?
Here you go: https://github.com/ParkMyCar/compact_str
What are some alternatives?
When comparing utils and compact_str you can also consider the following projects:
reference - The Rust Reference
smartstring - Compact inlined strings for Rust.
sudo_pair - Plugin for sudo that requires another human to approve and monitor privileged sudo sessions
DIPs - D Improvement Proposals
block-ciphers - Collection of block cipher algorithms written in pure Rust
smol_str
heapless - Heapless, `static` friendly data structures
openssh - Scriptable SSH through OpenSSH in Rust
rust-crypto - A (mostly) pure-Rust implementation of various cryptographic algorithms.
zero-copy-pads - Padding/aligning values without heap allocation
tinyvec - Just, really the littlest Vec you could need. So smol.
rust - Empowering everyone to build reliable and efficient software.