2-4 July 2020
University of Zurich
Europe/Zurich timezone

Shroud: generate Fortran wrappers for C and C++ libraries

3 Jul 2020, 14:00
ZOOM (University of Zurich)


University of Zurich

Selected Presentations Session D


Lee Taylor (Lawrence Livermore National Laboratory)


Fortran application often need to access libraries which are written
in C or C++. The interoperability with C features introduced in
Fortran 2003 standardized access to symbols and types. But to access
all of the features of C++ libraries additional wrapper code must be
written, often by the author of the C++ library who may not be
familiar with modern Fortran features.
Shroud is a tool to create an idiomatic Fortran interface for a C++
library. The user creates a YAML file with the C/C++ declarations to
be wrapped along with annotations to provide semantic information and
code generation options.
Many C++ features will map directly to Fortran such as classes,
overloaded function, default arguments and template instantiation.
Shroud has successfully been used by several projects over the past
four years.
Shroud is written in Python and available at github.com/llnl/shroud
with a BSD license.

Primary author

Lee Taylor (Lawrence Livermore National Laboratory)

Presentation Materials