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 format with vertices, normals, colors, texture coordinates)
- 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:
- C++20 or later
- CMake 3.20+
- Dependencies:
- starlet-math (auto-fetched)
- starlet-logger (auto-fetched)
include(FetchContent)
FetchContent_Declare(starlet_serializer
GIT_REPOSITORY https://github.com/masonlet/starlet-serializer.git
GIT_TAG main
)
FetchContent_MakeAvailable(starlet_serializer)
target_link_libraries(app_name PRIVATE starlet_serializer)# Clone the repository
git clone https://github.com/masonlet/starlet-serializer.git
cd starlet-serializer
# Configure and build
cmake -B build
cmake --build build# Configure with tests enabled
cmake -B build -DBUILD_TESTS=ON
# Build and run tests
cmake --build build
ctest --test-dir build --output-on-failureMIT License - see LICENSE for details.