Currently the Interface API header is generated in Python:
https://github.com/apache/tvm/blob/main/python/tvm/micro/interface_api.py
And the source it references is generated in C++:
https://github.com/apache/tvm/blob/main/src/target/source/source_module.cc#L237
This leads to re-implementing logic, such as name sanitising, in the two different languages. These should be consolidated to generating both header and source in C++. My opening suggestion for a file name is src/target/source/interface_c.cc 😸
See discussion here: #8720