Skip to content

Conversation

@ocean
Copy link

@ocean ocean commented Jan 8, 2026

bincode has been marked as unmaintained (RUSTSEC-2025-0141).

This commit replaces it with wincode, which:

  • Maintains full wire protocol compatibility with bincode
  • Is actively maintained by the Anza XYZ team
  • Offers better performance according to benchmarks

@ocean
Copy link
Author

ocean commented Jan 8, 2026

Much harder than I thought as this has broken the Go bindings in go-libsql in the tests, due to bytecode incompatibility of the serialization output from postcard, hence I have marked this as draft while thinking about it, as well as giving time for smarter people to join in.

Drew Robinson added 4 commits January 9, 2026 12:09
This replaces the unmaintained bincode serialization library with wincode,
which produces identical byte output while being actively maintained.

Key changes:
- Replace bincode dependency with wincode in all Cargo.toml files
- Update Value enum derives from Serialize/Deserialize to also include
  SchemaWrite/SchemaRead (keeping both for compatibility)
- Replace bincode::serialize() calls with wincode::serialize()
- Replace bincode::deserialize() calls with wincode::deserialize()
- Update error handling for wincode::WriteError and wincode::ReadError
- Update protobuf documentation to note wincode (binary compatible with bincode)

The wire protocol remains unchanged as wincode produces byte-for-byte
identical output to bincode, maintaining compatibility with existing
Go clients and other consumers of the RPC protocol.
These tests verify that wincode produces byte-for-byte identical output
to bincode 1.3.3, ensuring wire protocol compatibility with existing clients.
Add SchemaRead derive directly to Value enum and deserialize without
the unnecessary WincodeValue intermediate. This reduces code by ~18
lines and makes the implementation more idiomatic.
@ocean
Copy link
Author

ocean commented Jan 9, 2026

After further investigation, I've now replaced bincode with wincode as discussed in the main PR text. Let's see if the tests pass now.

@ocean ocean marked this pull request as ready for review January 9, 2026 04:58
@ocean ocean changed the title Replace unmaintained bincode dependency with postcard for serialization/deserialization Replace unmaintained bincode dependency with wincode for serialization/deserialization Jan 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant