Update of "Separate Libraries"

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview

Artifact ID: 11a95e62a636174d7d63d59234e942693fbb206b
Page Name:Separate Libraries
Date: 2017-05-25 19:07:26
Original User: Entomy
Parent: 5fec3878dbcfa6a8e0a145afb9e65af0f00410c8
Content

Rationale

Since Ada separates specification and implementation, it is possible and even desirable to swap out implementation of packages. This is done most easily when packages are built as separate stand-alone libraries.

In most other languages, features like SIMD instructions of the underlying ISA are compiled in. Ada however can seamlessly implement the same functions in a generic way and for various SIMD ISA's, and use whatever implementation is provided (immediately in the executables directory, or installed on the system).

As you might assume, building such a collection of libraries is not an easy task, and so adaprj is designed to automate that process.

Considerations and Conventions

Often it is desirable to implement generic versions of the functions and procedures contained within a package. This can be a convenience to downstream developers, or simply make implementation of the package easier on yourself. adaprj follows a specific convention here: the generic stuff should be in a package with the same name, prefixed with Generics. So for the package Mathematics you would put generic implementations within Generics.Mathematics. This package is automatically checked for by adaprj, built, and linked into the same library as Mathematics.