This webinar introduces AdaCore's GNAT Pro for Rust, a high-integrity toolchain aimed at making Rust suitable for safety-critical and mission-critical embedded applications. The presentation highlights Rust's core strengths, such as type and memory safety, and its growing industry and governmental adoption. A key demonstration is a Rust-based Mars rover rerouting system, utilizing a D* Lite pathfinding algorithm implemented in a WebAssembly-powered simulator. This system dynamically adjusts the rover's path in real-time when encountering new obstacles, showcasing Rust's efficiency and reliability. The speaker details the technical implementation, emphasizing Rust's "zero-cost abstractions," predictable performance, and the absence of unsafe code blocks, crucial for certifiable software. AdaCore's commitment to providing unparalleled engineer-led support, qualified toolchains, and MCDC coverage for Rust is underscored, paving the way for its increased use in regulated industries like avionics and automotive.
Exploring GNAT Pro for Rust: A Rover Rerouting Demonstration for Safety-Critical Applications
0:00 Welcome & Introduction: The webinar introduces AdaCore's GNAT Pro for Rust, hosted by Stephen, a Product Manager. It highlights the significant attendance from diverse industries and countries.
2:54 AdaCore's Background: AdaCore is presented as a high-integrity tool chain provider founded in 1994, with roots in the 1970s ADA project. They have expanded to support Spark, C++, and now Rust, serving high-integrity industries like avionics, automotive, and defense with tools like GNAT Pro, GNATstack, and GNATdash.
5:18 Introduction to Rust: Rust, created by Graydon Hoare (2006-2009), is described as a language "overengineered for survival," offering key features like strong type safety, memory safety (preventing crashes and leaks without runtime slowdown), and multi-language interoperability. It's noted for its vibrant community (ranked most loved language for seven consecutive years) and increasing governmental mandates (DoD, NSA, White House) for memory-safe languages.
10:48 The Rover Rerouting Project: Stephen introduces a new project to push Rust's capabilities: developing a pathfinding algorithm for a Mars rover that can dynamically reroute when encountering obstacles. This project builds on AdaCore's long history with rover demonstrations.
14:22 Algorithm Selection: Various pathfinding algorithms are discussed, including Dijkstra's and A* (both static). The presentation explains why D Lite* (Dynamic A*) was chosen for its ability to incrementally search, replan with new data, and design for dynamic maps, offering a balance between capability and computational cost, unlike the more resource-intensive Field D* used by NASA.
17:25 Web Simulator Demonstration: A live demo of a Rust-based web simulator (using WebAssembly and the yew framework) illustrates the D* Lite algorithm. The simulator shows a rover (amber circle) with a sensor range (orange circle) navigating a map with start, goal, and user-added obstacles. The rover dynamically replans its optimal path as obstacles enter its sensor's circumference, converting dynamic obstacles into static blocks in a continuously updated node list.
Lazy Removal: The D* Lite implementation efficiently reuses past work by pushing new state versions onto a heap rather than expensive deletions.
Ownership & Borrow Rules: Rust's compiler (&mut self signature) guarantees exclusive mutable access, preventing accidental shared mutation of data structures, enhancing safety and memory efficiency.
Traits & Zero-Cost Abstractions: Rust's trait system allows for "zero-cost abstractions" (no virtual calls, no runtime overhead in release builds), enabling interchangeable pathfinding algorithms (e.g., swapping D* Lite for Field D*) without performance penalty.
Type Safety: Features like named coordinate types prevent mixing data types or using invalid indices, with checks occurring at compile time, reducing errors.
Error Reduction & Predictable Performance: The D* Lite implementation is 100% safe Rust (no unsafe blocks), ensuring no raw pointers or manual bounds checks. Heap operations are consistently O(log N), making worst-case runtime clear, bounded, and testable.
Rover: Future iterations include building a physical rover, incorporating machine learning and computer vision (using Rust TF light bindings) for real-world obstacle detection, and exploring more sophisticated algorithms for aerial or submersible vehicles. A live demo of the physical rover is planned for Denver Tech Day in September.
GNAT Pro for Rust: AdaCore aims to further Rust's maturity in safety-critical software by offering multi-language support (Rust, Ada, C, C++), supporting new platforms (VxWorks, QNX), and crucial GT Coverage updates, including MCDC coverage for Rust (a significant step towards certifiability).
36:20 Certifiable Support: AdaCore emphasizes its commitment to making Rust certifiable across various industries, providing qualified tools, runtime libraries, certification materials, and sustained, professional engineering support.
38:12 Community Involvement: AdaCore is an active participant in the Rust Foundation Safety Critical Consortium (SCC), an open working group focused on advancing Rust in safety-critical software.
39:45 Conclusion & Call to Action: The webinar concludes by reiterating AdaCore's guarantees of stability, security, expert support, and long-term commitment to GNAT Pro for Rust, inviting attendees to follow the project's progress and attend future events.