Skip to content

masonlet/starlet-serializer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Starlet Serializer

Tests C++20 License: MIT

A lightweight serialization library for Starlet projects to handle both data reading and writing.

Features

File Format Support

  • 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

Core Utilities

  • 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

Prerequisites

Installation

Using as a Dependency

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)

Building from Source

# Clone the repository
git clone https://github.com/masonlet/starlet-serializer.git
cd starlet-serializer

# Configure and build
cmake -B build
cmake --build build

Testing

# Configure with tests enabled
cmake -B build -DBUILD_TESTS=ON

# Build and run tests
cmake --build build
ctest --test-dir build --output-on-failure

License

MIT License - see LICENSE for details.

About

Lightweight serialization library for Starlet projects

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published