Rust notes
Installation
apt update && apt install -y curl && \
curl https://sh.rustup.rs -sSf | sh -s -- -y
source $HOME/.cargo/envCompile
rustc main.rscargo
cargo new projectX
cargo build
# build and run
cargo runMisc
Clean up all the main files in the project:
-delete flag. .git directory might
contain important files with name main as well. Make sure you do not run this
command with -delete in the root of project directory.
# go to src directory
find . -type f -name main -delete
# github codespace
find /workspaces/rust/src -type f -name main -delete