Open df7cb opened 7 months ago
CRoaring supports 32-bit and even big endian systems (see https://github.com/RoaringBitmap/CRoaring/blob/master/.github/workflows/s390x.yml).
See our documentation:
If you need big-endian support, we invite you to contribute to the following issue regarding serialization: https://github.com/RoaringBitmap/CRoaring/issues/423
It is a simple matter of flipping the bytes when reading and writing.
Hi, I'm working on packaging pg_roaringbitmap for apt.postgresql.org and Debian. Naturally, that includes building it for a variety of different machine architectures.
pg_roaringbitmap works on little-endian 64-bit platforms only. If that's intended, that's fine, but maybe we can do better and support the rest as well.
32-bit x86
On 32-bit x86, the problem is actually quite small:
The other regression tests pass. (I tried poking around in the source, but only figured that
return rb->size == 0;
inroaring_buffer_is_empty
yields the wrong result, not where the problem is.)On 32-bit, there, is a warning that is easy to fix:
This can be fixed by using
size_t
instead ofuint64
. (I'll open a PR for that in a minute.)big-endian s390x
On big-endian architectures, the problems are much worse:
... and then the server crashes.
(Again, one possible fix here is to just document that big-endian would not be supported.)
Thanks for considering.