A lightweight serialization library for Starlet projects to handle both data reading and writing.
- Images:
- BMP (24-bit)
- TGA (24/32-bit uncompressed)
- Meshes:
- PLY (ASCII w/ positions, normals, colors, texture coordinates)
- OBJ (positions, normals, texture coordinates, vertex colors, n-gon triangulation)
- Scenes: Custom text-based scene format with models, lights, cameras, textures, primitives
- File I/O: Binary and text file loading
- Parsing Primitives:
- Type-safe parsers:
parseBool,parseUInt,parseFloat,parseVec2f/3f/4f - Token extraction with
parseToken - Whitespace handling:
skipWhitespace,skipToNextLine,trimEOL - Error-safe macros:
STARLET_PARSE_OR,STARLET_PARSE_STRING_OR
- Type-safe parsers:
- starlet-math (auto-fetched)
- starlet-logger (auto-fetched)
- C++20 or later
- One of the following Build Systems,
- CMake 3.20+
- Meson 1.1+
include(FetchContent)
FetchContent_Declare(starlet_serializer
GIT_REPOSITORY https://github.com/starlet-engine/serializer.git
GIT_TAG main
)
FetchContent_MakeAvailable(starlet_serializer)
target_link_libraries(app_name PRIVATE starlet_serializer)Note: Meson does not fetch dependencies automatically. Add the
starlet_serializer.wrapfile to your project'ssubprojectsdirectory.
In your meson.build:
starlet_serializer = subproject('starlet_serializer')
starlet_serializer_dep = starlet_serializer.get_variable('starlet_serializer_dep')
executable('app_name', 'main.cpp', dependencies: starlet_serializer_dep)git clone https://github.com/starlet-engine/serializer.git
cd serializercmake -B build -DBUILD_TESTS=ON
cmake --build build
ctest --test-dir buildmeson setup build -Dbuild_tests=true
meson compile -C build
meson test -C buildMIT License - see LICENSE for details.