SCExample#
Serializer example
The hot-reload system of SCExample has been tuned so that each internal example is just an hot-reloaded Plugin.
It's now very convenient to iteratively build them and experiment!
A nice serialization example has been added to SCExample, based on a very well known piece of code from the official imgui demo.
State of the canvas control is saved to binary and json using the automatic serialization provided by the reflection system.
It's also showing a somewhat advanced usage of the Reflection system, that is how to wrap a "custom" vector implementation (ImVector
SC::Serialization#
Serialize all the things
While building the Serialization example, a few fixes have been made necessary to
SC::SerializationBinary
.
The first has been supporting the bool data type that for some obscure reason was missing from the primitive types.
Some helpers to read and write the schema together with serialized data have been added to make it easy supporting versioned binary serialization.
Fields can be added or removed, and the serializer will still try to load data that can be converted assuming a matching order.
There is also some support for changing field types. For example a float field that is converted to int (or vice-versa) will receive a truncated value on deserialization.
- Reflection: Add vector manipulation methods to ExtendedTypeInfo
- Reflection: Support bool primitive type
- SerializationBinary: Add writeWithSchema and loadVersionedWithSchema
- SerializationBinary: Reduce boilerplate needed to wrap a custom vector container
- SerializationBinary: Support bool primitive type
- SerializationText: Reduce boilerplate needed to wrap a custom vector container
SC::Plugin#
Hot-Reload like there is no tomorrow
SC::Plugin
library has received a few improvements,
like the ability to specify a path for the sysroot under clang (needed on iOS), and it's capturing compiler and linker outputs.
This last one allows showing compile errors in the plugin host app, that is a nice addition to SCExample.
Finally some dynamic export clauses have been added to many libraries in order for Plugins to find symbols in the host application that is loading them.
This will for sure increase the executable size as the linker will not be able to trim such classes as "unused" code, even if they're not referenced by any Plugin.
Probably some macro to disable this "export by default" behavior will be added for anyone that wants to use Sane C++ Libraries without the Plugin Library or without
needing to use Sane C++ Libraries type across dynamic library boundaries.
SC::Build#
Actually got a promotion!
SC::Build
library has
received some improvements too, supporting generation of iOS project and application icon for Xcode app bundle.
There are still many missing features and too many hardcoded defaults but I feel that the library deserves more than a Draft status.
For this reason I've been promoting it to MVP status: maybe this will become an incentive to add more features to make it usable!
Contributions#
Together we can build more!
This month Jeremy Laumon has been adding .natvis
support for Arrays!
Additional fixes#
Fix fix fix
And then the usual amount of monthly fixes! I can never stress how important is to use the libraries in a real project or even just in an example app to trigger issues and identify missing bits!
- Strings: Export String and some SmallString
for use across Plugin boundaries - Containers: Fix some incorrect Array member functions
- FileSystemWatcher: Add internal header with FSEvents declarations for iOS
- Documentation: Improve README and fix descriptions of some libraries
- FileSystem: Add read and write overloads for uint8_t
- Strings: Fix doubles parsing
- Everywhere: Add lifetime bound attribute for StringViews and Spans
- Foundation: Add Span::reinterpret_as_array_of
() - Tools: Use Github to download doxygen releases