Skip to content

Commit 33ebbb3

Browse files
committed
docs: rust day day up
1 parent be98ef9 commit 33ebbb3

File tree

15 files changed

+46
-6
lines changed

15 files changed

+46
-6
lines changed

module/Cargo.lock

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

module/src/front_of_house.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pub mod hosting;

module/src/front_of_house/hosting.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pub fn add_to_waitlist() {}

module/src/main.rs

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,30 @@
1-
// Todo: 拆分为多文件
2-
mod front_of_house {
3-
pub mod hosting {
4-
pub fn add_to_waitlist() {}
5-
}
6-
}
1+
// 单文件
2+
// mod front_of_house {
3+
// pub mod hosting {
4+
// pub fn add_to_waitlist() {}
5+
// }
6+
// }
7+
8+
// pub use crate::front_of_house::hosting;
9+
10+
// fn main() {
11+
// hosting::add_to_waitlist();
12+
// hosting::add_to_waitlist();
13+
// hosting::add_to_waitlist();
14+
15+
// println!("Hello, world!");
16+
// }
17+
18+
// 多文件
19+
// 在 mod front_of_house 后添加分号而不是代码块会让 Rust 前往与当前模块同名的文件中加载模块;
20+
mod front_of_house;
721

822
pub use crate::front_of_house::hosting;
923

1024
fn main() {
1125
hosting::add_to_waitlist();
1226
hosting::add_to_waitlist();
1327
hosting::add_to_waitlist();
28+
29+
println!("Hello, world!");
1430
}

module/target/.rustc_info.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"rustc_fingerprint":3299840891311980700,"outputs":{"15697416045686424142":{"success":true,"status":"","code":0,"stdout":"___\nlib___.rlib\nlib___.dylib\nlib___.dylib\nlib___.a\nlib___.dylib\n","stderr":""},"4614504638168534921":{"success":true,"status":"","code":0,"stdout":"rustc 1.67.0 (fc594f156 2023-01-24)\nbinary: rustc\ncommit-hash: fc594f15669680fa70d255faec3ca3fb507c3405\ncommit-date: 2023-01-24\nhost: x86_64-apple-darwin\nrelease: 1.67.0\nLLVM version: 15.0.6\n","stderr":""},"10376369925670944939":{"success":true,"status":"","code":0,"stdout":"___\nlib___.rlib\nlib___.dylib\nlib___.dylib\nlib___.a\nlib___.dylib\n/Users/mac/.rustup/toolchains/stable-x86_64-apple-darwin\ndebug_assertions\npanic=\"unwind\"\nproc_macro\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"\"\ntarget_family=\"unix\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_feature=\"sse3\"\ntarget_feature=\"ssse3\"\ntarget_has_atomic=\"128\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_os=\"macos\"\ntarget_pointer_width=\"64\"\ntarget_vendor=\"apple\"\nunix\n","stderr":""}},"successes":{}}

module/target/CACHEDIR.TAG

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Signature: 8a477f597d28d172789f06886806bc55
2+
# This file is a cache directory tag created by cargo.
3+
# For information about cache directory tags see https://bford.info/cachedir/

module/target/release/.cargo-lock

Whitespace-only changes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
b6fc571a516d9632
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"rustc":2209823359022848052,"features":"[]","target":5330418027101799184,"profile":6269190295429226618,"path":1684066648322511884,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"release/.fingerprint/module-a012f86f5d40ca44/dep-bin-module"}}],"rustflags":[],"metadata":7797948686568424061,"config":2202906307356721367,"compile_kind":0}
Binary file not shown.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
This file has an mtime of when this was started.
Binary file not shown.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/Users/mac/Developer/project/demos-of-rust/module/target/release/deps/module-a012f86f5d40ca44: src/main.rs src/front_of_house.rs src/front_of_house/hosting.rs
2+
3+
/Users/mac/Developer/project/demos-of-rust/module/target/release/deps/module-a012f86f5d40ca44.d: src/main.rs src/front_of_house.rs src/front_of_house/hosting.rs
4+
5+
src/main.rs:
6+
src/front_of_house.rs:
7+
src/front_of_house/hosting.rs:

module/target/release/module

467 KB
Binary file not shown.

module/target/release/module.d

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/Users/mac/Developer/project/demos-of-rust/module/target/release/module: /Users/mac/Developer/project/demos-of-rust/module/src/front_of_house/hosting.rs /Users/mac/Developer/project/demos-of-rust/module/src/front_of_house.rs /Users/mac/Developer/project/demos-of-rust/module/src/main.rs

0 commit comments

Comments
 (0)