chore: add docs and example

This commit is contained in:
2026-03-24 23:40:29 +01:00
parent 788a5a1f6f
commit 37f32fa280
5 changed files with 488 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
#include <stdio.h>
#include "cmeta.h"
typedef struct {
int int_field;
} Foo_Struct;
int main(void) {
printf("Foo_Struct infos:\n");
printf(" name = %s\n", foo_struct_info.name);
printf(" fields_count = %zu\n", foo_struct_info.fields_count);
for (size_t i = 0; i < foo_struct_info.fields_count; i += 1) {
Field_Info field = foo_struct_info.fields[i];
printf(" .%s: %s\n", field.name, field.type);
}
return 0;
}