heapless
tinyvec
Our great sponsors
heapless | tinyvec | |
---|---|---|
4 | 4 | |
1,387 | 604 | |
2.9% | - | |
8.7 | 4.4 | |
24 days ago | about 1 month ago | |
Rust | Rust | |
Apache License 2.0 | Apache License 2.0 |
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.
heapless
- """may_dangle""" stabilization
-
Rust: A Critical Retrospective
> we did not have Vec because we were no-std + stable so we literally had to use arrays
It's true that Vec isn't available in a no-std context, but don't think it follows that arrays are the only other option - see heapless for one example: https://github.com/japaric/heapless
I also agree with some of the ancestors: the post seems to say that the Rust language couldn't handle arrays with more than 32 elements, and (as someone who's written a fair bit of no-std Rust before const generic) that doesn't seem right. At first, this did seem awkward to me as well, but in practice I haven't found it to be a significant limitation. Was there a particular scenario where it wasn't feasible to wrap a >32 element array in your own type and implement Default on 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?
It's happening
-
Writing a proposal to use Rust at work
heapless has both SPSC and MPMC channels that work on embedded
tinyvec
-
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?
blisp - A statically typed Lisp like scripting programming language for Rust.
trantor - a non-blocking I/O tcp network lib based on c++14/17
scapegoat - Safe, fallible, embedded-friendly ordered set/map via a scapegoat tree. Validated against BTreeSet/BTreeMap.
storages-api
utils - Utility crates used in RustCrypto
regex-automata - A low level regular expression library that uses deterministic finite automata.
totally-safe-transmute
cassette - A simple, single-future, non-blocking executor intended for building state machines. Designed to be no-std and embedded friendly.
tyrade - A pure functional language for type-level programming in Rust
biscuit - Biscuit research OS
serde - Serialization framework for Rust