Android Open Source Project now supports Rust for OS development

Rust uses a combination of compile-time checks to enforce object lifetime/ownership and runtime checks to ensure that memory accesses are valid, improving memory safety while providing equivalent performance to C and C++.

Devdiscourse News Desk | California | Updated: 07-04-2021 07:09 IST | Created: 07-04-2021 07:09 IST
Android Open Source Project now supports Rust for OS development
While memory-safe languages such as Kotlin and Java are designed for ease of use, portability, and safety and are the best option for Android app development, they are not an option for the lower layers of the OS which require systems programming languages like C, C++, and Rust. Image Credit: Google

Google on Tuesday announced that the Android Open Source Project (AOSP) now supports the Rust programming language for OS development.

While memory-safe languages such as Kotlin and Java are designed for ease of use, portability, and safety and are the best option for Android app development, they are not an option for the lower layers of the OS which require systems programming languages like C, C++, and Rust.

However, for C and C++ languages, the developer is responsible for managing memory lifetime and it's easy to make mistakes when doing this, especially in complex and multithreaded codebases. That's where Rust comes into the picture.

Rust uses a combination of compile-time checks to enforce object lifetime/ownership and runtime checks to ensure that memory accesses are valid, improving memory safety while providing equivalent performance to C and C++.

On the other hand, C and C++ don't provide these same safety guarantees and require robust isolation. Rust helps overcome the limitations of these languages as it lowers the density of bugs within a code, increasing the effectiveness of current sandboxing and also reduces sandboxing needs, allowing the introduction of new features that are both safer and lighter on resources.

Besides, Rust improves the correctness of a code by modernizing a range of other language aspects such as memory safety, data concurrency, better error handling in standard libraries, safer integer handling and variable initialization.

"Adding a new language to the Android platform is a large undertaking. 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. 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. Scaling this to more of the OS is a multi-year project," Google said.


TRENDING

OPINION / BLOG / INTERVIEW

Viral variants and vaccine nationalism pose two-pronged threat to Covid victory

... ...

Tracking Fintech during COVID-19: Harnessing power of technology

Its abundantly clear now that as fintech cements its place in the financial sector, accelerated further by the COVID-19 pandemic, it could open the sector to new possibilities by harnessing the power of technology to deliver financial ...

Tectonic turns: How technology shaped healthcare over the decades

Tracing an episodic evolution, with technology at the interface of human and his health....

World Water Day sees crises of inequality in countries both rich and poor

... ...

Videos

Latest News

Sports News Roundup: Republicans want to yank baseball's antitrust immunity; Marlins blast Braves behind Adam Duvail's 7 RBIs and more

Following is a summary of current sports news briefs.Republicans want to yank baseballs antitrust immunity after MLB reaction to Georgia voting lawFive Republican senators introduced a bill on Wednesday to strip Major League Baseball of its...

India breaches 200,000 daily COVID-19 cases as hospital beds, oxygen fall short

India reported a record 200,000 new COVID-19 cases on Thursday and the financial hub of Mumbai entered a lockdown, as many hospitals treating coronavirus patients reported severe shortages of beds and oxygen supplies. The surge was the seve...

Odd News Roundup: South Korean won't give up LG smartphones and Music of spider web

Following is a summary of current odd news briefs.Listen to the music of a spiders web. Tell me what do you hearIt is an eerie, foreboding, reverberating tune, enough to send a tingle down your spine. This is what a spiderweb sounds like.So...

Health News Roundup: Northwell Health sets up mental health center for employees; India reports more than 200,000 new COVID-19 cases and more

Following is a summary of current health news briefs.New Yorks largest hospital system sets up mental health center for employeesNew Yorks largest healthcare provider Northwell Health has opened a center to offer resilience and traumatic st...

Give Feedback