scapegoat
heapless
Our great sponsors
scapegoat | heapless | |
---|---|---|
5 | 4 | |
236 | 1,369 | |
- | 4.1% | |
0.0 | 8.8 | |
about 2 years ago | 16 days ago | |
Rust | Rust | |
MIT License | 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.
scapegoat
-
10-12x smaller executable footprint than `std::collections::BTreeMap` - accurate?
Agreed, switching to tinyvec (2.X, breaking) and per-instance storage size (1.X, non-breaking) are currently open issues.
This crate is #[forbid(unsafe_code)]. A future version will also have all dependencies be #[forbid(unsafe_code)]. Safety bugs in the standard library may or may not be found in the future (there have been CVEs in the past).
Tried to evaluate memory footprint, in terms of executable code bytes stored in the .text section, please see the writeup here.
Woah that made a huge difference! Thanks for taking the time to try that out and type it up. Was able to retrace your steps and get the same 8.4KB result. I've updated the writeup again.
heapless
-
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
What are some alternatives?
tinyvec - Just, really the littlest Vec you could need. So smol.
blisp - A statically typed Lisp like scripting programming language for Rust.
utils - Utility crates used in RustCrypto
regex-automata - A low level regular expression library that uses deterministic finite automata.
cassette - A simple, single-future, non-blocking executor intended for building state machines. Designed to be no-std and embedded friendly.
biscuit - Biscuit research OS
uom - Units of measurement -- type-safe zero-cost dimensional analysis
trycmd - Snapshot testing for a herd of CLI tests
KEEP - Kotlin Evolution and Enhancement Process
jnode - Code for the JNode operating system
min-sized-rust - 🦀 How to minimize Rust binary size 📦
sx127x_lora - A platform-agnostic driver for Semtech SX1276/77/78/79 based boards.