• Stars
    star
    275
  • Rank 149,796 (Top 3 %)
  • Language
    Ada
  • License
    GNU General Publi...
  • Created almost 7 years ago
  • Updated 5 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Command-line tool from the Alire project and supporting library

Linux CI Windows CI MacOS CI Gitter chat Gitpod ready

ALR

ALIRE: Ada LIbrary REpository.

A catalog of ready-to-use Ada libraries plus a command-line tool (alr) to obtain, build, and incorporate them into your own projects. It aims to fulfill a similar role to Rust's cargo or OCaml's opam.

Caveat emptor

Documentation at this time is a work in progress. Expect further efforts in this direction until this warning is removed. Check the latest information at https://alire.ada.dev/

TL;DR

Available for Linux/macOS/Windows/FreeBSD.

Download the latest stable version from the Releases page. See the Getting Started guide for binary downloads.

If, instead, you want to test the latest development version, see Building from sources or, if you already have a recent alr in your system, Building with alr.

Installation and First Steps

See the Getting Started guide.

Building from sources

The build process of alr is straighforward and depends only on a recent GNAT Ada 2012 compiler. All dependencies are included as submodules. A project file (alr_env.gpr) is provided to drive the build with all necessary configuration (which is also valid for editing with GNAT Studio).

The ALIRE_OS environment variable must be set to the OS for which alr is being build, taking one of the values in freebsd, linux, macos, windows.

Follow these steps:

  1. Clone the repository: git clone --recurse-submodules https://github.com/alire-project/alire.git
  2. Enter the cloned repository folder.
  3. Build the executable:
    • if you have Bash on your system: dev/build.sh
    • if you don't have Bash on your system: ALIRE_OS=<one of: freebsd, linux, macos, windows> gprbuild -j0 -p -P alr_env

The binary will be found at bin/alr. You can run alr version to see version and diagnostics information.

Sourcing the scripts/alr-completion.bash file will provide Bash tab autocompletion.

Building with alr

If you already have a recent enough alr binary, you can alternatively build alr by simply running alr build at the root of the repository. This command will retrieve all necessary dependencies prior to launching the build and configure the environment.

The master branch should normally be able to build itself in this fashion, as this is one of our integration tests.

Design principles

alr is tailored to userspace, in a similar way to Python's virtualenv. A project or workspace will contain all its dependencies.

Some crates benefit from using platform packages. In this case the user will be asked to authorize a sudo installation through the platform package manager.

Properties and dependencies of projects are managed through a TOML file (alire.toml, found at the root of Alire workspaces). This file exists locally for working copies of projects, and the Alire community index stores the files corresponding to its projects.

The complete build environment is automatically set up by setting the GPR_PROJECT_PATH environment variable before running gprbuild, thus freeing the user from concerns about installation paths. The user simply adds the used projects to its own project GPR file with their simple name. You can check the environment alr is using with alr printenv.

Supported platforms

Alire can be built on Linux, macOS, Windows, and FreeBSD.

Alire requires a recent Ada 2012 compiler. In practice, this currently means the latest GNAT Community or a somewhat recent GNAT FSF. Continuous integration is run against the Windows and macOS Github Actions images, and a suite of Linux docker images that includes at least Debian stable, Ubuntu LTS, CentOS, Arch and Fedora. The packaged GNAT is used when available from the distribution.

Note that platform-provided Ada libraries (such as Debian's GtkAda) require the use of the platform Ada compiler. Otherwise these libraries will be unavailable, potentially making dependent crates unavailable too.

More Repositories

1

alire-index

Community index for the Alire project
52
star
2

GNAT-FSF-builds

Builds of the GNAT Ada compiler from FSF GCC releases
Python
33
star
3

ada_spark_workflow

A demo of best practices for open-source Ada/SPARK development
Ada
30
star
4

clic

Command Line Interface Components
Ada
11
star
5

semantic_versioning

Semantic versioning in Ada
Ada
8
star
6

alire.ada.dev

Official website for the project
HTML
5
star
7

gnoga

Ada
4
star
8

setup-alire

GitHub action to setup Alire (the Ada/SPARK package manager)
JavaScript
4
star
9

simple_logging

Easy to use logging facilities for output to console in Ada programs
Ada
3
star
10

zlib-ada

A thick binding to the popular compression/decompression library ZLib
Ada
3
star
11

resources

A utility library to handle project resources at run-time
Ada
2
star
12

alire-crates-ci

CI testing of crates in default alire index
Python
2
star
13

deepend

A suite of dynamic storage pools with subpool capabilities for Ada 95, Ada 2005, and Ada 2012
Ada
2
star
14

dockerfiles

Dockerfiles used to test Alire in supported Linux distributions. They do not contain Alire, but a complete GNAT toolchain.
Shell
2
star
15

xmlezout

XML EZ Out is a small set of packages intended to aid the creation of XML-formatted output from within Ada programs
Ada
2
star
16

gnatcov-to-codecovio-action

GitHub actions to upload coverage results from gnatcov to codecov.io
Shell
1
star
17

libhello

Demo library
Ada
1
star
18

hello

"Hello, world!" using a library
Ada
1
star
19

check-author

GitHub Action to check author permision on Alire crate files
JavaScript
1
star
20

dak_simple_components

Simple Components by Dmitry A. Kazakov
Ada
1
star
21

smart_pointers

Christoph Karl Walter Grein's Smart Pointers
Ada
1
star