{"id":8042,"date":"2023-10-25T22:01:15","date_gmt":"2023-10-25T13:01:15","guid":{"rendered":"https:\/\/www.skyer9.pe.kr\/wordpress\/?p=8042"},"modified":"2023-10-26T11:22:15","modified_gmt":"2023-10-26T02:22:15","slug":"rust-%ea%b0%9c%eb%b0%9c%ed%99%98%ea%b2%bd-%ea%b5%ac%ec%b6%95%ed%95%98%ea%b8%b0-with-visual-studio-code","status":"publish","type":"post","link":"https:\/\/www.skyer9.pe.kr\/wordpress\/?p=8042","title":{"rendered":"Rust &#8211; \uac1c\ubc1c\ud658\uacbd \uad6c\ucd95\ud558\uae30 with Visual Studio Code"},"content":{"rendered":"<h1>Rust &#8211; \uac1c\ubc1c\ud658\uacbd \uad6c\ucd95\ud558\uae30 with Visual Studio Code<\/h1>\n<p>\uc544\ub798\uc5d0\uc11c Visual Studio Code \uae30\ubc18\uc758 Rust \uac1c\ubc1c\ud658\uacbd\uc744 \uad6c\ucd95\ud558\ub294 \ubc29\ubc95\uc744 \uc124\uba85\ud569\ub2c8\ub2e4.<br \/>\nRust \uc640 vs code \ud50c\ub7ec\uadf8\uc778\ub9cc \uc124\uce58\ud558\uace0 \ub2e4\ub978 \ud504\ub85c\uadf8\ub7a8\uc740 \uc124\uce58\ud558\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4.<\/p>\n<h2>Rust \uc124\uce58<\/h2>\n<p><a href=\"https:\/\/rustup.rs\/\">rustup<\/a> \uc124\uce58\ud234\uc744 \uc774\uc6a9\ud574 \uc124\uce58\ud569\ub2c8\ub2e4.<br \/>\n\uc708\ub3c4\uc6b0, \ub9e5OS, \ub9ac\ub205\uc2a4 \uc124\uce58\ud234\uc774 \uc81c\uacf5\ub429\ub2c8\ub2e4.<\/p>\n<pre><code class=\"language-bash\">rustc -V\nrustc 1.73.0 (cc66ad468 2023-10-03)<\/code><\/pre>\n<p>\uc704 \uba85\ub839\uc73c\ub85c \uc815\uc0c1 \uc124\uce58\ub41c \uac83\uc744 \ud655\uc778\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<pre><code class=\"language-bash\">rustup update<\/code><\/pre>\n<p>\uc704 \uba85\ub839\uc744 \uc774\uc6a9\ud574 \ucd5c\uc2e0 \ubc84\uc804\uc73c\ub85c \uc5c5\ub370\uc774\ud2b8 \ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<pre><code class=\"language-bash\">rustup doc<\/code><\/pre>\n<p>\uc704 \uba85\ub839\uc73c\ub85c PC \uc124\uce58\ub418\uc5b4 \uc788\ub294 \ubb38\uc11c(\uc601\ubb38)\ub97c \ubcf4\uc2e4 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<p>\ud55c\uae00 \ubb38\uc11c\ub294 <a href=\"https:\/\/rust-kr.github.io\/doc.rust-kr.org\/\">\uc5ec\uae30<\/a> \uc5d0\uc11c \ubcf4\uc2e4 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<h2>Visual Studio Code \ud50c\ub7ec\uadf8\uc778 \uc124\uce58<\/h2>\n<p>VS Code \ub294 \uc774\ubbf8 \uc124\uce58\ub418\uc5b4 \uc788\ub294 \uac83\uc744 \uac00\uc815\ud569\ub2c8\ub2e4.<\/p>\n<p>VS Code Extensions \uba54\ub274\uc5d0\uc11c <code>rust-analyzer<\/code> \ub97c \uac80\uc0c9\ud574\uc11c \uc124\uce58\ud569\ub2c8\ub2e4.<\/p>\n<h2>Hello, World!<\/h2>\n<h3>\ud504\ub85c\uc81d\ud2b8 \uc0dd\uc131<\/h3>\n<pre><code class=\"language-bash\">cargo new hello_world<\/code><\/pre>\n<p>\uc704 \uba85\ub839\uc73c\ub85c hello_world \ud504\ub85c\uc81d\ud2b8\ub97c \uc0dd\uc131\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<pre><code class=\"language-bash\">cd hello_world\ncode .<\/code><\/pre>\n<p>\uc704 \uba85\ub839\uc73c\ub85c VS Code \uc5d0\uc11c \ud504\ub85c\uc81d\ud2b8\ub97c \uc624\ud508\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<pre><code class=\"language-bash\">src\\\n    main.rs\n.gitignore\nCargo.toml<\/code><\/pre>\n<p>\ud504\ub85c\uc81d\ud2b8 \uad6c\uc870\ub294 \uc704\uc640 \uac19\uc2b5\ub2c8\ub2e4.<\/p>\n<p>main.rs \ub97c \uc5f4\uc5b4\uc90d\ub2c8\ub2e4.<\/p>\n<h3>\ud504\ub85c\uc81d\ud2b8 \uc2e4\ud589<\/h3>\n<p><code>Ctrl+Shift+<\/code>` \ub2e8\ucd95\ud0a4\ub97c \uc785\ub825\ud574\uc11c VS Code \ud130\ubbf8\ub110\uc744 \uc5f4\uc5b4\uc90d\ub2c8\ub2e4.<\/p>\n<pre><code class=\"language-bash\">cargo build<\/code><\/pre>\n<p>\uc704 \uba85\ub839\uc744 \uc774\uc6a9\ud574 \ucef4\ud30c\uc77c\ud569\ub2c8\ub2e4.<\/p>\n<pre><code class=\"language-bash\">cargo run<\/code><\/pre>\n<p>\uc704 \uba85\ub839\uc744 \uc774\uc6a9\ud574 \uc2e4\ud589\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<pre><code class=\"language-bash\">.\/target\/debug\/hello_world<\/code><\/pre>\n<p>\uc704 \uba85\ub839\uc744 \uc774\uc6a9\ud574 \uc218\ub3d9\uc73c\ub85c \uc2e4\ud589\ud560 \uc218\ub3c4 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<h2>IntelliSense<\/h2>\n<p>VS Code \ud654\uba74 \uc67c\ucabd \ud558\ub2e8\uc5d0 <code>rust-analyzer<\/code> \ub77c\uace0 \ud45c\uc2dc\ub418\uc5b4 \uc788\ub294 \uac83\uc744 \ubcfc \uc218 \uc788\uc2b5\ub2c8\ub2e4.<br \/>\n\uc774\uac83\uc740 \ud504\ub85c\uc81d\ud2b8\uc758 \uc815\ubcf4\ub97c \uc218\uc9d1\ud558\ub294 Rust language server \uac00 <code>rust-analyzer<\/code> \uc5d0 \uc758\ud574 \uc2e4\ud589\uc911\uc784\uc744 \ud45c\uc2dc\ud569\ub2c8\ub2e4.<\/p>\n<p>\uc544\ub798\uc5d0 Rust language server \uc5d0 \uc758\ud574 \uc774\ub8e8\uc5b4\uc9c0\ub294 \uae30\ub2a5\ub4e4\uc744 \uc124\uba85\ud569\ub2c8\ub2e4.<\/p>\n<h3>\uc790\ub3d9\uc644\uc131<\/h3>\n<p>main.rs \uc5d0 \uc544\ub798 \ub0b4\uc6a9\uc744 \ucd94\uac00\ud569\ub2c8\ub2e4.<br \/>\n\uc790\ub3d9\uc644\uc131\uc774 \uc774\ub8e8\uc5b4\uc9c0\ub294 \uac83\uc744 \ud655\uc778\ud558\uc2e4 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<pre><code class=\"language-rust\">    println!(&quot;Enter your name.&quot;);\n\n    let mut name = String::new();\n    io::stdin()\n        .read_line(&amp;mut name)\n        .expect(&quot;Failed to read name.&quot;);\n\n    println!(&quot;Hello {}&quot;, name);<\/code><\/pre>\n<h3>\ucd94\ub860\ub41c \ud0c0\uc785<\/h3>\n<p><a href=\"https:\/\/www.skyer9.pe.kr\/wordpress\/wp-content\/uploads\/2023\/10\/2023-10-25-01.png\"><img decoding=\"async\" src=\"https:\/\/www.skyer9.pe.kr\/wordpress\/wp-content\/uploads\/2023\/10\/2023-10-25-01-300x179.png\" alt=\"\" \/><\/a><\/p>\n<p>\ud654\uba74\uc5d0 \ubcf4\uc2dc\uba74 Type \uc774 \uc0dd\ub7b5\ub41c \ubcc0\uc218\uc5d0 \ucd94\ub860\ub41c \ud0c0\uc785\uc774 \ud45c\uc2dc\ub418\ub294 \uac83\uc744 \ud655\uc778\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<p>\uc7ac\ubbf8\uc788\ub294 \uae30\ub2a5\uc774\uc9c0\ub9cc \uc18c\uc2a4\ucf54\ub4dc\ub97c \uae68\uc838 \ubcf4\uc774\uac8c \ud558\uae30\ub3c4 \ud558\uae30\uc5d0 \ud2b9\uc815 \ud0a4\ub97c \ub204\ub97c \ub54c\ub9cc \ud45c\uc2dc\ub418\ub3c4\ub85d \ubcc0\uacbd\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<br \/>\n<code>Ctrl + ,<\/code> \ub610\ub294 <code>Command + ,<\/code> \ub97c \uc785\ub825 \ud6c4 <code>inlay hints<\/code> \ub85c \uac80\uc0c9\ud569\ub2c8\ub2e4.<\/p>\n<p><a href=\"https:\/\/www.skyer9.pe.kr\/wordpress\/wp-content\/uploads\/2023\/10\/2023-10-26-01.png\"><img decoding=\"async\" src=\"https:\/\/www.skyer9.pe.kr\/wordpress\/wp-content\/uploads\/2023\/10\/2023-10-26-01-300x178.png\" alt=\"\" \/><\/a><\/p>\n<p><code>on -&gt; offUnlessPressed<\/code> \ub85c \ubcc0\uacbd\ud558\uba74 <code>Ctrl + Alt<\/code> \ub97c \ub204\ub97c \ub54c\ub9cc \ud0c0\uc785\uc774 \ud45c\uc2dc\ub429\ub2c8\ub2e4.<\/p>\n<p><a href=\"https:\/\/www.skyer9.pe.kr\/wordpress\/wp-content\/uploads\/2023\/10\/2023-10-26-02.png\"><img decoding=\"async\" src=\"https:\/\/www.skyer9.pe.kr\/wordpress\/wp-content\/uploads\/2023\/10\/2023-10-26-02-300x270.png\" alt=\"\" \/><\/a><\/p>\n<h3>\ub3c4\uc6c0\ub9d0<\/h3>\n<p><a href=\"https:\/\/www.skyer9.pe.kr\/wordpress\/wp-content\/uploads\/2023\/10\/2023-10-25-02.png\"><img decoding=\"async\" src=\"https:\/\/www.skyer9.pe.kr\/wordpress\/wp-content\/uploads\/2023\/10\/2023-10-25-02-300x248.png\" alt=\"\" \/><\/a><\/p>\n<p>\uac01\uac01\uc758 \ud0a4\uc6cc\ub4dc \ub610\ub294 \uac1d\uccb4 \ub4f1\uc5d0 \ub9c8\uc6b0\uc2a4\ub97c \uac00\uc838\ub2e4 \ub300\uba74 \ub3c4\uc6c0\ub9d0\uc774 \ud45c\uc2dc\ub418\ub294 \uac83\uc744 \ud655\uc778\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<h2>Linting<\/h2>\n<p>\ucf54\ub4dc\ub97c \uc544\ub798\uc640 \uac19\uc774 \ubcc0\uacbd\ud574 \uc90d\ub2c8\ub2e4.<\/p>\n<pre><code class=\"language-rust\">use std::io;\n\nfn main() {\n    let guess = &quot;Hello, World!&quot;;\n    let greeting = guess.contains(&quot;Wor&quot;);\n}<\/code><\/pre>\n<p>\ud30c\uc77c\uc744 \uc800\uc7a5\uc2dc \uc544\ub798\uc640 \uac19\uc774 \uc624\ub958 \ubc0f \ud574\uacb0\ucc45\uc744 \ud45c\uc2dc\ud574 \uc90d\ub2c8\ub2e4.<\/p>\n<p><a href=\"https:\/\/www.skyer9.pe.kr\/wordpress\/wp-content\/uploads\/2023\/10\/2023-10-25-03.png\"><img decoding=\"async\" src=\"https:\/\/www.skyer9.pe.kr\/wordpress\/wp-content\/uploads\/2023\/10\/2023-10-25-03-300x87.png\" alt=\"\" \/><\/a><\/p>\n<p>\uc624\ub958\uac00 \ud45c\uc2dc\ub41c \uacf3\uc73c\ub85c \ucee4\uc11c\ub97c \uc774\ub3d9 \ud6c4 <code>Ctrl+.<\/code> \uc744 \uc785\ub825\ud558\uba74 \uc790\ub3d9\uad50\uc815 \uae30\ub2a5\uc774 \uc81c\uacf5\ub429\ub2c8\ub2e4.<br \/>\n\uad50\uc815 \ud6c4 \ud30c\uc77c\uc744 \uc800\uc7a5\ud558\uba74 \uc624\ub958\uac00 \uc0ac\ub77c\uc9d1\ub2c8\ub2e4.<\/p>\n<h2>\ub514\ubc84\uae45<\/h2>\n<p>OS \uc5d0 \ub530\ub77c \uc544\ub798 \ud504\ub85c\uadf8\ub7a8\uc911 \ud558\ub098\uac00 \uc124\uce58\ub418\uc5b4 \uc788\uc73c\uba74 \ub514\ubc84\uae45\uc744 \ud65c\uc131\ud654\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<p><a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=ms-vscode.cpptools\">Microsoft C++<\/a> (ms-vscode.cpptools) \u2013 on Windows<br \/>\n<a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=vadimcn.vscode-lldb\">CodeLLDB<\/a> (vadimcn.vscode-lldb) \u2013 on macOS\/Linux<\/p>\n<p><code>F9<\/code> \ub97c \ub20c\ub7ec \ube0c\ub798\uc774\ud06c \ud3ec\uc778\ud2b8\ub97c \uc124\uc815\ud560 \uc218 \uc788\uace0, Debug \ub77c\uace0 \ud45c\uc2dc\ub41c \uacf3\uc744 \ud074\ub9ad\ud574\uc11c \ub514\ubc84\uae45\uc744 \uc2dc\uc791\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<p><a href=\"https:\/\/www.skyer9.pe.kr\/wordpress\/wp-content\/uploads\/2023\/10\/2023-10-25-04.png\"><img decoding=\"async\" src=\"https:\/\/www.skyer9.pe.kr\/wordpress\/wp-content\/uploads\/2023\/10\/2023-10-25-04-300x179.png\" alt=\"\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Rust &#8211; \uac1c\ubc1c\ud658\uacbd \uad6c\ucd95\ud558\uae30 with Visual Studio Code \uc544\ub798\uc5d0\uc11c Visual Studio Code \uae30\ubc18\uc758 Rust \uac1c\ubc1c\ud658\uacbd\uc744 \uad6c\ucd95\ud558\ub294 \ubc29\ubc95\uc744 \uc124\uba85\ud569\ub2c8\ub2e4. Rust \uc640 vs code \ud50c\ub7ec\uadf8\uc778\ub9cc \uc124\uce58\ud558\uace0 \ub2e4\ub978 \ud504\ub85c\uadf8\ub7a8\uc740 \uc124\uce58\ud558\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4. Rust \uc124\uce58 rustup \uc124\uce58\ud234\uc744 \uc774\uc6a9\ud574 \uc124\uce58\ud569\ub2c8\ub2e4. \uc708\ub3c4\uc6b0, \ub9e5OS, \ub9ac\ub205\uc2a4 \uc124\uce58\ud234\uc774 \uc81c\uacf5\ub429\ub2c8\ub2e4. rustc -V rustc 1.73.0 (cc66ad468 2023-10-03) \uc704 \uba85\ub839\uc73c\ub85c \uc815\uc0c1 \uc124\uce58\ub41c \uac83\uc744 \ud655\uc778\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. rustup update\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.skyer9.pe.kr\/wordpress\/?p=8042\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[42],"tags":[],"class_list":["post-8042","post","type-post","status-publish","format-standard","hentry","category-rust-language"],"_links":{"self":[{"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/8042","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=8042"}],"version-history":[{"count":9,"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/8042\/revisions"}],"predecessor-version":[{"id":8069,"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/8042\/revisions\/8069"}],"wp:attachment":[{"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=8042"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=8042"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=8042"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}