diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 0000000..ce5ee3d --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "hello_world" +version = "0.1.0" diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..83782fa --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "hello_world" +version = "0.1.0" +edition = "2021" + +[[bin]] +name = "hello_world" +path = "src/main.rs" diff --git a/src/main.rs b/src/main.rs new file mode 100644 index 0000000..5d28def --- /dev/null +++ b/src/main.rs @@ -0,0 +1,20 @@ +// Rust Hello World 示範程式 +// 編譯並執行:cargo run + +fn main() { + // println! 是 Rust 的巨集(macro),用來印出字串並換行 + println!("Hello, World!"); + println!("你好,世界!"); + + // 變數宣告(預設為不可變) + let name = "Rust"; + println!("歡迎使用 {} 程式語言!", name); + + // 呼叫自訂函式 + greet("開發者"); +} + +/// 一個簡單的問候函式 +fn greet(who: &str) { + println!("Hi, {}! 這是一個 Rust 範例。", who); +} diff --git a/target/.rustc_info.json b/target/.rustc_info.json new file mode 100644 index 0000000..eff002d --- /dev/null +++ b/target/.rustc_info.json @@ -0,0 +1 @@ +{"rustc_fingerprint":477736733871148030,"outputs":{"7971740275564407648":{"success":true,"status":"","code":0,"stdout":"___.exe\nlib___.rlib\n___.dll\n___.dll\nlib___.a\n___.dll\nC:\\Users\\alan\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\noff\n___\ndebug_assertions\npanic=\"unwind\"\nproc_macro\ntarget_abi=\"\"\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"gnu\"\ntarget_family=\"windows\"\ntarget_feature=\"cmpxchg16b\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_feature=\"sse3\"\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=\"windows\"\ntarget_pointer_width=\"64\"\ntarget_vendor=\"pc\"\nwindows\n","stderr":""},"17747080675513052775":{"success":true,"status":"","code":0,"stdout":"rustc 1.94.0 (4a4ef493e 2026-03-02)\nbinary: rustc\ncommit-hash: 4a4ef493e3a1488c6e321570238084b38948f6db\ncommit-date: 2026-03-02\nhost: x86_64-pc-windows-gnu\nrelease: 1.94.0\nLLVM version: 21.1.8\n","stderr":""}},"successes":{}} \ No newline at end of file diff --git a/target/CACHEDIR.TAG b/target/CACHEDIR.TAG new file mode 100644 index 0000000..20d7c31 --- /dev/null +++ b/target/CACHEDIR.TAG @@ -0,0 +1,3 @@ +Signature: 8a477f597d28d172789f06886806bc55 +# This file is a cache directory tag created by cargo. +# For information about cache directory tags see https://bford.info/cachedir/ diff --git a/target/debug/.cargo-lock b/target/debug/.cargo-lock new file mode 100644 index 0000000..e69de29 diff --git a/target/debug/.fingerprint/hello_world-10a543a465de4575/bin-hello_world b/target/debug/.fingerprint/hello_world-10a543a465de4575/bin-hello_world new file mode 100644 index 0000000..dae3e59 --- /dev/null +++ b/target/debug/.fingerprint/hello_world-10a543a465de4575/bin-hello_world @@ -0,0 +1 @@ +288379d2cbea7723 \ No newline at end of file diff --git a/target/debug/.fingerprint/hello_world-10a543a465de4575/bin-hello_world.json b/target/debug/.fingerprint/hello_world-10a543a465de4575/bin-hello_world.json new file mode 100644 index 0000000..eeae039 --- /dev/null +++ b/target/debug/.fingerprint/hello_world-10a543a465de4575/bin-hello_world.json @@ -0,0 +1 @@ +{"rustc":13073507457223000659,"features":"[]","declared_features":"[]","target":10933677794921727520,"profile":8731458305071235362,"path":4942398508502643691,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug\\.fingerprint\\hello_world-10a543a465de4575\\dep-bin-hello_world","checksum":false}}],"rustflags":[],"config":8247474407144887393,"compile_kind":0} \ No newline at end of file diff --git a/target/debug/.fingerprint/hello_world-10a543a465de4575/dep-bin-hello_world b/target/debug/.fingerprint/hello_world-10a543a465de4575/dep-bin-hello_world new file mode 100644 index 0000000..f2782a5 Binary files /dev/null and b/target/debug/.fingerprint/hello_world-10a543a465de4575/dep-bin-hello_world differ diff --git a/target/debug/.fingerprint/hello_world-10a543a465de4575/invoked.timestamp b/target/debug/.fingerprint/hello_world-10a543a465de4575/invoked.timestamp new file mode 100644 index 0000000..e00328d --- /dev/null +++ b/target/debug/.fingerprint/hello_world-10a543a465de4575/invoked.timestamp @@ -0,0 +1 @@ +This file has an mtime of when this was started. \ No newline at end of file diff --git a/target/debug/.fingerprint/hello_world-28821d0d93adece6/bin-hello_world b/target/debug/.fingerprint/hello_world-28821d0d93adece6/bin-hello_world new file mode 100644 index 0000000..171dbe0 --- /dev/null +++ b/target/debug/.fingerprint/hello_world-28821d0d93adece6/bin-hello_world @@ -0,0 +1 @@ +abfb746d06de7608 \ No newline at end of file diff --git a/target/debug/.fingerprint/hello_world-28821d0d93adece6/bin-hello_world.json b/target/debug/.fingerprint/hello_world-28821d0d93adece6/bin-hello_world.json new file mode 100644 index 0000000..c9cf69d --- /dev/null +++ b/target/debug/.fingerprint/hello_world-28821d0d93adece6/bin-hello_world.json @@ -0,0 +1 @@ +{"rustc":13073507457223000659,"features":"[]","declared_features":"[]","target":10933677794921727520,"profile":17672942494452627365,"path":4942398508502643691,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug\\.fingerprint\\hello_world-28821d0d93adece6\\dep-bin-hello_world","checksum":false}}],"rustflags":[],"config":8247474407144887393,"compile_kind":0} \ No newline at end of file diff --git a/target/debug/.fingerprint/hello_world-28821d0d93adece6/dep-bin-hello_world b/target/debug/.fingerprint/hello_world-28821d0d93adece6/dep-bin-hello_world new file mode 100644 index 0000000..f2782a5 Binary files /dev/null and b/target/debug/.fingerprint/hello_world-28821d0d93adece6/dep-bin-hello_world differ diff --git a/target/debug/.fingerprint/hello_world-28821d0d93adece6/invoked.timestamp b/target/debug/.fingerprint/hello_world-28821d0d93adece6/invoked.timestamp new file mode 100644 index 0000000..e00328d --- /dev/null +++ b/target/debug/.fingerprint/hello_world-28821d0d93adece6/invoked.timestamp @@ -0,0 +1 @@ +This file has an mtime of when this was started. \ No newline at end of file diff --git a/target/debug/deps/hello_world-10a543a465de4575.d b/target/debug/deps/hello_world-10a543a465de4575.d new file mode 100644 index 0000000..59c5527 --- /dev/null +++ b/target/debug/deps/hello_world-10a543a465de4575.d @@ -0,0 +1,5 @@ +D:\@dev_HuKui\helloWorld\target\debug\deps\hello_world-10a543a465de4575.d: src\main.rs + +D:\@dev_HuKui\helloWorld\target\debug\deps\hello_world-10a543a465de4575.exe: src\main.rs + +src\main.rs: diff --git a/target/debug/deps/hello_world-10a543a465de4575.exe b/target/debug/deps/hello_world-10a543a465de4575.exe new file mode 100644 index 0000000..393b408 Binary files /dev/null and b/target/debug/deps/hello_world-10a543a465de4575.exe differ diff --git a/target/debug/deps/hello_world-28821d0d93adece6.d b/target/debug/deps/hello_world-28821d0d93adece6.d new file mode 100644 index 0000000..b23a4fc --- /dev/null +++ b/target/debug/deps/hello_world-28821d0d93adece6.d @@ -0,0 +1,5 @@ +D:\@dev_HuKui\helloWorld\target\debug\deps\hello_world-28821d0d93adece6.d: src\main.rs + +D:\@dev_HuKui\helloWorld\target\debug\deps\libhello_world-28821d0d93adece6.rmeta: src\main.rs + +src\main.rs: diff --git a/target/debug/deps/libhello_world-28821d0d93adece6.rmeta b/target/debug/deps/libhello_world-28821d0d93adece6.rmeta new file mode 100644 index 0000000..e69de29 diff --git a/target/debug/hello_world.d b/target/debug/hello_world.d new file mode 100644 index 0000000..291f8a7 --- /dev/null +++ b/target/debug/hello_world.d @@ -0,0 +1 @@ +D:\@dev_HuKui\helloWorld\target\debug\hello_world.exe: D:\@dev_HuKui\helloWorld\src\main.rs diff --git a/target/debug/hello_world.exe b/target/debug/hello_world.exe new file mode 100644 index 0000000..393b408 Binary files /dev/null and b/target/debug/hello_world.exe differ diff --git a/target/debug/incremental/hello_world-07dw0qq8vivp3/s-hiqj46b6yr-1i8quqa-atlykfnfdxc9xez95glah60xp/dep-graph.bin b/target/debug/incremental/hello_world-07dw0qq8vivp3/s-hiqj46b6yr-1i8quqa-atlykfnfdxc9xez95glah60xp/dep-graph.bin new file mode 100644 index 0000000..954299f Binary files /dev/null and b/target/debug/incremental/hello_world-07dw0qq8vivp3/s-hiqj46b6yr-1i8quqa-atlykfnfdxc9xez95glah60xp/dep-graph.bin differ diff --git a/target/debug/incremental/hello_world-07dw0qq8vivp3/s-hiqj46b6yr-1i8quqa-atlykfnfdxc9xez95glah60xp/query-cache.bin b/target/debug/incremental/hello_world-07dw0qq8vivp3/s-hiqj46b6yr-1i8quqa-atlykfnfdxc9xez95glah60xp/query-cache.bin new file mode 100644 index 0000000..3615afe Binary files /dev/null and b/target/debug/incremental/hello_world-07dw0qq8vivp3/s-hiqj46b6yr-1i8quqa-atlykfnfdxc9xez95glah60xp/query-cache.bin differ diff --git a/target/debug/incremental/hello_world-07dw0qq8vivp3/s-hiqj46b6yr-1i8quqa-atlykfnfdxc9xez95glah60xp/work-products.bin b/target/debug/incremental/hello_world-07dw0qq8vivp3/s-hiqj46b6yr-1i8quqa-atlykfnfdxc9xez95glah60xp/work-products.bin new file mode 100644 index 0000000..dc0e74b Binary files /dev/null and b/target/debug/incremental/hello_world-07dw0qq8vivp3/s-hiqj46b6yr-1i8quqa-atlykfnfdxc9xez95glah60xp/work-products.bin differ diff --git a/target/debug/incremental/hello_world-07dw0qq8vivp3/s-hiqj46b6yr-1i8quqa.lock b/target/debug/incremental/hello_world-07dw0qq8vivp3/s-hiqj46b6yr-1i8quqa.lock new file mode 100644 index 0000000..e69de29 diff --git a/target/debug/incremental/hello_world-3hsgisa2d6jxc/s-hiqj40h642-1sen01e-6r9nuu9l9d4bnfrd7838fiplz/01lomro1j972p2gtdlv827a58.o b/target/debug/incremental/hello_world-3hsgisa2d6jxc/s-hiqj40h642-1sen01e-6r9nuu9l9d4bnfrd7838fiplz/01lomro1j972p2gtdlv827a58.o new file mode 100644 index 0000000..d8ba056 Binary files /dev/null and b/target/debug/incremental/hello_world-3hsgisa2d6jxc/s-hiqj40h642-1sen01e-6r9nuu9l9d4bnfrd7838fiplz/01lomro1j972p2gtdlv827a58.o differ diff --git a/target/debug/incremental/hello_world-3hsgisa2d6jxc/s-hiqj40h642-1sen01e-6r9nuu9l9d4bnfrd7838fiplz/06hle6irl23wo1h61a7u1olt2.o b/target/debug/incremental/hello_world-3hsgisa2d6jxc/s-hiqj40h642-1sen01e-6r9nuu9l9d4bnfrd7838fiplz/06hle6irl23wo1h61a7u1olt2.o new file mode 100644 index 0000000..f7e744c Binary files /dev/null and b/target/debug/incremental/hello_world-3hsgisa2d6jxc/s-hiqj40h642-1sen01e-6r9nuu9l9d4bnfrd7838fiplz/06hle6irl23wo1h61a7u1olt2.o differ diff --git a/target/debug/incremental/hello_world-3hsgisa2d6jxc/s-hiqj40h642-1sen01e-6r9nuu9l9d4bnfrd7838fiplz/1kz6ckx593ktj0ufp04ddi7pg.o b/target/debug/incremental/hello_world-3hsgisa2d6jxc/s-hiqj40h642-1sen01e-6r9nuu9l9d4bnfrd7838fiplz/1kz6ckx593ktj0ufp04ddi7pg.o new file mode 100644 index 0000000..35fa993 Binary files /dev/null and b/target/debug/incremental/hello_world-3hsgisa2d6jxc/s-hiqj40h642-1sen01e-6r9nuu9l9d4bnfrd7838fiplz/1kz6ckx593ktj0ufp04ddi7pg.o differ diff --git a/target/debug/incremental/hello_world-3hsgisa2d6jxc/s-hiqj40h642-1sen01e-6r9nuu9l9d4bnfrd7838fiplz/2qqoe2r2hcj44m1m1ji4l12st.o b/target/debug/incremental/hello_world-3hsgisa2d6jxc/s-hiqj40h642-1sen01e-6r9nuu9l9d4bnfrd7838fiplz/2qqoe2r2hcj44m1m1ji4l12st.o new file mode 100644 index 0000000..c09098b Binary files /dev/null and b/target/debug/incremental/hello_world-3hsgisa2d6jxc/s-hiqj40h642-1sen01e-6r9nuu9l9d4bnfrd7838fiplz/2qqoe2r2hcj44m1m1ji4l12st.o differ diff --git a/target/debug/incremental/hello_world-3hsgisa2d6jxc/s-hiqj40h642-1sen01e-6r9nuu9l9d4bnfrd7838fiplz/4cddfr0r9cyisdqcj2llhea5d.o b/target/debug/incremental/hello_world-3hsgisa2d6jxc/s-hiqj40h642-1sen01e-6r9nuu9l9d4bnfrd7838fiplz/4cddfr0r9cyisdqcj2llhea5d.o new file mode 100644 index 0000000..7f45c3e Binary files /dev/null and b/target/debug/incremental/hello_world-3hsgisa2d6jxc/s-hiqj40h642-1sen01e-6r9nuu9l9d4bnfrd7838fiplz/4cddfr0r9cyisdqcj2llhea5d.o differ diff --git a/target/debug/incremental/hello_world-3hsgisa2d6jxc/s-hiqj40h642-1sen01e-6r9nuu9l9d4bnfrd7838fiplz/dep-graph.bin b/target/debug/incremental/hello_world-3hsgisa2d6jxc/s-hiqj40h642-1sen01e-6r9nuu9l9d4bnfrd7838fiplz/dep-graph.bin new file mode 100644 index 0000000..81ae4c8 Binary files /dev/null and b/target/debug/incremental/hello_world-3hsgisa2d6jxc/s-hiqj40h642-1sen01e-6r9nuu9l9d4bnfrd7838fiplz/dep-graph.bin differ diff --git a/target/debug/incremental/hello_world-3hsgisa2d6jxc/s-hiqj40h642-1sen01e-6r9nuu9l9d4bnfrd7838fiplz/dew5gf60blvwdbcmay6fbjlos.o b/target/debug/incremental/hello_world-3hsgisa2d6jxc/s-hiqj40h642-1sen01e-6r9nuu9l9d4bnfrd7838fiplz/dew5gf60blvwdbcmay6fbjlos.o new file mode 100644 index 0000000..272f0c3 Binary files /dev/null and b/target/debug/incremental/hello_world-3hsgisa2d6jxc/s-hiqj40h642-1sen01e-6r9nuu9l9d4bnfrd7838fiplz/dew5gf60blvwdbcmay6fbjlos.o differ diff --git a/target/debug/incremental/hello_world-3hsgisa2d6jxc/s-hiqj40h642-1sen01e-6r9nuu9l9d4bnfrd7838fiplz/eoqq1ckuwgh7yjsak0wi4lf0u.o b/target/debug/incremental/hello_world-3hsgisa2d6jxc/s-hiqj40h642-1sen01e-6r9nuu9l9d4bnfrd7838fiplz/eoqq1ckuwgh7yjsak0wi4lf0u.o new file mode 100644 index 0000000..a808b0e Binary files /dev/null and b/target/debug/incremental/hello_world-3hsgisa2d6jxc/s-hiqj40h642-1sen01e-6r9nuu9l9d4bnfrd7838fiplz/eoqq1ckuwgh7yjsak0wi4lf0u.o differ diff --git a/target/debug/incremental/hello_world-3hsgisa2d6jxc/s-hiqj40h642-1sen01e-6r9nuu9l9d4bnfrd7838fiplz/f2vv5p7hgws5allv1pi1o3hys.o b/target/debug/incremental/hello_world-3hsgisa2d6jxc/s-hiqj40h642-1sen01e-6r9nuu9l9d4bnfrd7838fiplz/f2vv5p7hgws5allv1pi1o3hys.o new file mode 100644 index 0000000..47e3361 Binary files /dev/null and b/target/debug/incremental/hello_world-3hsgisa2d6jxc/s-hiqj40h642-1sen01e-6r9nuu9l9d4bnfrd7838fiplz/f2vv5p7hgws5allv1pi1o3hys.o differ diff --git a/target/debug/incremental/hello_world-3hsgisa2d6jxc/s-hiqj40h642-1sen01e-6r9nuu9l9d4bnfrd7838fiplz/query-cache.bin b/target/debug/incremental/hello_world-3hsgisa2d6jxc/s-hiqj40h642-1sen01e-6r9nuu9l9d4bnfrd7838fiplz/query-cache.bin new file mode 100644 index 0000000..a9cfb0c Binary files /dev/null and b/target/debug/incremental/hello_world-3hsgisa2d6jxc/s-hiqj40h642-1sen01e-6r9nuu9l9d4bnfrd7838fiplz/query-cache.bin differ diff --git a/target/debug/incremental/hello_world-3hsgisa2d6jxc/s-hiqj40h642-1sen01e-6r9nuu9l9d4bnfrd7838fiplz/work-products.bin b/target/debug/incremental/hello_world-3hsgisa2d6jxc/s-hiqj40h642-1sen01e-6r9nuu9l9d4bnfrd7838fiplz/work-products.bin new file mode 100644 index 0000000..3f7054f Binary files /dev/null and b/target/debug/incremental/hello_world-3hsgisa2d6jxc/s-hiqj40h642-1sen01e-6r9nuu9l9d4bnfrd7838fiplz/work-products.bin differ diff --git a/target/debug/incremental/hello_world-3hsgisa2d6jxc/s-hiqj40h642-1sen01e.lock b/target/debug/incremental/hello_world-3hsgisa2d6jxc/s-hiqj40h642-1sen01e.lock new file mode 100644 index 0000000..e69de29