Leveraging Rust and its ecosystem for the development of astronomical tools and services.
F.-X. Pineau
Rust is a recent programming language that benefits from many appealing features and modern tooling.
The CDS began an evaluation of Rust in 2018, and it has now been introduced into several astronomical
tools and services such as the CDS HEALPix library, ExXmatch, MOCPy or Aladin Lite V3.
Based on the experience of using Rust at CDS we will discuss the advantages that we have gained
in terms of performance, stability and low memory footprint.
We will emphasise the benefits of the interoperability of Rust with other languages
and how this promotes the re-usability of code.
The examples of MOC LibRust and its derivatives (MOCCli, MOCPy and MOCWasm) are used to demonstrate
that these libraries can easily be called from a command line interface, through a Python wrapper or from a web browser.
With the development of WebAssembly, we describe how Rust could be used for both "code near data computations”
and to fulfil the old Java dream "Write Once, Run Everywhere".