{"id":130624,"date":"2025-09-04T11:02:50","date_gmt":"2025-09-04T02:02:50","guid":{"rendered":"https:\/\/softantenna.com\/blog\/?p=130624"},"modified":"2025-09-04T11:02:50","modified_gmt":"2025-09-04T02:02:50","slug":"rust-windows-drivers","status":"publish","type":"post","link":"https:\/\/softantenna.com\/blog\/rust-windows-drivers\/","title":{"rendered":"Rust\u3067Windows\u30c9\u30e9\u30a4\u30d0\u30fc\u3092\u66f8\u304f\u6642\u4ee3\u304c\u59cb\u307e\u308b"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/softantenna.com\/blog\/wp-content\/uploads\/2024\/12\/pexels-photo-1301393.jpeg\" alt=\"\" width=\"1125\" height=\"750\" class=\"aligncenter size-full wp-image-126763\" \/><\/p>\n<p>Windows\u30c9\u30e9\u30a4\u30d0\u30fc\u958b\u767a\u3068\u3044\u3048\u3070C\/C++\u8a00\u8a9e\u304c\u5b9a\u756a\u3067\u3057\u305f\u304c\u3001Microsoft\u306f\u3053\u3053\u306bRust\u3092\u5c0e\u5165\u3057\u3088\u3046\u3068\u3057\u3066\u3044\u307e\u3059\u3002Microsoft\u306f\u30d6\u30ed\u30b0\u8a18\u4e8b\u300c<a href=\"https:\/\/techcommunity.microsoft.com\/blog\/windowsdriverdev\/towards-rust-in-windows-drivers\/4449718\">Towards Rust in Windows Drivers<\/a>\u300d\u3092\u516c\u958b\u3057\u3001Windows\u30c9\u30e9\u30a4\u30d0\u30fc\u5411\u3051\u306eRust\u306e\u73fe\u72b6\u304a\u3088\u3073\u5c06\u6765\u306e\u30d3\u30b8\u30e7\u30f3\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>Microsoft\u306fRust\u5c0e\u5165\u306e\u76ee\u7684\u3068\u3057\u3066\u3001<strong>\u30e1\u30e2\u30ea\u5b89\u5168\u6027\u306e\u5411\u4e0a\u3001\u30d0\u30b0\u306e\u524a\u6e1b\u3001\u305d\u3057\u3066\u3088\u308a\u4fdd\u5b88\u3057\u3084\u3059\u3044\u30b3\u30fc\u30c9\u30d9\u30fc\u30b9\u306e\u5b9f\u73fe<\/strong>\u3092\u3042\u3052\u3066\u3044\u307e\u3059\u3002Rust\u306f\u3001\u30b3\u30f3\u30d1\u30a4\u30eb\u6642\u306b\u30e1\u30e2\u30ea\u5b89\u5168\u6027\u3092\u4fdd\u8a3c\u3059\u308b\u305f\u3081\u3001\u30b7\u30b9\u30c6\u30e0\u30ec\u30d9\u30eb\u306e\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u306b\u9069\u3057\u305f\u8a00\u8a9e\u3060\u3068\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>Microsoft\u306f\u3001Surface\u30c1\u30fc\u30e0\u306e\u5148\u884c\u4e8b\u4f8b\u3092\u6d3b\u304b\u3057\u306a\u304c\u3089\u3001Rust\u3092Windows\u30c9\u30e9\u30a4\u30d0\u30fc\u958b\u767a\u306e\u300c\u7b2c\u4e00\u7d1a\u8a00\u8a9e\u300d\u306b\u3059\u308b\u53d6\u308a\u7d44\u307f\u3092\u59cb\u3081\u3066\u3044\u307e\u3059\u3002<\/p>\n<h2>windows-drivers-rs\uff1aRust\u3067\u30c9\u30e9\u30a4\u30d0\u30fc\u3092\u66f8\u304f\u305f\u3081\u306e\u30c4\u30fc\u30eb\u7fa4<\/h2>\n<p>Microsoft\u306fGitHub\u4e0a\u3067<a href=\"https:\/\/github.com\/microsoft\/windows-drivers-rs\/\"> windows-drivers-rs<\/a> \u3092\u516c\u958b\u3057\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30af\u30ec\u30fc\u30c8\u3092\u63d0\u4f9b\u3057\u3066\u3044\u307e\u3059: <\/p>\n<ul>\n<li>\n<p><span><code>wdk-build<\/code>\uff1aWDK\u3068\u306e\u30ea\u30f3\u30af\u3068Rust\u30d0\u30a4\u30f3\u30c7\u30a3\u30f3\u30b0\u751f\u6210<\/span><\/p>\n<\/li>\n<li>\n<p><span><code>wdk-sys<\/code>\uff1aFFI\u30d0\u30a4\u30f3\u30c7\u30a3\u30f3\u30b0\uff08\u81ea\u52d5\u751f\u6210\uff0b\u624b\u52d5\u30de\u30af\u30ed\uff09<\/span><\/p>\n<\/li>\n<li>\n<p><span><code>wdk<\/code>\uff1a\u5b89\u5168\u3067\u6163\u7528\u7684\u306aAPI\u30d0\u30a4\u30f3\u30c7\u30a3\u30f3\u30b0<\/span><\/p>\n<\/li>\n<li>\n<p><span><code>wdk-panic<\/code>, <code>wdk-alloc<\/code>, <code>wdk-macros<\/code>\uff1a\u30c9\u30e9\u30a4\u30d0\u30fc\u5411\u3051\u88dc\u52a9\u6a5f\u80fd<\/span><\/p>\n<\/li>\n<li>\n<p><span><code>cargo-wdk<\/code>\uff1aRust\u3067\u306e\u30c9\u30e9\u30a4\u30d0\u30fc\u958b\u767a\u3092\u7c21\u7d20\u5316\u3059\u308bCargo\u62e1\u5f35<\/span><\/p>\n<\/li>\n<\/ul>\n<p>\u3053\u308c\u3089\u3092\u4f7f\u3048\u3070\u3001WDM\u3001KMDF\u3001UMDF\u3068\u3044\u3063\u305f\u5f62\u5f0f\u306e\u30c9\u30e9\u30a4\u30d0\u30fc\u3092Rust\u3067\u66f8\u304d\u3001Windows 11\u4e0a\u3067\u52d5\u4f5c\u3055\u305b\u308b\u3053\u3068\u304c\u53ef\u80fd\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h2>cargo-wdk\uff1aRust\u7248Visual Studio\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8<\/h2>\n<p>\u5f93\u6765\u306eC\u30c9\u30e9\u30a4\u30d0\u30fc\u958b\u767a\u3067\u306fVisual Studio\u306e\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u304c\u6d3b\u7528\u3055\u308c\u3066\u3044\u307e\u3057\u305f\u3002Rust\u3067\u3082<code>cargo-wdk<\/code>\u304c\u540c\u69d8\u306e\u6a5f\u80fd\u3092\u63d0\u4f9b\u3057\u3001\u30b3\u30de\u30f3\u30c9\u4e00\u767a\u3067\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u4f5c\u6210\u304b\u3089\u30d3\u30eb\u30c9\u3001\u691c\u8a3c\u307e\u3067\u304c\u53ef\u80fd\u3068\u306a\u308a\u307e\u3059:<\/p>\n<pre>\r\ncargo wdk new --kmdf\r\ncargo wdk build\r\n<\/pre>\n<h2>unsafe\u304b\u3089safe Rust\u3078\uff1a\u5b89\u5168\u6027\u306e\u3055\u3089\u306a\u308b\u8ffd\u6c42<\/h2>\n<p>\u73fe\u6642\u70b9\u3067\u306f\u3001Windows\u30ab\u30fc\u30cd\u30eb\u3068\u306e\u3084\u308a\u53d6\u308a\u306b\u306f<code>unsafe Rust<\/code>\u304c\u5fc5\u8981\u3067\u3059\u304c\u3001Microsoft\u306f<code>safe Rust<\/code>\u306b\u3088\u308b\u62bd\u8c61\u5316\u3092\u9032\u3081\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>WDFWindows Driver Framework)\u5411\u3051\u306b\u5b89\u5168\u306aRust\u30d0\u30a4\u30f3\u30c7\u30a3\u30f3\u30b0\u3092\u8a2d\u8a08\u4e2d\u3067\u3001<code>LookasideList<T><\/code> \u306e\u3088\u3046\u306a\u69cb\u9020\u4f53\u306b\u5bfe\u3059\u308b\u5b89\u5168\u306a\u30e9\u30c3\u30d1\u30fc\u3082\u958b\u767a\u4e2d\u3067\u3059\u3002<\/p>\n<p>\u6700\u7d42\u7684\u306b\u306f\u3001\u3053\u308c\u3089\u306e\u30e9\u30c3\u30d1\u30fc\u3092 <code>crates.io<\/code> \u306b\u516c\u958b\u3057\u3001Rust\u30a8\u30b3\u30b7\u30b9\u30c6\u30e0\u306e\u4e00\u90e8\u3068\u3057\u3066\u63d0\u4f9b\u3059\u308b\u4e88\u5b9a\u3067\u3059\u3002<\/p>\n<h2>\u4eca\u5f8c\u306e\u5c55\u671b<\/h2>\n<p>Microsoft\u306f\u3001Rust\u3092\u4f7f\u3063\u305f\u30c9\u30e9\u30a4\u30d0\u30fc\u958b\u767a\u3092\u30bb\u30ad\u30e5\u30a2\u3067\u4fe1\u983c\u6027\u306e\u9ad8\u3044\u6a19\u6e96\u624b\u6cd5\u306b\u3059\u308b\u3053\u3068\u3092\u76ee\u6307\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u4eca\u5f8c\u306fWHCP\u306e\u63d0\u51fa\u65b9\u6cd5\u3084\u3001CodeQL\u306b\u3088\u308b\u9759\u7684\u89e3\u6790\u306e\u65b9\u6cd5\u3001\u30d9\u30b9\u30c8\u30d7\u30e9\u30af\u30c6\u30a3\u30b9\u96c6\u306a\u3069\u306e\u60c5\u5831\u3092\u63d0\u4f9b\u3059\u308b\u4e88\u5b9a\u3067\u3059\u3002<\/p>\n<p>Rust\u306b\u3088\u308b\u30c9\u30e9\u30a4\u30d0\u30fc\u958b\u767a\u306f\u3001\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u3068\u4fdd\u5b88\u6027\u306e\u4e21\u9762\u3067\u5927\u304d\u306a\u9032\u5316\u3092\u3082\u305f\u3089\u3059\u4e8b\u304c\u671f\u5f85\u3055\u308c\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Windows\u30c9\u30e9\u30a4\u30d0\u30fc\u958b\u767a\u3068\u3044\u3048\u3070C\/C++\u8a00\u8a9e\u304c\u5b9a\u756a\u3067\u3057\u305f\u304c\u3001Microsoft\u306f\u3053\u3053\u306bRust\u3092\u5c0e\u5165\u3057\u3088\u3046\u3068\u3057\u3066\u3044\u307e\u3059\u3002Microsoft\u306f\u30d6\u30ed\u30b0\u8a18\u4e8b\u300cTowards Rust in Windows Drivers [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":126763,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"swell_btn_cv_data":"","footnotes":""},"categories":[3],"tags":[],"class_list":["post-130624","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-windows"],"_links":{"self":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/posts\/130624","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/comments?post=130624"}],"version-history":[{"count":0,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/posts\/130624\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/media\/126763"}],"wp:attachment":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/media?parent=130624"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/categories?post=130624"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/tags?post=130624"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}