{"id":9710,"date":"2021-04-11T12:53:22","date_gmt":"2021-04-11T16:53:22","guid":{"rendered":"http:\/\/local.brightwhiz\/?p=9710"},"modified":"2021-04-11T12:53:22","modified_gmt":"2021-04-11T16:53:22","slug":"google-now-supports-rust-code-for-developing-android-os","status":"publish","type":"post","link":"http:\/\/local.brightwhiz\/google-now-supports-rust-code-for-developing-android-os\/","title":{"rendered":"Google now Supports Rust Code For Developing Android OS"},"content":{"rendered":"\n
In efforts to improve the detection of memory safety bugs, Google announces support for Rust code in the development of the Android<\/a> OS.<\/p>\n\n\n\n The problem is that C, C++, and Assembly languages don\u2019t provide safety guarantees. This directly affects the correctness of code in the Android platform, which in turn is a top priority for the security, stability, and quality of each Android release.<\/p>\n\n\n\n Memory safety bugs in C and C++ can be costly in that there is a great deal of effort and resources put into detecting, fixing, and mitigating this class of bugs. Memory safety bugs continue to be a top contributor of stability issues, and consistently represent about 70% of Android’s high severity security vulnerabilities.<\/p>\n\n\n\n Android already supports memory-safe languages like Java and Kotlin. These languages are used for app development. For low-level tasks, engineers would need low-level programming languages like C, C++, and Rust<\/a>.<\/p>\n\n\n\n Rust code provides memory safety guarantees by using a combination of compile-time checks to enforce object lifetime\/ownership and runtime checks to ensure that memory accesses are valid. This safety is achieved while providing equivalent performance to C and C++.<\/p>\n\n\n\n It is important to note that introducing Rust programming language does not address bugs in existing C\/C++ code. Replacing all the C and C++ code would be a monumental task. It would be more feasible to implement newer code in Rust over several years.<\/p>\n\n\n\n In addition, there are toolchains and dependencies that need to be maintained, test infrastructure and tooling that must be updated, and developers that need to be trained.<\/p>\n\n\n\n “For the past 18 months we have been adding Rust support to the Android Open Source Project, and we have a few early adopter projects that we will be sharing in the coming months.” Android Team.<\/p>\n\n\n\n