automata: remove some unsafe code#1189
Conversation
|
I was aware of zerocopy (and similar crates) when I wrote this code, and knew that it could probably eliminate some The way to get rid of these unsafe blocks is to push on the "safe transmute" effort I think. |
|
Yeah no worries, I understand the desire to avoid dependencies. We do the same. Happy to just close this if you'd prefer. As for safe transmute, IIUC (@jswrenn is more directly involved and can provide more context), the idea is that safe transmute will basically just enable a trait bound, and you'll still need library code to provide useful abstractions given that bound. Roughly, safe transmute will replace zerocopy-derive, but not zerocopy (and presumably the same for bytemuck/bytemuck-derive, etc), and code like this PR would still require zerocopy in order to avoid writing |
|
Aye. Understood. Thanks for the attempt! I do overall support trying to remove |
Note that the changes in
wire.rsrequire zerocopy's "derive" feature, but the changes inaccel.rsdo not. If you'd prefer not to take a dependency on a proc macro derive, we can still salvage some of this PR.