[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-0-en-105":3,"doc-seo-786517-105":59,"doc-similar-786517":130,"doc-detail-786517-en":195},{"code":4,"msg":5,"data":6},0,"success",[7,13,18,23,28,33,38,43,48,51,55],{"id":8,"doc_module":4,"doc_module_name":9,"category_name":10,"show_sort_weight":11,"slug":12},1,"Document","Story & Novel",90,"story-novel",{"id":14,"doc_module":4,"doc_module_name":9,"category_name":15,"show_sort_weight":16,"slug":17},2,"Literature",80,"literature",{"id":19,"doc_module":4,"doc_module_name":9,"category_name":20,"show_sort_weight":21,"slug":22},4,"Exam",70,"exam",{"id":24,"doc_module":4,"doc_module_name":9,"category_name":25,"show_sort_weight":26,"slug":27},5,"Comic",60,"comic",{"id":29,"doc_module":4,"doc_module_name":9,"category_name":30,"show_sort_weight":31,"slug":32},6,"Technology",50,"technology",{"id":34,"doc_module":4,"doc_module_name":9,"category_name":35,"show_sort_weight":36,"slug":37},7,"Healthcare",40,"healthcare",{"id":39,"doc_module":4,"doc_module_name":9,"category_name":40,"show_sort_weight":41,"slug":42},8,"Research & Report",30,"research-report",{"id":44,"doc_module":4,"doc_module_name":9,"category_name":45,"show_sort_weight":46,"slug":47},9,"Religion & Spirituality",20,"religion-spirituality",{"id":46,"doc_module":4,"doc_module_name":9,"category_name":49,"show_sort_weight":46,"slug":50},"World Cup","world-cup",{"id":52,"doc_module":4,"doc_module_name":9,"category_name":53,"show_sort_weight":52,"slug":54},10,"Lifestyle","lifestyle",{"id":56,"doc_module":4,"doc_module_name":9,"category_name":57,"show_sort_weight":24,"slug":58},19,"General","general",{"code":4,"msg":60,"data":61},"ok",{"site_id":62,"language":63,"slug":64,"title":65,"keywords":66,"description":67,"schema_data":68,"social_meta":123,"head_meta":125,"extra_data":127,"updated_unix":129},105,"en","anssi-guide-programming-rules-to-develop-secure-applications-with-rust-v10","ANSSI Guide - Programming Rules to Develop Secure Applications with Rust - v1.0","","ANSSI’s guidance presents secure Rust development practices built around ownership, static typing, and memory safety. It covers toolchains, Cargo utilities, library auditing, unsafe code, integer overflow, errors, memory handling, type-system traits, and foreign-function interfaces. Developers, administrators, IT security managers, IT managers, and users are identified as readers. Recommendations reflect threats known at publication and require validation for the target system. The English courtesy translation was released under the Open Licence in 2020.",{"@graph":69,"@context":122},[70,84,105],{"@type":71,"itemListElement":72},"BreadcrumbList",[73,77,79,82],{"item":74,"name":75,"@type":76,"position":8},"https://docshare.wps.com","Home","ListItem",{"item":78,"name":9,"@type":76,"position":14},"https://docshare.wps.com/document/",{"item":80,"name":30,"@type":76,"position":81},"https://docshare.wps.com/document/technology/",3,{"item":83,"name":65,"@type":76,"position":19},"https://docshare.wps.com/document/anssi-guide-programming-rules-to-develop-secure-applications-with-rust-v10/786517/",{"url":83,"name":65,"@type":85,"image":86,"author":91,"headline":65,"publisher":94,"fileFormat":97,"inLanguage":63,"description":67,"dateModified":98,"datePublished":99,"encodingFormat":97,"isAccessibleForFree":100,"interactionStatistic":101},"DigitalDocument",{"url":87,"@type":88,"width":89,"height":90},"https://docshare.wps.com/thumbnails/anssi-guide-programming-rules-to-develop-secure-applications-with-rust-v10/786517.png","ImageObject",300,407,{"name":92,"@type":93},"Cassie Morgan","Person",{"url":74,"name":95,"@type":96},"DocShare","Organization","application/pdf","2026-12-05","2026-12-04",true,{"@type":102,"interactionType":103,"userInteractionCount":8},"InteractionCounter",{"@type":104},"ViewAction",{"@type":106,"mainEntity":107},"FAQPage",[108,114,118],{"name":109,"@type":110,"acceptedAnswer":111},"What is the guidance intended to help developers do?","Question",{"text":112,"@type":113},"It presents recommendations for developing secure applications with Rust, with a focus on memory safety and reducing security risks.","Answer",{"name":115,"@type":110,"acceptedAnswer":116},"Which Rust topics are covered?",{"text":117,"@type":113},"The guidance covers development tools, libraries, language features, error handling, memory management, type-system traits, and foreign-function interfaces.",{"name":119,"@type":110,"acceptedAnswer":120},"Who is the intended audience?",{"text":121,"@type":113},"The listed audience includes developers, administrators, IT security managers, IT managers, and users.","https://schema.org",{"og:url":83,"og:type":124,"og:title":65,"og:site_name":95,"og:description":67},"article",{"robots":126,"canonical":83},"index,follow",{"doc_id":128,"site_id":62},786517,1796427840,{"list":131,"token":66},[132,140,147,153,159,165,171,177,183,189],{"doc_id":133,"doc_title":134,"file_type":135,"home_preview_img_url":136,"slug":137,"view_count":138,"category_name":30,"create_tm":139},81484,"Ruby: Unmasking Unsafe Rust in Stripped Binaries via Machine Learning","pdf","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229808447815/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796585159&Signature=a%2Fb%2BOBB9LRcytl9EiIG2sjnyWMI%3D","ruby-unmasking-unsafe-rust-in-stripped-binaries-via-machine-learning",22,1784173738,{"doc_id":141,"doc_title":142,"file_type":135,"home_preview_img_url":143,"slug":144,"view_count":145,"category_name":30,"create_tm":146},646208,"x86-64 Assembly Language Programming with Ubuntu - 1.1.28 - January 2019","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229971799316/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796585159&Signature=oSi8g7zpobodMACQcjnr35zRl%2Bk%3D","x86-64-assembly-language-programming-with-ubuntu-1128-january-2019",11,1792753408,{"doc_id":148,"doc_title":149,"file_type":135,"home_preview_img_url":150,"slug":151,"view_count":34,"category_name":30,"create_tm":152},682650,"Matplotlib - Release 3.11.2 - Documentation and Installation Guide","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229999675034/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796585159&Signature=u954s6XdxuDkUHK%2FpMF8AxGye%2FM%3D","matplotlib-release-3112-documentation-and-installation-guide",1793977317,{"doc_id":154,"doc_title":155,"file_type":135,"home_preview_img_url":156,"slug":157,"view_count":52,"category_name":30,"create_tm":158},655765,"UML basics: The class diagram - Part 1 - An introduction to the Unified Modeling Language","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229974776656/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796585159&Signature=%2F%2BdYcrEMd3NUXW%2F57ocUMcC%2Feco%3D","uml-basics-the-class-diagram-part-1-an-introduction-to-the-unified-modeling-language",1792963653,{"doc_id":160,"doc_title":161,"file_type":135,"home_preview_img_url":162,"slug":163,"view_count":8,"category_name":30,"create_tm":164},786500,"Windows NT File System Internals","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230057398841/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796585159&Signature=bUaqAU%2FRzyITm9wSVaQ%2B2D7zXj8%3D","windows-nt-file-system-internals",1796427640,{"doc_id":166,"doc_title":167,"file_type":135,"home_preview_img_url":168,"slug":169,"view_count":14,"category_name":30,"create_tm":170},786481,"TsiLang - Users Guide","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230057395265/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796585159&Signature=e5Z%2BqqKfit4ENjxgLxpeGOR1AI4%3D","tsilang-users-guide",1796427239,{"doc_id":172,"doc_title":173,"file_type":135,"home_preview_img_url":174,"slug":175,"view_count":36,"category_name":30,"create_tm":176},117655,"Best of Bash 2026 Edition - Unsung Tools for the Shell - Going Deeper","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229834701874/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796585159&Signature=nr9CgnOzMZxO%2B%2FsbOoeJYGy%2FrI0%3D","best-of-bash-2026-edition-unsung-tools-for-the-shell-going-deeper",1785678010,{"doc_id":178,"doc_title":179,"file_type":135,"home_preview_img_url":180,"slug":181,"view_count":19,"category_name":30,"create_tm":182},688530,"The Ultimate Windows Run Commands List - Tricks","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230000659130/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796585159&Signature=TJ7L2zuj3kaNLotqApiYiW8jN5A%3D","the-ultimate-windows-run-commands-list-tricks",1794089527,{"doc_id":184,"doc_title":185,"file_type":135,"home_preview_img_url":186,"slug":187,"view_count":24,"category_name":30,"create_tm":188},689872,"STM32F10xxx Reference Manual - Application Developers - Memory and Peripherals","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230001421400/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796585159&Signature=tzddV2A%2FuBjnvJj7wWucJLXOkXY%3D","stm32f10xxx-reference-manual-application-developers-memory-and-peripherals",1794130201,{"doc_id":190,"doc_title":191,"file_type":135,"home_preview_img_url":192,"slug":193,"view_count":19,"category_name":30,"create_tm":194},682081,"Guidance - Password security - Password guide for IT users, developers, administrators and senior management","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229998419391/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796585159&Signature=Ibzlqic%2BvcNy%2BoYJlhUYqTxWbwU%3D","guidance-password-security-password-guide-for-it-users-developers-administrators-and-senior-management",1793959361,{"code":4,"msg":5,"data":196},{"doc_id":128,"user_id":197,"nickname":92,"user_avatar":198,"doc_module":4,"category_id":29,"category_name":30,"doc_title":65,"doc_description":67,"doc_content":199,"file_id":200,"file_url":201,"file_type":135,"file_size":202,"view_count":8,"is_deleted":4,"is_public":8,"is_downloadable":8,"audit_status":8,"page_count":203,"language":204,"language_code":63,"site_id":62,"html_lang":63,"table_of_contents":205,"faqs":206,"seo_title":207,"seo_description":67,"update_tm":129,"read_time":208,"preview_page_count":24,"preview_urls":209},1649274592216,"https://us-avatar.wpscdn.com/davatar_085a072bc5b1113ac321206ff7593b45","PROGRAMMING RULES TO DEVELOP SECURE APPLICATIONS WITH RUST  \nANSSI GUIDELINES  \nTARGETED AUDIENCE:  \nDevelop   \ners Administrators IT security managers IT managers Users  \nANSSI-PA-074-EN  \n06/09/2020  \nInformation  \nWarning  \nThis document, written by the ANSSI, presents the“Programming Rules to Develop Secure Applications with Rust”. It is freely available at [www.ssi.gouv.fr/en/](www.ssi.gouv.fr/en/). It is an original creation from the ANSSI and it is placed under the “Open Licence” published by the Etalab mission ([www.etalab.gouv.fr](www.etalab.gouv.fr)). Consequently, its diﬀusion is unlimited and unrestricted. This document is a courtesy translation of the initial French document “Titre non déﬁni”, [available at](available at www.ssi.gouv.fr. In case of)[ www.ssi.gouv.fr](available at www.ssi.gouv.fr. In case of)[. In case of](available at www.ssi.gouv.fr. In case of) conﬂicts between these two documents, the latter is considered as the only reference.  \nThese recommendations are provided as is and are related to threats known at the publication time. Considering the information systems diversity, the ANSSI cannot guarantee direct application of these recommendations on targeted information systems. Applying the following recommendations shall be, at ﬁrst, validated by IT administrators and/or IT security managers.  \nDocument changelog:  \n\n| VERSION | DATE | CHANGELOG |\n| --- | --- | --- |\n| 1.0 | 06/09/2020 | Initial version |\n\nPROGRAMMING RULES TO DEVELOP SECURE APPLICATIONS WITH RUST – 1  \nContents  \n1 Introduction 4  \n1.1 Target Audience ....................................... 4  \n1.2 Contributions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5  \n1.3 Structure of the Document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5  \n2 Development environment 6  \n2.1 Rustup ............................................. 6  \n2.1. 1 Rust Editions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6  \n2.1.2 Stable, nightly and beta toolchains ......................... 6  \n2.2 Cargo .............................................. 7  \n2.2.1 Clippy ......................................... 8  \n2.2.2 Rustfmt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9  \n2.2.3 Rustﬁx . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10  \n2.2.4 Others . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10  \n3 Libraries 11  \n3.1 Cargo-outdated ........................................ 11  \n3.2 Cargo-audit .......................................... 11  \n4 Language generalities 12  \n4.1 Naming ............................................ 12  \n4.2 Unsafe code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12  \n4.3 Integer overﬂows ....................................... 13  \n4.4 Error handling ........................................ 14  \n4.4. 1 Panics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14  \n4.4.2 FFI and panics ..................................... 15  \n5 Memory management 16  \n5.1 Forget and memory leaks .................................. 16  \n5.2 Uninitialized memory .................................... 18  \n5.3 Secure memory zeroing for sensitive information .................... 18  \n6 Type system 20  \n6.1 Standard library traits .................................... 20  \n6.1.1 Drop trait, the destructor ............................... 20  \n6.1.2 Send and Sync traits ................................. 21  \n6.1.3 Comparison traits (PartialEq, Eq, PartialOrd, Ord) ............... 22  \n7 Foreign Function Interface (FFI) 26  \n7.1 Typing ............................................. 27  \n7.1.1 Data layout ...................................... 27  \n7.1.2 Type consistency ................................... 28  \n7.1.3 Platform-dependent types .............................. 29  \n7.1.4 Non-robust types:","cbCainEY0TaDFfae","https://ap.wps.com/l/cbCainEY0TaDFfae",390975,48,"English","# Introduction\n## Target Audience\n## Contributions\n## Structure of the Document\n# Development Environment\n## Rustup and Cargo\n# Libraries\n# Language Generalities\n# Memory Management\n# Type System\n# Foreign Function Interface (FFI)\n# Recommendation List","[{\"question\":\"What is the guidance intended to help developers do?\",\"answer\":\"It presents recommendations for developing secure applications with Rust, with a focus on memory safety and reducing security risks.\"},{\"question\":\"Which Rust topics are covered?\",\"answer\":\"The guidance covers development tools, libraries, language features, error handling, memory management, type-system traits, and foreign-function interfaces.\"},{\"question\":\"Who is the intended audience?\",\"answer\":\"The listed audience includes developers, administrators, IT security managers, IT managers, and users.\"}]","ANSSI Guide - Programming Rules to Develop Secure Applications with Rust - v1.0 | PDF",121,[210,214,218,222,226],{"page_no":8,"url":211,"width":212,"height":213},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-12-04/8e72539b88998eadd0845a5936c04d09.webp",983,1390,{"page_no":14,"url":215,"width":216,"height":217},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-12-04/924a6f28dc50cb0255ce49ff4b1e08ac.webp",982,1388,{"page_no":81,"url":219,"width":220,"height":221},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-12-04/838419c245c4294cbe18b1c58de561ae.webp",981,1387,{"page_no":19,"url":223,"width":224,"height":225},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-12-04/9ca8e31c46c08c86c3082b827585b483.webp",980,1385,{"page_no":24,"url":227,"width":228,"height":229},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-12-04/9a386905f8c4140e8f8eede0a9e8f7f1.webp",979,1384]