Switch to Postcard#432
Conversation
06b54fa to
636414a
Compare
|
This needs companion PR in servo so we can test performance implications. |
|
I have a test branch https://github.com/Narfinger/servo/tree/postcard-switch. I am not sure which ways are best testcases but speedometer seems either the same or slightly faster on the two tests runs I did. Anything else that would be good for testing? |
I would appreciate an explanation of the rationale for this change. (The reason I ask is that I am developing a multiplexing crate (ipc-channel-mux) on top of ipc-channel and may wish to use the same dependency if there are significant advantages.) |
|
Some of the rational was discussed here: https://servo.zulipchat.com/#narrow/channel/263398-general/topic/Ipc-Channel.20Switch.20to.20rkyv/with/564657184. Sorry, I thought I linked this above but I missed it. Additionally, the error handling might change. At the moment ipc-channel exports the bincode error which seems a bit suboptimal. In short, bincode1 maintainer had a big blowup and the future is a bit uncertain. (See also here: https://docs.rs/crate/bincode/latest). Additionally, postcard seems to be faster than rkyv and bincode. |
|
@Narfinger Makes sense, thank you. I'll probably align ipc-channel-mux in due course, although PRs would also be welcome. ;-) |
|
With this https://rustsec.org/advisories/RUSTSEC-2025-0141.html perhaps we should get this and the error PR merged? @sagudev |
glyn
left a comment
There was a problem hiding this comment.
Some minor comments. Also, does this PR need rebasing on main to remove the error unification changes which just landed?
types. These types will give the Bincode error, Io errors (which are converted from platform errors) and Disconnect. Additionally we now use the thiserror crate which removes some of the code. Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
types. These types will give the Bincode error, Io errors (which are converted from platform errors) and Disconnect. Additionally we now use the thiserror crate which removes some of the code. Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
Since ipc-channel switched, do the same here. Rationale for ipc-channel switching: servo/ipc-channel#432 (comment) See also: servo/ipc-channel#440
Switch to postcard instead of bincode. This needs the error handling pr.