Google Develops New Bluetooth Stack for Android, Written in Rust

Rust has taken off with a popularity boosted largely by big tech companies and solutions used on a large scale. Following its support in the Linux-Next branch, the patch waiting area for the next kernel merge window, this month Google revealed this week what the new version of the Android Bluetooth stack, Gabeldorsche, is written with Rust.

This news comes about two months after Google joined the Rust Foundation, because in the Git repository that contains the source codes for Android, Google announced that the new version of Gabeldorsche, the Bluetooth stack used in Android since the version 11, has been rewritten with Rust.

The details of the project are still missing, only assembly instructions are available.

“Currently, Rust components are built differently on Android and Linux. We are missing Rust support in our GN toolchain. So we are currently building the Rust libraries… ”said the team.

In fact, despite its common usage, Bluetooth can still be an inconsistent technology, with some operating systems and devices handling it better than others. The software responsible for managing the many moving parts of a Bluetooth connection is generally referred to as a Bluetooth "stack."

For years, Android has relied on the "fluoride" stack for its Bluetooth needs, but with Android 11, Google began testing an entirely new stack called Gabeldorsche, or "GD" for short. Gabeldorsche has been in development since 2019, but Google first released it to the public in 2020.

According to Google, Gabeldorsche is designed to give stability to Bluetooth networks, thus improving connectivity of mobile devices with home automation or other types of devices.

“Memory security is an ongoing challenge for software developers, especially those who work with system programs. Google has started using Rust in contexts where security and memory performance are critical considerations, especially on major Android systems, ”the company explained.

For now, you can compile all the Rust code using Cargo. However, the team added that there are some necessary dependencies: you must have the "protobuf-compiler" package installed, have a recent version of "Cargo + Rust" and use "build.py" in the root.

It should be noted that in parallel for the Fuchsia OS, another Bluetooth stack is being developed, for whose development the Rust language is also used.

Also, a new networking stack, Netstack3, has been written for Fuchsia in Rust and not only that here are some examples of projects where Google is already using Rust or contributing to the Rust ecosystem:

  • Android operating system modules, including Bluetooth and Keystore 2.0.
  • Low-level projects such as crosvm virtual machine monitor (alternative to QEMU) and drivers used in Chrome OS.
  • Contribution to open source projects that use Rust, such as the Mercurial source control system.
  • Firmware to support FIDO security keys.

In addition, Binder, the interprocess communication (IPC) mechanism, used in Android, is also rewritten in Rust, as well as a new network stack, Netstack3, is written in Rust for Fuchsia. According to Google, Fuchsia is an open source production operating system that prioritizes security, updates, and performance.

According to the company, Fuchsia is a foundation for developers to create lasting products and experiences on a wide range of devices.

"A set of foundational, safe, upgradeable, inclusive and pragmatic architectural principles guides the design and development of Fuchsia," the company wrote on its site about the operating system. While there are proposed frameworks to guide your design, Fuchsia is a work in progress.

It was rumored to be the replacement for Android and Chrome OS. However, Google said in July 2019 that its intention was not to replace these two operating systems, but was "just testing new concepts."


Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   Autopilot said

    Where Haskell couldn't go, Rust is doing. Its ease of use, C ++-like syntax, though not quite beloved but definitely known and accessible, and its focus on security seem to catch the eye of the industry. I didn't expect the sugar that Rust adds would outperform C ++. He was in the right place and at the right time.