Support for multilingual documentation has been a community wish since 2015 and we are glad to see the plugins being adopted by several other projects to produce maintainable multilingual documentation for everybody. To support translations, we developed mdbook-i18n-helpers. It is critical that they can adapt existing Rust code in AOSP to fit their needs. While mdBook is not designed for presentations, the output looked OK on a projector when we limited the vertical size of each page.Īndroid has developers and OEM partners in many countries. These features made it easy for us to choose mdBook. We relied on this feature for translations and ASCII art diagrams. Extensibility: mdBook has a plugin system which allowed us to extend the tool as needed.This allowed us to evolve the class over time while ensuring that we always showed valid code to the participants. Maintainability: mdbook test compiles and executes every code snippet in the course.In addition to being a familiar community standard, mdBook offers the following important features: This is key to making the training engaging since the code can be edited live and executed directly in the slides: It is used for official documentation such as the Rust Book and Rust Reference.Ī particularly interesting feature is the ability to embed executable snippets of Rust code. People with other backgrounds can learn Rust from the many other resources freely available online.įor free-form documentation, mdBook has become the de facto standard in the Rust community. This allowed us to move quickly when explaining concepts familiar to our audience, such as "control flow", “stack vs heap”, and “methods”. We created the course for engineers with at least 2–3 years of coding experience in either C, C++, or Java. Second, the standard library is extensively documented.īecause we knew our target audience, we could make stronger assumptions than most material found online. First, there is the freely available Rust Book, which covers almost all of the language. With those three goals as a starting point, we looked at the existing material and available tools.ĭocumentation is a key value of the Rust community and there are many great resources available for learning Rust. Finally, because Rust is a new language in the Android Platform (AOSP), we needed to show how to interoperate with existing languages such as Java and C++. We also wanted to document emerging standards, such as using thiserror and anyhow crates for error handling.
Unfortunately, the type of training we wanted to provide simply didn’t exist. An important part of our strategy for accomplishing this was training. For that we need to ensure a baseline level of comfort and productivity within a set period of time. Scaling up Rust adoption required moving beyond early adopters. They know there will be some inconveniences and a steep learning curve but are willing to learn, often on their own time. We hoped to accomplish this by investing heavily in training to expand from the early adopters.Įarly adopters are often willing to accept more risk to try out a new technology. These positive early results provided an enticing motivation to increase the speed and scope of Rust adoption. Security: There has been a reduction in memory safety vulnerabilities as we shift more development to memory safe languages.They report important indicators of development velocity, such as confidence in the code quality and ease of code review. Productivity: Developers quickly feel productive writing Rust.We are already seeing a number of benefits: Android 14 is the third major Android release with Rust support.