Hey all,
Boris is doing some compositor animation work, and part of that work
involves sending some style system Rust types through IPC.
Some of them are projected to be changed substantially in the near
future, so I suggested to use derive + Serde instead of rolling our own
serialization code from C++.
Boris' patch looks like this:
*
https://phabricator.services.mozilla.com/D50688
There's some comments I've left (we should probably not be using
serde_json, but bincode probably, and we should not assume
deserialization will succeed, that kind of stuff...)
But then I realized that WebRender already needs to solve basically the
same problem. Is there some prior art that we could reuse to not roll
our own stuff?
Does the current approach to implement ParamTraits look reasonable? Is
there something we could do to avoid the double copy? We should probably
use an nsTArray<uint8_t> and move it, but I'm not that familiar with
this code. These types are not big so it may not be a big issue, but...
General feedback on the patch would also be welcome.
Thanks in advance!
-- Emilio