Prototype use of zerocopy crate in zerovec #2798
Labels
C-zerovec
Component: Yoke, ZeroVec, DataBake
help wanted
Issue needs an assignee
S-medium
Size: Less than a week (larger bug fix or enhancement)
T-task
Type: Tracking thread for a non-code task
Milestone
Some of the operations in the
zerovec
crate, especially those involvingULE
, could be modeled with abstractions in thezerocopy
crate. Parts of thezerocopy
crate are being proposed to the standard library in Safe Transmute. It would be good to see how much unsafe code could be eliminated inzerovec
by addingzerocopy
as a dependency, so that we can influence the Safe Transmute RFC and prepare longer-term forzerovec
sitting on top of those operations.The biggest catch is that
zerocopy
doesn't currently support fallible conversions, which is quite fundamental to howULE
works. This could be partly resolved by a private infallible conversion function invoked from a custom public fallible function, butzerocopy
also does not currently support private conversion functions. @joshlf said in an email:We'd also like
const
conversions; we have them in some places, but not everywhere. I would love to see a generalized const conversion API so that we can make a properzeroslice!
macro as proposed in #1935.CC @joshlf @ezrosent
The text was updated successfully, but these errors were encountered: