Writing a reflection engine from scratch
summary
Goal is to produce both static and dynamic C++ reflection in about one hour using libclang Python bindings to parse headers and a jinja-like generator to emit per-header generated metadata. The result is template-metaprogramming static queries, a runtime entity registry with dynamic plugin loading, and working JSON + protobuf serializers that mapped ~2000 protobuf files in a real codebase. It compiles and runs as a proof‑of‑concept but omits template instantiations and versioning and shows nontrivial compile‑time costs for string-based type keys.
AI-written summary · about
chapters (20)
- 0:00Start
- 2:31Dynamic Reflection
- 4:58Collecting Metadata
- 7:18Hello World Program with Python
- 13:30Delete C + + Code
- 14:04Format of the Generated Code
- 15:20Metadata Format
- 19:11Vision Api
- 22:19Genetic Code
- 28:02Object Serialization
- 30:24Google Port Whopper Mapping
- 32:19Algorithm
- 38:57User Code
- 39:26Animations
- 46:06Runtime Api
- 48:05Write a Dynamic Type System
- 49:09Maintenance
- 50:01Third-Party Management
- 51:32Compilation Time Impact
- 54:46Support Versioning








