Is it possible to get the C source code when compiled by kotlin native?
03/17/2023, 2:40 AM
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
03/17/2023, 9:16 AM
You can open the binaries in Ghidra or some other decompiler to generate C code, but I doubt you'll learn much from it.
03/17/2023, 3:04 PM
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.
03/17/2023, 3:31 PM
03/17/2023, 3:39 PM
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.