I’m currently writing C++ (de)serialization layer in Nunavut.
I’m mostly copying C layer, adapting it to C++.
Can someone advise me on this?
How can I run C++ linting for the verification part?
Can I add external header-only libraries to support headers for C++17/20/23 backports like std::span
and std::expected
(I’m using span-lite
and tl::expected
)? If I can use them, should I write some kind of a script to update these libraries akin to how Jinja is vendored in Nunavut?
I am using span
to hold information about buffers and expected
to return result.
Are there any tests on cross-language communication?
The best source of advice is @scottdixon.
The current plan is to support C++14 and C++17. The former comes with certain limitations such as using a custom bare-bones implementation of std::variant
while the latter can use that from the standard library. I understood that C++14 is a hard requirement so it is unlikely to be changeable. Pulling other items from newer standards beyond std::variant
is probably possible; for instance, std::span
is a great addition in C++20 that also happens to be absolutely trivial to implement, so we could perhaps ship a homegrown replacement and use the proper std::span
if __cplusplus > 2020'00'00
. std::expected
is, in the end, just a variant with a bit of sugar, not sure how critical it is in this case.
@scottdixon can we carve out a set of tasks for Pavel to get started with?