Is it possible to get the C source code when compi...
# getting-started
t
Is it possible to get the C source code when compiled by kotlin native?
p
Kotlin-native compiler produces binary, I am not aware that you could get c code from that binary. The closest you can get is the headers files from the KN .def files but that is the interface not the implementation. Perhaps from the llvm/IR step you can obtain equivalent c code. But I haven't heard of
c
You can open the binaries in Ghidra or some other decompiler to generate C code, but I doubt you'll learn much from it.
l
The CLI compiler allows you to output asm
The llvm compiler used to have a C 'architecture' that would produce a C file instead of a binary, but it was removed.
p
Interesting 🤔
l
I'll be switching jobs at the end of this month, but originally, I'd planned to have the CLI compiler output assembly for one of our large projects and create a branch with just the assembly for April fool's.
😂 2