commit 9c2fbaa825eb5257be12e8c46be6e7e42f19e2a3 Author: Nak0_x Date: Wed Sep 2 23:02:11 2026 +0200 learn: first 2 project diff --git a/comments/.gitignore b/comments/.gitignore new file mode 100644 index 0000000..ea8c4bf --- /dev/null +++ b/comments/.gitignore @@ -0,0 +1 @@ +/target diff --git a/comments/Cargo.toml b/comments/Cargo.toml new file mode 100644 index 0000000..e4bffc6 --- /dev/null +++ b/comments/Cargo.toml @@ -0,0 +1,6 @@ +[package] +name = "comments" +version = "0.1.0" +edition = "2024" + +[dependencies] diff --git a/comments/src/main.rs b/comments/src/main.rs new file mode 100644 index 0000000..55d6e76 --- /dev/null +++ b/comments/src/main.rs @@ -0,0 +1,23 @@ +//! Generate html doc for the enclosing item (file or module) +// Line comment + +/* Block comment + * Traditional imo + */ + +/* <- Add a '/' here to uncomment the entire block below + +println!("Now"); +println!("everything"); +println!("executes!"); +// Line comments inside remain unaffected + +// */ + +// Documentation Comment (Doc Comments) which are parsed +// into HTML lib doc: + +/// Comment for the following item +fn main() { + println!("Hello, world!"); +} diff --git a/formatted-print/.gitignore b/formatted-print/.gitignore new file mode 100644 index 0000000..ea8c4bf --- /dev/null +++ b/formatted-print/.gitignore @@ -0,0 +1 @@ +/target diff --git a/formatted-print/Cargo.toml b/formatted-print/Cargo.toml new file mode 100644 index 0000000..9b7517c --- /dev/null +++ b/formatted-print/Cargo.toml @@ -0,0 +1,6 @@ +[package] +name = "formatted-print" +version = "0.1.0" +edition = "2024" + +[dependencies] diff --git a/formatted-print/src/main.rs b/formatted-print/src/main.rs new file mode 100644 index 0000000..e7a11a9 --- /dev/null +++ b/formatted-print/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("Hello, world!"); +} diff --git a/helloworld/.gitignore b/helloworld/.gitignore new file mode 100644 index 0000000..ea8c4bf --- /dev/null +++ b/helloworld/.gitignore @@ -0,0 +1 @@ +/target diff --git a/helloworld/Cargo.lock b/helloworld/Cargo.lock new file mode 100644 index 0000000..4435b8b --- /dev/null +++ b/helloworld/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "helloworld" +version = "0.1.0" diff --git a/helloworld/Cargo.toml b/helloworld/Cargo.toml new file mode 100644 index 0000000..448daef --- /dev/null +++ b/helloworld/Cargo.toml @@ -0,0 +1,6 @@ +[package] +name = "helloworld" +version = "0.1.0" +edition = "2024" + +[dependencies] diff --git a/helloworld/main b/helloworld/main new file mode 100755 index 0000000..f8b9df4 Binary files /dev/null and b/helloworld/main differ diff --git a/helloworld/src/main.rs b/helloworld/src/main.rs new file mode 100644 index 0000000..648a59a --- /dev/null +++ b/helloworld/src/main.rs @@ -0,0 +1,5 @@ +// This is a comment + +fn main() { + println!("hello ^^"); +}