Skip to content

zyyang90/hello

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

hello rust

Sample

  1. create a new rust project by cargo new
cargo new hello
cd hello
  1. init project
git add .
git commit -m "init"
  1. create repository on github

  2. push this repository to github

git remote add origin git@github.com:zyyang90/hello.git
git branch -M main
git push -u origin main
  1. run with cargo run
cargo run
  1. add Cargo.lock to .gitignore

  2. push first commit

git add .
git commit -m "first commit"
git push origin main

Summary

  1. use cargo new to create a new Rust project
  2. create repository on github, and push codes to github
  3. use cargo run to run the project: hello
  4. Cargo.lock is generate by cargo, which should add to .gitignore

Releases

No releases published

Packages

No packages published

Languages