{"id":271488,"date":"2023-05-13T09:00:12","date_gmt":"2023-05-13T01:00:12","guid":{"rendered":"https:\/\/lrxjmw.cn\/?p=271488"},"modified":"2023-05-08T17:00:39","modified_gmt":"2023-05-08T09:00:39","slug":"xrxjzqdlzyqk","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/xrxjzqdlzyqk.html","title":{"rendered":"\u5acc Rust \u5c0f\u5bb6\u5b50\u6c14\uff0c\u5927\u4f6c\u7ec8\u4e8e\u5f03\u5751\u4e86\uff01 \u8bd1\u6587 \u7cbe\u9009"},"content":{"rendered":"
\u5bfc\u8bfb<\/td>\n | \u591a\u5e74\u6765\uff0c\u6211\u4e00\u76f4\u5728\u53c2\u4e0e Rust \u548c Rust \u793e\u533a\u3002\u6211\u7684\u5927\u90e8\u5206\u5de5\u4f5c\u90fd\u4e0e\u521b\u5efa\u7528\u4e8e\u5728 Rust \u4e2d\u6784\u5efa GUI \u5de5\u5177\u5305\u7684\u57fa\u7840\u8bbe\u65bd\u6709\u5173\u3002\u7136\u800c\uff0c\u6211\u53d1\u73b0\u6211\u5bf9\u8fd9\u79cd\u8bed\u8a00\u8d8a\u6765\u8d8a\u5931\u671b\uff0c\u6211\u73b0\u5728\u592a\u6e34\u671b C++ \u7684\u7a33\u5b9a\u4e0e\u6210\u719f\u4e86\uff01<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n 1\u3001\u6784\u5efa\u7cfb\u7edf\uff1aRust \u751f\u6001\u5c0f\u5bb6\u5b50\u6c14<\/strong><\/div>\n Rust \u751f\u6001\u7cfb\u7edf\u7684\u5c40\u9650\u6027\u4e4b\u4e00\u662f Cargo \u6784\u5efa\u7cfb\u7edf\u548c\u5305\u7ba1\u7406\u5668\u7684\u8fd1\u4e4e\u5355\u4e00\u6587\u5316\u3002\u867d\u7136\u5728\u67d0\u79cd\u7a0b\u5ea6\u4e0a\u4f7f\u7528\u4e86\u5176\u4ed6\u6784\u5efa\u7cfb\u7edf\uff08\u5305\u62ec\u96c6\u6210\u5230\u66f4\u5927\u7684\u591a\u8bed\u8a00\u9879\u76ee\u65f6\u7684Bazel\uff09\uff0c\u4f46\u5b83\u4eec\u5e76\u6ca1\u6709\u5f97\u5230\u5de5\u5177\u7684\u5f88\u597d\u652f\u6301\u3002<\/p>\n \u76f8\u6bd4\u4e4b\u4e0b\uff0c\u5728 C++ \u4e2d\uff0c\u6784\u5efa\u7cfb\u7edf\u6709\u5f88\u591a\u9009\u62e9\uff0c\u5141\u8bb8\u6bcf\u4e2a\u5f00\u53d1\u4eba\u5458\u9009\u62e9\u6700\u9002\u5408\u4ed6\u4eec\u9700\u8981\u7684\u4e00\u4e2a\u3002\u4e00\u4e2a\u975e\u5e38\u5e38\u89c1\u7684\u9009\u62e9\u662f CMake\uff08CMake\u662f\u4e00\u4e2a\u5f00\u6e90\u3001\u8de8\u5e73\u53f0\u7684\u5de5\u5177\u7cfb\u5217\uff0c\u65e8\u5728\u6784\u5efa\u3001\u6d4b\u8bd5\u548c\u6253\u5305\u8f6f\u4ef6\uff0c\u901a\u5e38\u7528\u4e8e\u4f7f\u7528\u7b80\u5355\u7684\u5e73\u53f0\u548c\u7f16\u8bd1\u5668\u72ec\u7acb\u7684\u914d\u7f6e\u6587\u4ef6\u63a7\u5236\u8f6f\u4ef6\u7f16\u8bd1\u8fc7\u7a0b\uff09\uff0c\u4f46\u4e5f\u6709 Meson\u3001Blaze \u53ca\u5176\u53d8\u4f53\uff0c\u5f53\u7136\u4e5f\u603b\u662f\u53ef\u4ee5\u6c42\u52a9\u4e8e Autotools \u5e76\u8fdb\u884c\u5236\u4f5c\u3002\u5982\u679c\u6211\u4eec\u8981\u7f16\u8bd1 AIX \u548c DEC OSF\/1 AXP \u7b49 Unix \u7cfb\u7edf\uff0c\u540e\u8005\u5c24\u5176\u6709\u7528\u3002\u5982\u679c\u8fd9\u4e9b\u90fd\u4e0d\u591f\uff0c\u8fd8\u6709\u5f88\u591a\u5176\u4ed6\u9009\u62e9\uff0c\u5305\u62ec SCons\uff0c\u6beb\u65e0\u7591\u95ee\uff0c\u6211\u4eec\u4f1a\u5b9a\u671f\u521b\u5efa\u65b0\u7684\u9009\u62e9\u3002<\/p>\n \u6211\u4eec\u8fd8\u6ca1\u6709\u4e3a Linebender \u9879\u76ee\u786e\u5b9a\u6784\u5efa\u7cfb\u7edf\uff0c\u4f46\u5f88\u53ef\u80fd\u662f CMake\uff0c\u5e76\u8ba1\u5212\u8bc4\u4f30\u5176\u4ed6\u7cfb\u7edf\u548c\u8fc1\u79fb\uff0c\u4e5f\u8bb8\u662f Meson\u3002<\/p>\n <\/p>\n Linebender\uff1a\u5305\u542b\u8bb8\u591a\u8bf8\u5982druid\u3001xilem\u7b49\u8bb8\u591a\u6d41\u884c\u7684Rust\u5b58\u50a8\u5e93\u3002<\/p>\n 2\u3001\u5b89\u5168\uff1a\u4e09\u4e2a\u539f\u56e0\u653e\u5f03Rust<\/strong><\/div>\n \u8fd9\u4e00\u53d8\u5316\u6700\u5177\u4e89\u8bae\u7684\u65b9\u9762\u53ef\u80fd\u662f\u653e\u5f03\u4e86 Rust \u8bed\u8a00\u7684\u5b89\u5168\u4fdd\u8bc1\u3002\u4f46\u662f\uff0c\u51fa\u4e8e\u4e09\u4e2a\u539f\u56e0\uff0c\u6211\u8ba4\u4e3a\u8fd9\u5728\u5b9e\u8df5\u4e2d\u4e0d\u4f1a\u6210\u4e3a\u5927\u95ee\u9898\u3002<\/p>\n \u9996\u5148\uff0c\u6211\u8ba4\u4e3a\u81ea\u5df1\u662f\u4e00\u4e2a\u8db3\u591f\u4f18\u79c0\u7684\u7a0b\u5e8f\u5458\uff0c\u6211\u53ef\u4ee5\u907f\u514d\u7f16\u5199\u6709\u5b89\u5168\u95ee\u9898\u7684\u4ee3\u7801\u3002\u5f53\u7136\uff0c\u6211\u66fe\u8d1f\u8d23\u8fc7\u4e00\u4e9b CVE\uff08\u5305\u62ecAndroid \u4e2d\u7684\u5b57\u4f53\u89e3\u6790\u4ee3\u7801\uff09\uff0c\u4f46\u6211\u4ece\u90a3\u6b21\u7ecf\u5386\u4e2d\u5438\u53d6\u4e86\u6559\u8bad\uff0c\u5e76\u4e14\u6709\u4fe1\u5fc3\u5728\u672a\u6765\u907f\u514d\u6b64\u7c7b\u9519\u8bef\u3002<\/p>\n \u5176\u6b21\uff0c\u6211\u8ba4\u4e3a\u5185\u5b58\u5b89\u5168\u95ee\u9898\u7684\u5371\u9669\u88ab\u5938\u5927\u4e86\u3002Linebender \u9879\u76ee\u4e3b\u8981\u5173\u6ce8 2D \u56fe\u5f62\uff0c\u90e8\u5206\u662f\u6e38\u620f\uff0c\u90e8\u5206\u662f\u7528\u4e8e\u521b\u5efa GUI \u5e94\u7528\u7a0b\u5e8f\u7684\u7ec4\u4ef6\u3002\u5982\u679c GUI \u7a0b\u5e8f\u5d29\u6e83\uff0c\u4e5f\u6ca1\u4ec0\u4e48\u5927\u4e0d\u4e86\u7684\u3002\u5982\u679c\u9519\u8bef\u662f\u7531\u4e8e\u6211\u4eec\u7528\u4f5c\u4f9d\u8d56\u9879\u7684\u5e93\u5f15\u8d77\u7684\uff0c\u6211\u4eec\u7684\u5ba2\u6237\u4f1a\u660e\u767d\u8fd9\u4e0d\u662f\u6211\u4eec\u7684\u9519\u3002\u5185\u5b58\u5b89\u5168\u9519\u8bef\u4e0e\u903b\u8f91\u9519\u8bef\u548c\u5176\u4ed6\u9519\u8bef\u6ca1\u6709\u6839\u672c\u533a\u522b\uff0c\u6211\u4eec\u53ea\u4f1a\u5728\u5b83\u4eec\u51fa\u73b0\u65f6\u4fee\u590d\u5b83\u4eec\u3002<\/p>\n \u7b2c\u4e09\uff0cC++ \u8bed\u8a00\u6b63\u5728\u5411\u66f4\u5b89\u5168\u7684\u65b9\u5411\u53d1\u5c55\u3002\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528\u73b0\u4ee3 C++ \u6280\u672f\u6765\u907f\u514d\u539f\u59cb\u6307\u9488\u7684\u8bb8\u591a\u5371\u9669\uff08\u5c3d\u7ba1\u5b57\u7b26\u4e32\u89c6\u56fe\u53ef\u4ee5\u6bd4\u5b83\u4eec\u7684\u652f\u6301\u5b57\u7b26\u4e32\u66f4\u957f\u5bff\uff0c\u5e76\u4e14 UI \u4e2d\u4f7f\u7528\u7684\u95ed\u5305\u53ef\u4ee5\u6709\u975e\u5e38\u6709\u8da3\u7684\u751f\u547d\u5468\u671f\u6a21\u5f0f\uff09\u3002C++ \u6838\u5fc3\u6307\u5357\u5f88\u6709\u7528\uff0c\u5373\u4f7f\u5b83\u4eec\u5728\u8fdd\u89c4\u4e2d\u53d7\u5230\u5c0a\u91cd\u3002\u800c\u4e14\uff0c\u6b63\u5982\u4e0b\u4e00\u8282\u6240\u8ba8\u8bba\u7684\uff0c\u8bed\u8a00\u672c\u8eab\u6709\u671b\u5f97\u5230\u6539\u8fdb\u3002<\/p>\n 3\u3001\u8bed\u8a00\u6f14\u5316\uff1aRust\u6ca1\u6709\u6839\u672c\u6027\u7684\u65b0\u529f\u80fd<\/strong><\/div>\n C++ \u7684\u4e00\u4e2a\u663e\u7740\u7279\u5f81\u662f\u65b0\u529f\u80fd\u7684\u5feb\u901f\u91c7\u7528\uff0c\u73b0\u5728\u6bcf 3 \u5e74\u6709\u4e00\u4e2a\u65b0\u7248\u672c\u3002C++20 \u4e3a\u6211\u4eec\u5e26\u6765\u4e86\u6a21\u5757\uff0c\u8fd9\u662f\u4e00\u9879\u521b\u65b0\u7684\u65b0\u529f\u80fd\uff0c\u6211\u671f\u5f85\u7740\u5f88\u5feb\u5c31\u80fd\u771f\u6b63\u5b9e\u73b0\u8fd9\u4e00\u529f\u80fd\u3002\u5c55\u671b\u672a\u6765\uff0cC++26 \u53ef\u80fd\u4f1a\u62e5\u6709\u5806\u6808\u534f\u7a0b\u3001\u5d4c\u5165\u4e8c\u8fdb\u5236\u6587\u4ef6\u5185\u5bb9\u4ee5\u521d\u59cb\u5316\u6570\u7ec4\u7684\u80fd\u529b\u3001\u5b89\u5168\u7684\u57fa\u4e8e\u8303\u56f4\u7684 for \u5faa\u73af\uff0c\u4ee5\u53ca\u8bb8\u591a\u5176\u4ed6\u597d\u4e1c\u897f\u3002<\/p>\n \u76f8\u6bd4\u4e4b\u4e0b\uff0cRust \u7684\u521b\u65b0\u6b65\u4f10\u53d8\u5f97\u66f4\u52a0\u7a33\u5065\u3002\u5b83\u66fe\u7ecf\u975e\u5e38\u5feb\u901f\uff0c\u5e76\u4e14\u5f02\u6b65\u4e00\u76f4\u662f\u4e00\u9879\u91cd\u5927\u52aa\u529b\uff0c\u4f46\u6700\u8fd1\u767b\u9646\u7684\u7279\u6027\uff08\u4f8b\u5982\u901a\u7528\u5173\u8054\u7c7b\u578b\uff09\u66f4\u50cf\u662f\u4f7f\u73b0\u6709\u7279\u6027\u7684\u7ec4\u5408\u6309\u9884\u671f\u5de5\u4f5c\uff0c\u800c\u4e0d\u662f\u5e26\u6765\u4efb\u4f55\u6839\u672c\u6027\u7684\u65b0\u529f\u80fd\uff1b\u5373\u5c06\u63a8\u51fa\u7684\u201ctype alias impl trait\u201d\u4e0e\u4e4b\u7c7b\u4f3c\u3002\u5728\u8fd9\u91cc\uff0c\u5f88\u660e\u663e\uff0cRust \u56e0\u627f\u8bfa\u4e0d\u7834\u574f\u73b0\u6709\u4ee3\u7801\uff08\u7531\u7248\u672c\u673a\u5236\u5236\u5b9a\uff09\u800c\u53d7\u963b\uff0c\u800c C++\u00a0\u53ef\u4ee5\u81ea\u7531\u5730\u5728\u6bcf\u4e2a\u65b0\u7248\u672c\u4e2d\u5b9e\u73b0\u5411\u540e\u517c\u5bb9\u6027\u7834\u574f\u6027\u66f4\u6539\u3002<\/p>\n C++ \u6709\u66f4\u4ee4\u4eba\u5174\u594b\u7684\u53d8\u5316\u503c\u5f97\u671f\u5f85\uff0c\u5305\u62ec Herb Sutter cppfront \u63d0\u51fa\u7684\u6f5c\u5728\u65b0\u8bed\u6cd5\uff0c\u751a\u81f3\u662f\u65b0\u7684 C++ \u517c\u5bb9 Carbon \u8bed\u8a00\u3002<\/p>\n \u5e78\u8fd0\u7684\u662f\uff0c\u6211\u4eec\u5728 C++ \u793e\u533a\u4e2d\u62e5\u6709\u51fa\u8272\u7684\u9886\u5bfc\u80fd\u529b\u3002C++ \u4e4b\u7236 Stroustrup \u5173\u4e8e\u5b89\u5168\u7684\u8bba\u6587\u300aA call to action: Think seriously about \u201csafety\u201d; then do something sensible about it \u300b\u662f\u4e00\u4efd\u975e\u5e38\u503c\u5f97\u4e00\u8bfb\u7684\u6587\u6863\uff0c\u663e\u793a\u51fa\u5bf9 C++ \u9762\u4e34\u7684\u95ee\u9898\u7684\u6df1\u523b\u7406\u89e3\uff0c\u5e76\u63d0\u51fa\u4e86\u4e00\u4e2a\u5f15\u4eba\u6ce8\u76ee\u7684\u672a\u6765\u8def\u7ebf\u56fe\u3002<\/p>\n <\/p>\n C++\u4e4b\u7236\u53bb\u5e7412\u67086\u65e5\u53d1\u8868\u6709\u5173\u5b89\u5168\u7684\u6587\u7ae0<\/p>\n 4\u3001\u793e\u533a\uff1aRust \u793e\u533a\u6709\u70b9\u4e13\u6a2a<\/strong><\/div>\n \u6211\u5c06\u4ee5\u5173\u4e8e\u793e\u533a\u7684\u4e00\u4e9b\u60f3\u6cd5\u4f5c\u4e3a\u7ed3\u675f\u3002\u6211\u5c3d\u91cf\u4e0d\u82b1\u592a\u591a\u65f6\u95f4\u5728\u793e\u4ea4\u5a92\u4f53\u4e0a\uff0c\u4f46\u6211\u542c\u8bf4 Rust \u793e\u533a\u53ef\u80fd\u975e\u5e38\u4e13\u6a2a\uff0c\u4e0d\u65ad\u8981\u6c42\u7528 Rust \u91cd\u5199\u9879\u76ee\uff0c\u5e76\u8bcb\u6bc1\u6240\u6709\u5176\u4ed6\u7f16\u7a0b\u8bed\u8a00\u3002\u6211\u4f1a\u5f88\u9ad8\u5174\u6446\u8131\u5b83\uff0c\u5e76\u4e14\u76f8\u4fe1 C++ \u793e\u533a\u4f1a\u66f4\u597d\u3001\u66f4\u53cb\u597d\u3002\u7279\u522b\u662f\uff0cC++ subreddit \u4ee5\u5176\u5e7d\u9ed8\u611f\u800c\u95fb\u540d\u3002<\/p>\n Rust \u793e\u533a\u8fd8\u4ee5\u5176\u884c\u4e3a\u51c6\u5219\u548c\u5176\u4ed6\u4fc3\u8fdb\u591a\u6837\u6027\u7684\u653f\u7b56\u800c\u95fb\u540d\u3002\u6211\u575a\u4fe1\u7f16\u7a0b\u8bed\u8a00\u5e94\u8be5\u4e0d\u53d7\u653f\u6cbb\u5f71\u54cd\uff0c\u4e25\u683c\u5173\u6ce8\u6280\u672f\u672c\u8eab\u3002\u5728\u8ba1\u7b97\u673a\u79d1\u5b66\u9886\u57df\uff0c\u6211\u4eec\u5df2\u7ecf\u8d85\u8d8a\u4e86\u504f\u89c1\u548c\u6b67\u89c6\u3002\u6211\u7406\u89e3\u67d0\u4e9b\u8eab\u4efd\u7fa4\u4f53\u53ef\u80fd\u5e0c\u671b\u83b7\u5f97\u66f4\u591a\u4ee3\u8868\u6743\uff0c\u4f46\u6211\u8ba4\u4e3a\u6ca1\u6709\u5fc5\u8981\u3002<\/p>\n 5\u3001\u7ed3\u8bba<\/strong><\/div>\n Rust \u662f\u4e00\u4e2a\u5f88\u597d\u7684\u5b9e\u9a8c\uff0c\u6709\u4e9b\u65b9\u9762\u6211\u4f1a\u6df1\u60c5\u5730\u56de\u987e\uff0c\u4f46\u73b0\u5728\u662f\u65f6\u5019\u5c06 Linebender \u9879\u76ee\u53d8\u6210\u4e00\u79cd\u6210\u719f\u7684\u3001\u751f\u4ea7\u5c31\u7eea\u7684\u8bed\u8a00\u4e86\u3002\u6211\u671f\u5f85\u4e0e C++ \u793e\u533a\u4e2d\u7684\u5176\u4ed6\u4eba\u8fdb\u884c\u5bcc\u6709\u6210\u6548\u7684\u534f\u4f5c\u3002\u6211\u4eec\u6b63\u5728\u5bfb\u627e\u5e2e\u52a9 C++ \u91cd\u5199\u7684\u4eba\u3002<\/p>\n","protected":false},"excerpt":{"rendered":" Rust \u751f\u6001\u7cfb\u7edf\u7684\u5c40\u9650\u6027\u4e4b\u4e00\u662f Cargo \u6784\u5efa\u7cfb\u7edf\u548c\u5305\u7ba1\u7406\u5668\u7684\u8fd1\u4e4e\u5355\u4e00\u6587\u5316\u3002\u867d\u7136\u5728\u67d0\u79cd\u7a0b\u5ea6\u4e0a\u4f7f\u7528\u4e86\u5176\u4ed6\u6784\u5efa […]<\/p>\n","protected":false},"author":309,"featured_media":271500,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[21],"tags":[],"class_list":["post-271488","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-news"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/271488","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/309"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=271488"}],"version-history":[{"count":3,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/271488\/revisions"}],"predecessor-version":[{"id":271714,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/271488\/revisions\/271714"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/271500"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=271488"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=271488"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=271488"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}} |