"I don't quite know how to put this, but our entire field is bad at what we do, and if you rely on us, everyone will die." Fuchsia Security. Adjunct prof @ USF.
My #rustconf24 talk, Safety in an Unsafe World, is now available! I argue that we can move Rust beyond memory safety to guarantee freedom from *any* class of bugs.
[This is a re-post of my original tweet; the video's fixed to remove hard-coded subtitles]
https://t.co/PKN935jZp6
Zerocopy can’t support IntoBytes on a surprising set of types today for this reason. Unsupported types you may not have known about:
- Most DSTs
- Unions whose fields are of different lengths*
- Many generic struct types
*adds implicit trailing padding after some fields
Would anyone use this @rustlang attribute?
#[repr(padded)]
All padding bytes guaranteed initialized (represented as u8).
Would permit T: zerocopy::IntoBytes for any struct or union type - even those with padding.
The Hanseatic League was a coalition of merchant cities that grew to dominate trade in Europe and even fought and won wars.
The League's rise and fall is a story of building and holding together a coalition, and of how technology shapes war & economics.
https://t.co/mzsBvVvt3f
@mitsuhiko Context: I work on the Fuchsia Security team, where ~50% of our Rust code is from third-party https://t.co/9XfOAcvD1r deps. Part of my job is to improve the soundness of that code by reducing instances of `unsafe`. This doesn't all involve zerocopy; eg: https://t.co/FPuK2TT6Oa
It would have been much worse if the data showed that most breakage is "long tail" problems.
We would have needed hundreds of lints to make even a dent in the problem!
Find more data and examples in my #rustconf24 talk:
https://t.co/kpuP9zj3gW
@tenellous@ManishEarth@pcwalton Unless I'm missing something, the impl of `Hash for [u8]` bottoms out generically in `Hash for u8` via https://t.co/2DBdDURMhl
So I'd expect optimizations would be helpful relative to that naive implementation.
@burntsushi5@tenellous@Lokathor@dj_d_sol@jswrenn But I think the diversity is important in itself. Both of us have taken inspiration from each other at points (eg we had a custom derive first, while bytemuck had fallible conversions first, just to name two examples). I suspect this will continue.
@burntsushi5@tenellous@Lokathor@dj_d_sol@jswrenn Mostly I think the differences are around stability (bytemuck at 1.0 and w/ a very low MSRV, while zerocopy releases breaking changes) and API design tradeoffs (bytemuck prioritizes simple, panicking APIs, while zerocopy returns rich error types that the caller must handle).
Announcing a pre-release of zerocopy 0.8! Please kick the tires and give us feedback! 0.8 is chock-full of new features, so there’s fun for the whole family.
https://t.co/vLywI4lukJ
@aevavoom @nikomatsakis @me_diru@adam_chal@nick_r_cameron 🥽 Excited to have Jack Wrenn, Applied Scientist at AWS, presenting at #rustconf 2024!
Join us for "Safety Goggles for Alchemists" as Jack unveils Rust's journey towards transmutation safety.
@aevavoom @nikomatsakis @me_diru 🔐 Delve into the realm of safety with Google software engineer Joshua Liebow-Feeser at #rustconf 2024!
Join us for his session on "Safety in an Unsafe World"
Happy to announce that I'll be speaking at @rustconf 2024 about pushing the boundaries of safety and security in safety-critical domains; hope to see you there!