{"id":374610,"date":"2021-02-20T19:18:40","date_gmt":"2021-02-20T11:18:40","guid":{"rendered":"http:\/\/4563.org\/?p=374610"},"modified":"2021-02-20T19:18:40","modified_gmt":"2021-02-20T11:18:40","slug":"rust-%e7%9a%84%e6%a8%a1%e5%9d%97%e5%8c%96%e5%a4%aa%e7%b9%81%e7%90%90","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=374610","title":{"rendered":"rust \u7684\u6a21\u5757\u5316\u592a\u7e41\u7410"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  rust \u7684\u6a21\u5757\u5316\u592a\u7e41\u7410               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : syaka <\/span>  <span><i><\/i> 3<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<p>rust \u7684\u6a21\u5757\u5316\u662f\u5728\u592a\u7e41\u7410\uff1a<\/p>\n<ol>\n<li>\u5b66\u4e60\u4e86 npm \u7684\u7cdf\u7c95\uff0c\u6bcf\u4e2a\u6587\u4ef6\u5f53\u4f5c\u4e00\u4e2a\u6a21\u5757\u3002\u5c24\u5176\u662f xxx\/mod.rs \u7b80\u76f4\u4e86\u3002<\/li>\n<li>crate \u5185\u7684\u6a21\u5757\u8fd8\u9700\u8981\u5728 lib.rs \u58f0\u660e\u624d\u80fd\u4f7f\u7528\u3002<\/li>\n<\/ol>\n<p>\u8fd9\u4e24\u70b9\u5bfc\u81f4 crate \u91cc\u5bfc\u51fa\u5145\u65a5\u7740\u65e0\u610f\u4e49\u7684 mod.rs \uff0c\u800c mod.rs \u7684\u5185\u5bb9\u5168\u662f\u65e0\u610f\u4e49\u7684 pub mod xxx \u3002<\/p>\n<p>\u8ddf Go \u7684\u6a21\u5757\u5316\u6bd4\u8d77\u6765\uff0crust \u7684\u6a21\u5757\u5316\u8bbe\u8ba1\u771f\u7684\u662f\u7cdf\u7c95\u3002<\/p>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>18<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"5387321\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Thetruechar <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5f88\u559c\u6b22\u8fd9\u6837\u7684\u5f15\u6218\u5e16                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5387322\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Leviathann <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u53cd\u6b63\u6211\u89c9\u5f97\u5b98\u65b9\u4e66\u7684\u6a21\u5757\u5316\u90a3\u7ae0\u5199\u7684\u5f88\u70c2<br \/>\u6700\u540e\u4e00\u8282\u5ffd\u7136\u8bf4\u6587\u4ef6\u5939\u4e5f\u662f path \u7684\u4e00\u90e8\u5206<br \/>\u4e5f\u6ca1\u63d0 lib \u548c binary \u600e\u4e48\u4ea4\u4e92<br \/>\u8bd5\u4e86\u4e0b\u624d\u77e5\u9053\u628a lib \u5f53\u6210\u5916\u90e8 package \u4e00\u6837\u7528 cargo \u6587\u4ef6\u5939\u540d\u624d\u80fd\u5bfc\u8fdb\u6765                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5387323\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : GTim <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             nnd. \u6240\u6709\u6743\u548c\u6240\u6709\u6743\u8f6c\u8ba9\u3001\u6307\u9488\u3001\u667a\u80fd\u6307\u9488\u3001\u88c5\u7bb1\u7b49\u7b49\u624d\u662f\u5927\u5934\u554a\uff0c\u8fd9\u51e0\u4e2a\u4f60\u4e2d\u6709\u6211\uff0c\u6211\u4e2d\u6709\u4f60\uff0c\u4e0d\u6765\u56de\u4e2a 50 \u904d\u6839\u672c\u7406\u89e3\u4e0d\u4e86                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5387324\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : HeapOverflow <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4e00\u770b\u5c31\u662f\u6ca1\u88ab c++\u8650\u8fc7                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5387325\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : CatCode <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4f20\u9001\u95e8\uff1a<br \/>https:\/\/doc.rust-lang.org\/edition-guide\/rust-2018\/module-system\/path-clarity.html#no-more-modrs                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5387326\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : hunk <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u82b1\u4e86\u51e0\u5929\u65f6\u95f4\u770b rust \u548c go\uff0c\u51c6\u5907\u5148\u4ece go \u5b66\u8d77\u3002<br \/>\u6709\u4e2a\u9700\u8981\u5927\u5e76\u53d1\u7684\u9700\u6c42.                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5387327\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : palfortime <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             2018 \u53ef\u4ee5\u4e0d\u7528 mod.rs \u3002\u5199 mod xxx\uff0c\u6709\u4ec0\u4e48\u4e0d\u597d\uff0c\u8fd9\u6837\u66f4\u660e\u786e\u6e05\u6670\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5387328\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : fakeshadow <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u90a3\u5982\u679c\u8ba9\u4f60\u77e5\u9053\u4e86 pub(self\/super\/crate) \u662f\u4e0d\u662f\u4f1a\u66f4\u6293\u72c2\uff1f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5387329\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : syaka <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @palfortime \u6ca1\u53d1\u73b0\u4e00\u4e2a\u6587\u4ef6\u4f5c\u4e3a\u4e00\u4e2a mod \u6709\u4ec0\u4e48\u4f18\u70b9\uff0c\u73b0\u5728\u7684\u6a21\u5757\u5316\u8bed\u6cd5\u592a\u7e41\u7410\u4e86\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5387330\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : syaka <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @Thetruechar \u975e\u5f15\u6218\uff0c\u5b9e\u9645\u9879\u76ee\u4e2d\u5b9e\u5728\u7e41\u7410\u7684\u4e0d\u884c\uff0c\u66f4\u7406\u89e3\u4e0d\u4e86\u4e3a\u4ec0\u4e48\u4e00\u4e2a\u6587\u4ef6\u4f5c\u4e3a\u4e00\u4e2a mod \u6709\u4ec0\u4e48\u6536\u76ca\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5387331\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : syaka <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @GTim \u6240\u6709\u6743\u662f\u7cbe\u9ad3\uff0c\u4f46\u662f\u73b0\u5728\u7684\u6a21\u5757\u5316\u65b9\u6848\u771f\u7684\u662f\u7cdf\u7c95                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5387332\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : syaka <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @HeapOverflow \u8fd8\u771f\u662f\uff0c\u4eba\u751f\u82e6\u77ed\uff0c\u6211\u7528 Golang                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5387333\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : syaka <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @CatCode \u6211\u5df2\u7ecf\u660e\u767d\u4e86\u6a21\u5757\u5316\u662f\u600e\u4e48\u56de\u4e8b\uff0c\u53ea\u662f\u5b9e\u5728\u4e0d\u7406\u89e3\u5982\u6b64\u7e41\u7410\u7684\u8bbe\u8ba1\u6709\u4ec0\u4e48\u5fc5\u8981                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5387334\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : maxat20xx <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @GTim \u4e0d\u80fd\u540c\u610f\u66f4\u591a\u2026                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5387335\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : CatCode <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @syaka \u53ef\u80fd\u662f\u65e9\u671f\u7684\u8bbe\u8ba1\u5427\u3002\u800c\u5373\u4f7f\u5230\u4e86 2018 edition \u4e5f\u4e0d\u4fbf\u4e8e\u6539\u592a\u72e0\uff0c\u6bd5\u7adf\u517c\u5bb9\u6027\u8fd8\u662f\u8981\u8003\u8651\u7684\u3002<br \/>\u6709\u7684\u4e1c\u897f\uff0c\u5728\u65e9\u671f\u53ef\u80fd\u662f\u5f53\u65f6\u5f88\u597d\u7684\u8bbe\u8ba1\u3002\u4f46\u662f\u968f\u7740\u6280\u672f\u53d1\u5c55\uff0c\u66f4\u597d\u7684\u8bbe\u8ba1\u53ef\u80fd\u4f1a\u51fa\u73b0\uff0c\u7136\u540e\u5728\u5bf9\u6bd4\u539f\u6765\u7684\u8bbe\u8ba1\uff0c\u5c31\u53d1\u73b0\u539f\u6765\u7684\u8bbe\u8ba1\u4e0d\u662f\u90a3\u4e48\u7f8e\u597d\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5387336\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Jirajine <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u6211\u5230\u89c9\u5f97\u4e24\u8005\u6ca1\u592a\u5927\u4f18\u52a3\u4e4b\u5206\u3002<br \/>rust \u7684\u5355\u6587\u4ef6\u6a21\u5757\uff0c\u4e00\u4e2a\u6a21\u5757\u4ee3\u7801\u5f88\u591a\u7684\u65f6\u5019\u6587\u4ef6\u5c31\u4f1a\u592a\u957f\uff0c\u4e0d\u5f97\u4e0d\u5206\u6a21\u5757\u3002\u800c go \u5c31\u53ef\u4ee5\u7528\u591a\u4e2a\u6587\u4ef6\u5199\u540c\u4e00\u4e2a\u6a21\u5757\u3002<br \/>\u800c go \u7528\u76ee\u5f55\u5206\u6a21\u5757\uff0c\u6a21\u5757\u5f88\u591a\u4e00\u4e2a\u6a21\u5757\u4ee3\u7801\u5f88\u5c11\u7684\u65f6\u5019\u4e5f\u4f1a\u5f88\u9ebb\u70e6\uff0c\u5e76\u4e14\u6587\u4ef6\u540d\u4e0d\u4f53\u73b0\u6a21\u5757\u540d\u3002 <\/p>\n<p>\u4f46\u662f rust \u6574\u4e2a\u7684\u5305\u7ba1\u7406 crate \u7cfb\u7edf\u8981\u66f4\u597d\uff0clib \u7684\u5f52 lib\uff0cbin \u7684\u5f52 bin\uff0c\u6bd4 go \u90fd\u6df7\u5230\u4e00\u8d77\u66f4\u6e05\u6670\u3002                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5387337\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : plko345 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u559c\u6b22 rust\uff0c\u4f46\u8fd9\u70b9\u4e5f\u540c\u610f\u4e3b\u7684\u89c2\u70b9                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5387338\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : syaka <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @Jirajine go \u7528\u4e00\u4e2a\u76ee\u5f55\u4f5c\u4e3a\u4e00\u4e2a\u6a21\u5757\uff08\u548c Java \u4e00\u6837\uff09\uff0c\u4e00\u822c\u662f\u76ee\u5f55\u540d\u4f53\u73b0\u6a21\u5757\u540d\u3002<br \/>cargo \u662f\u5305\u7ba1\u7406\u5de5\u5177\uff0c\u8fd9\u4e00\u70b9\u786e\u5b9e\u6bd4 go modules \u597d\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>rust \u7684\u6a21\u5757\u5316\u592a\u7e41\u7410 \u8cc7\u6df1\u5927\u4f6c&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/374610"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=374610"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/374610\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=374610"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=374610"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=374610"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}