The Gibbs Seawater Toolbox (GSW) is a key software for Oceanography
+ since it provides consistent thermodynamic properties of seawater,
+ conversions, and other utilities. GSW has been adopted since 2009 by
+ the Intergovernmental Oceanographic Commission as the official
+ description of seawater. Although it is available in several computer
+ languages, most implementations, such as Python
+ (
Here we introduce a version of GSW implemented in pure Rust + (GSW-rs), initially developed for inclusion in microcontroller + firmware to support autonomous decisions and onboard Machine Learning. + The same implementation also works on regular computers and can + seamlessly replace GSW-C on apps and libraries by maintaining + compatibility with the GSW-C Foreign Function Interface (FFI). Thanks + to zero-cost abstraction, GSW-rs does not impose performance and + readability trade-off, allowing it to be written for clear + understanding and closer to the original scientific publications. + Therefore, it is easier to verify and maintain. Another key aspect is + the support for testing. GSW-rs is subject to unit tests as well as + validation against the reference dataset from TEOS-10, allowing for + consistent development through continuous integration.
+Modern oceanography strongly relies on autonomous platforms - such + as Argo floats, Spray underwater gliders, and Saildrones - to provide + sustained observations. Software robustness and performance are + critical requirements for these platforms to operate with low energy + budgets and up to several years in a single deployment, making Rust an + optimal language for this task. At the same time, the expanding cloud + infrastructure can give the illusion of infinite computing, but + convenient program languages such as Python must rely on + high-performance languages in the backend to optimize bottlenecks. A + Rust implementation of GSW allows sustainable and efficient progress, + from embedded to high-performance computing.
+While GSW is already implemented in several languages, there is no
+ uniformity among those. The Matlab implementation (GSW-m)
+ (