Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The header gen is much faster than compilation, and is just a code generator. My project takes about 20 minutes for a clean build, the header generation is about 10 seconds at the beginning.



How is that even possible? Is header generation hacky? Or does it really generate the AST?


It generates a header and cpp file for each header that it parses. It generates some pretty rudimentary c++ with a bunch of macros, and it looks like very generated code. It's then compiled after, but the nature of the generated code is fairly simple c++ so the cost isn't enormous




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: