learn: first 2 project
This commit is contained in:
commit
9c2fbaa825
1
comments/.gitignore
vendored
Normal file
1
comments/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
/target
|
||||
6
comments/Cargo.toml
Normal file
6
comments/Cargo.toml
Normal file
@ -0,0 +1,6 @@
|
||||
[package]
|
||||
name = "comments"
|
||||
version = "0.1.0"
|
||||
edition = "2024"
|
||||
|
||||
[dependencies]
|
||||
23
comments/src/main.rs
Normal file
23
comments/src/main.rs
Normal file
@ -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!");
|
||||
}
|
||||
1
formatted-print/.gitignore
vendored
Normal file
1
formatted-print/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
/target
|
||||
6
formatted-print/Cargo.toml
Normal file
6
formatted-print/Cargo.toml
Normal file
@ -0,0 +1,6 @@
|
||||
[package]
|
||||
name = "formatted-print"
|
||||
version = "0.1.0"
|
||||
edition = "2024"
|
||||
|
||||
[dependencies]
|
||||
3
formatted-print/src/main.rs
Normal file
3
formatted-print/src/main.rs
Normal file
@ -0,0 +1,3 @@
|
||||
fn main() {
|
||||
println!("Hello, world!");
|
||||
}
|
||||
1
helloworld/.gitignore
vendored
Normal file
1
helloworld/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
/target
|
||||
7
helloworld/Cargo.lock
generated
Normal file
7
helloworld/Cargo.lock
generated
Normal file
@ -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"
|
||||
6
helloworld/Cargo.toml
Normal file
6
helloworld/Cargo.toml
Normal file
@ -0,0 +1,6 @@
|
||||
[package]
|
||||
name = "helloworld"
|
||||
version = "0.1.0"
|
||||
edition = "2024"
|
||||
|
||||
[dependencies]
|
||||
BIN
helloworld/main
Executable file
BIN
helloworld/main
Executable file
Binary file not shown.
5
helloworld/src/main.rs
Normal file
5
helloworld/src/main.rs
Normal file
@ -0,0 +1,5 @@
|
||||
// This is a comment
|
||||
|
||||
fn main() {
|
||||
println!("hello ^^");
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user