3 ms·
I like the idea of this tool: https://github.com/rpav/c2ffi https://github.com/rpav/c2ffi (Although despite planning to use it for some personal project I have
by skissane 9y ago
I like the idea of this tool: https://github.com/rpav/c2ffi https://github.com/rpav/c2ffi
(Although despite planning to use it for some personal project I haven't got around to it yet...)
It parses C/C++/Objective-C into JSON metadata. It uses clang/LLVM so the parsing/etc should be very accurate.
So, to implement your idea, you could just embed this JSON into an ELF section. (Or, if you don't like JSON, convert your JSON to some other format, such as S-expressions or protobuf or whatever.)