• Iapar@feddit.org
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 month ago

    Open terminal > cd (command to change directory) into the directory where the code is that you want to compile > then run the compiler

    In rust I would CD into the directory that I have written my code in. Let’s say user/rust/projects/example1 with the command:

    cd user/rust/projects/example1

    Now every command I type will be executed on that directory. The tool I use is called “cargo” the command to compile is “build”.

    So with that information I type:

    cargo build

    While being in user/rust/projects/example1 and when I did everything right my Programm will compile and the result of that can be found in a folder in that project. Something like:

    user/rust/projects/example1/build/prod

    Hope that helps to give a overview of how the process is supposed to go when everything works without a problem.