Skip to content

Repository files navigation

JustReflectMe (JRM)

Build-time reflection and code generation for C++ classes, structs, fields, and scoped enums.

License: MIT C++26 CMake

JRM scans explicitly annotated headers and generates ordinary R<T> specializations in adjacent *.generated.h files. Applications use those specializations for type and field metadata, scoped enum conversion, runtime field lookup, and JSON serialization—without compiler patches.

What is included

  • CLASS(), FIELD(), R_FRIEND(), and ENUM_CLASS() opt-in markers.
  • Generated class/struct and enum-class metadata.
  • A resource-stream serialization API with nlohmann::json as the built-in adapter.
  • Project-local YAML configuration and timestamp-based incremental generation.
  • CMake targets for the runtime adapter, generator, tests, coverage, and microbenchmarks.
  • GCC, Clang, and MSVC project support.

The shipped CMake targets currently require C++26. The project policy is moving toward C++26 as cross-compiler support becomes available.

Documentation

The essential Antora documentation is in docs/modules/ROOT/pages and starts at the JustReflectMe overview.

The navigation for the complete documentation set is docs/modules/ROOT/nav.adoc. Build the site separately with Antora using docs/antora-playbook.yml; generated site output is not a source of truth.

Important boundary

JRM is a focused source scanner, not a complete C++ frontend. Analysis and reflected-type cross-linking are currently file-local, template-scope reflection is unsupported, and conventional declaration formatting is recommended. Read the limitations page before adopting JRM for a template-heavy or macro-generated model.

License and contribution

JRM is available under the MIT License. See CONTRIBUTING.md, CODE_OF_CONDUCT.md, and SECURITY.md before contributing or reporting a vulnerability.

About

Runtime type reflection for C++ projects. Zero dependencies, two CMake lines.

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Contributors

Languages