mongodb / bson-rust

Encoding and decoding support for BSON in Rust
MIT License
389 stars 130 forks source link

RUST-1892 Fix timestamp [de]serialization on big-endian machines #465

Closed abr-egn closed 3 months ago

abr-egn commented 3 months ago

RUST-1892

The actual bugfix is the changes in src/bson.rs; while I was debugging, I also noticed that Document::to_writer/from_reader had Yet Another implementation of [de]serialization logic, so I ripped that out in favor of the existing stuff.

abr-egn commented 3 months ago

Sidebar in case it's ever needed again: I used the instructions here to spin up a local docker container running on an emulated s390x:

docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
docker run --rm -it s390x/ubuntu bash