sccn / liblsl

C++ lsl library for multi-modal time-synched data transmission over the local network
Other
108 stars 63 forks source link

Header-only shim for Boost.Archive #103

Closed tstenner closed 2 years ago

tstenner commented 3 years ago

After replacing large parts of Boost with the C++11 stdlib, there are only (optionally) parts of Asio and Boost.Archive left to build for the boost subset we use, so I've created a single-header header-only shim that offers all of the needed functionality.

It reduces the (release) binary size by 3.4%, build times by ~5% and the dependency on separate Boost compilation units by 100%. I haven'tr tried it, but this could enable building against a system boost installation without name mangling.

Backwards compatibility is a big concern, so the already existing unit test makes sure that both Boost.Archive and the shim here serialize test data and LSL samples with the test pattern to the exact same binary data and can deserialize it to the original data.

For now, it's opt-in, but once it's tested across several compilers and most importantly on a big endian machine it could be enabled by default some time in the future.