Code Monkey home page Code Monkey logo

alire's Introduction

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.

alire's People

Contributors

0rzech avatar actions-user avatar aj-ianozi avatar atalii avatar bechris avatar bracke avatar chris660 avatar corinthian13 avatar dalybrown avatar fabien-chouteau avatar godunko avatar gusthoff avatar jellix avatar jeremygrosser avatar jquorning avatar mgrojo avatar mosteo avatar nicolairuckel avatar onox avatar pat-rogers avatar pmderodat avatar pyjarrett avatar reznikmm avatar rocher avatar rowan-walshe avatar serock avatar simonjwright avatar stcarrez avatar timlag1305 avatar yakobowski avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

alire's Issues

Respect dependency order during checkout

Also leave for last the current project. This will imply, in this order: checking it out, doing the update, executing its post_fetch actions, if any, and performing the build, if requested

"Provides" in releases?

As a way of provide mutual exclusion?

This is entering the realm of apt "provides/conflicts", not sure is the best idea

Ascii dependency graphs

Add parent/child relationship between releases in the solver
Use this information to generate ascii trees somehow (existing library)

License compatibility

Side project that would enable search for compatible licensed projects. Current search already can be used on license abbreviations.

--sandbox

Global option to make dependencies go into sibling folders instead of the common cache

unit tests

Comprehensive per command x option

At a bare minimum update stress/selftest.sh

test --latest

As an alternative to --full, test only the most recent release

get --only

Retrieve requested project only, without dependencies, even if unavailable in current platform

Variants/Subprojects

that don't require a typed named project? Might simplify the indexing of variants with different dependencies.

Good candidates would be: the simple components, and AdaYaml (with/without server)

Could also reduce noise in the project list/search

Actions post-fech, post-build

post-fetch happen once, post-build every time is built...

Will need options for CWD and arguments

This is probably a can of worms

Package alr 0.6

On occasion of new checkout method and new AAA dependency

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.