Skip to content

Commit

Permalink
init rust project
Browse files Browse the repository at this point in the history
  • Loading branch information
Powopaf committed Nov 3, 2024
1 parent 41e7506 commit 677135b
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 1 deletion.
29 changes: 28 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,30 @@
*/data
*.o
*/todo
C/todo
# Ignore any generated artifacts by rustup or Cargo
/.cargo/
.cargo/
.cargo-lock

# Rust specific files
**/*.rs.bk
**/*.rs.swp
**/*.rs.swo

# If you're using clippy, ignore its logs and data
.clippy

# Logs and debug output
*.log

# Binaries
*.exe
*.out
*.o
*.so
*.dylib
*.dll
*.rlib

# Ignore lock files for Rust dependencies
Cargo.lock
6 changes: 6 additions & 0 deletions Rust/todo/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[package]
name = "todo"
version = "0.1.0"
edition = "2021"

[dependencies]
17 changes: 17 additions & 0 deletions Rust/todo/src/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
use std::env;

fn main() {
let args: Vec<String> = env::args().collect();
if args.len() <= 1 {
println!("Display Task");
}
else if args[1].eq("add") {
println!("Add task");
}
else if args[1].eq("del") {
println!("Delete task");
}
else {
println!("Provide help");
}
}

0 comments on commit 677135b

Please sign in to comment.