# What can the programming language Rust do for astrophysics?

**Authors:** Sergi Blanco-Cuaresma, Emeline Bolmont

arXiv: 1702.02951 · 2017-06-14

## TL;DR

This paper investigates the potential of Rust, a memory-safe programming language, to improve astrophysics computational tools by re-implementing a planetary system simulation originally written in Fortran.

## Contribution

It demonstrates how Rust can be used to re-implement astrophysics simulation code, highlighting its advantages and limitations compared to traditional languages.

## Key findings

- Rust offers memory safety benefits for astrophysics code.
- Re-implementation of Mercury-T in Rust shows comparable performance.
- Rust's safety features can reduce errors in scientific computations.

## Abstract

The astrophysics community uses different tools for computational tasks such as complex systems simulations, radiative transfer calculations or big data. Programming languages like Fortran, C or C++ are commonly present in these tools and, generally, the language choice was made based on the need for performance. However, this comes at a cost: safety. For instance, a common source of error is the access to invalid memory regions, which produces random execution behaviors and affects the scientific interpretation of the results.   In 2015, Mozilla Research released the first stable version of a new programming language named Rust. Many features make this new language attractive for the scientific community, it is open source and it guarantees memory safety while offering zero-cost abstraction.   We explore the advantages and drawbacks of Rust for astrophysics by re-implementing the fundamental parts of Mercury-T, a Fortran code that simulates the dynamical and tidal evolution of multi-planet systems.

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/1702.02951/full.md

## Figures

5 figures with captions in the complete paper: https://tomesphere.com/paper/1702.02951/full.md

## References

5 references — full list in the complete paper: https://tomesphere.com/paper/1702.02951/full.md

---
Source: https://tomesphere.com/paper/1702.02951