
Security News
Feross on the 10 Minutes or Less Podcast: Nobody Reads the Code
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.
A 100% safe crate of vec-like types.
Not just safe at the public API boundary, fully safe for all internal code too: #![forbid(unsafe_code)]
The provided types are as follows:
ArrayVec is an array-backed vec-like data structure. It panics on overflow.SliceVec is similar, but using a &mut [T] as the data backing.TinyVec (alloc feature) is an enum that's either an Inline(ArrayVec) or a Heap(Vec).
If a TinyVec is Inline and would overflow its array it automatically transitions to Heap and continues whatever it was doing.To attain this "100% safe code" status there is one compromise: the element type of the vecs must implement Default.
For more API details, please see the docs.rs documentation
tinyvec Alternatives?Maybe you don't want to use tinyvec, there's other crates you might use instead!
The main difference is that both of those crates use unsafe code.
This mostly allows them to get rid of the Default limitation for elements that tinyvec imposes.
The smallvec and arrayvec crates are generally correct, but there's been occasional bugs leading to UB.
With tinyvec, any uncaught bugs can't lead to UB, because the crate is safe code all the way through.
If you want that absolute level of assurance against UB, use tinyvec.
FAQs
Unknown package
We found that tinyvec demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.

Research
/Security News
Campaign of 108 extensions harvests identities, steals sessions, and adds backdoors to browsers, all tied to the same C2 infrastructure.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.