Inspirel banner

Programming Distributed Systems with YAMI4

2.3 Ada Libraries

The Ada core library is mostly a thin wrapper for the C++ core library and exposes all core interfaces in Ada. It is intended for mission critical systems and as a basis for the general-purpose Ada library.

The Ada general-purpose library is intended to mirror the functionality of the C++ library, but offers additional benefits due to the tight integration with Ada tasking.

The Ada libraries depend on the C++ core library, so that should be compiled first - please see the steps described above. In addition, the C++ core library archive needs to be linked into the final Ada applications.

Dedicated build files for the GNAT Project Manager are provided to ease the compilation process - note, however, that on most systems these .gpr files might require some modifications to properly point to dependent libraries. The files that might require special attention are:

Once the library paths are properly set up, the following commands can be used to compile the Ada library:

$ cd src/ada
$ gnatmake -Pyami

After compilation the libyamiada.a file and a set of ALI files will be copied to the lib directory in the root project directory.

The doc/ada directory contains the generated API documentation for both the Ada Core wrapper and the general-purpose Ada library.

In addition to the Ada core and Ada general-purpose libraries the Ada-Ravenscar variant of the core was added for systems that need to be compatible with the Ravenscar execution profile. The are minor interface differences with respect to the Ada core library, which take into account Ravenscar restrictions on implicit use of dynamic memory. The Ada-Ravenscar library can be compiled in the same manner as the Ada core library.