Below you will find pages that utilize the taxonomy term “Research”
Why do rust program need a c compiler installed
What’s machine code?
As stated previously, your computer only understand machine code which is long series of zeros and ones. Any program written in human language must eventually be converted to our machine code.
If rust take all your instruction and convert them into one machine code file called the executable, as soon as you change your code, rust must reproduce the entire file. Imagine cleaning your whole house because you spill coffee on a table. What an efficiency? Instead rust split your code instructions into object files. The compiler keeps them independent from each other so that when you change your instruction, rust changes one object files. The rust linker ties together all those object file into your machine code executable kind of like a wedding planner that coordinate a myriads of sections to produce a coherent event at the end. Since the object files is just one piece of machine code, the linker doesn’t care in which language those machine code where converted. It could have been rust, c or c++. For the linker machine code is machine code that must be connected into one file.