flatcc-v0.4.0 release - with big endian support

39 views
Skip to first unread message

mikkelfj

unread,
Oct 26, 2016, 3:39:02 PM10/26/16
to FlatBuffers
FlatCC version 0.4.0 has been released.

Main features are bug fixes needed for big endian support which has been tested on IBM AIX XLC C99 big endian.

This is a major milestone achieved through community support for big endian platform testing.

There is also support for big-endian encoded flatbuffers - which are non-standard:

For both little- and big-endian platforms the branch 'be' and the tag 'v0.4.0-be' provides support for flatbuffers encoded in big endian format.
This is not normally of interest, but may be relevant if working on high-performance big-endian platforms.
Tests pass on recent versions of support MacOS, Linux, Windows, AIX platforms.

Note: for big endian encoded flatbuffers the optional file identifier it is always byte swapped in big endian buffers. "MONS" Becomes "SNOM" and "HI\0\0" becomes "\0\0IH" but the end user api does not see this difference.

Size prefixed buffers are also supported, in line with recent C++ flatc support. This ensures internal buffer alignment is correct even with a size prefix. Note however that padding is still needed for preparing for the next buffer when appending to a file.

Some minor breaking changes isolated to the low-level builder API were necessary but end-users should not see any changes.

The portably layer has grown support for aligned_alloc. Although C11 does not defined `aligned_free` this is required in order to provide cross-platform portability. On C11 platforms with 'aligned_alloc' support (practically none) and platforms with 'posix_memalign' support, 'free' can also be used by sacrificing portability. The flatcc builder has an aligned finalizer method to returned aligned buffers. It had this before, but it didn't work properly.

Mikkel
Reply all
Reply to author
Forward
0 new messages