Awesome
Ada Utility Library
This Ada library contains various utility packages for building Ada applications. This includes:
- A logging framework close to Java log4j framework,
- Support for INI and property files,
- A serialization/deserialization framework for XML, JSON, CSV, Forms
- Ada beans framework,
- Encoding/decoding framework (Base16, Base32, Base64, SHA, HMAC-SHA, AES-256),
- A composing stream framework (raw, files, buffers, pipes, sockets, encryption, decryption, LZMA compression, LZMA decompression),
- Several concurrency tools (reference counters, counters, pools, fifos, arrays),
- Process creation and pipes,
- Support for loading shared libraries (on Windows or Unix),
- HTTP client library on top of CURL or AWS.
Ada Util also provides a small test utility library on top of Ahven or AUnit to help in writing unit tests. Ahven is the default testing framework as it provides better reports.
Version 2.8.0 - Under development
- Improvement of Util.Files.Walk to scan and honor a root .gitignore from any child directory
- Feature #55: Support indentation when writing JSON streams
Version 2.7.0 - Jun 2024
- New package Util.Files.Walk to iterate over directory trees and honor .gitignore
- Add support for custom log formatter (allow to translate log messages, filter messages, ...)
- Feature #48: Change the log time from UTC to Local Time (configurable)
- Fix #49: Perf report generates incorrect XML title attributes
- Fix #50: 128Bit AES-CTR Encoding doesn't work (thanks Adam Jasinski)
- Fix #53: Executor does not always stop the worker tasks
- Used spdx-tool to use
SPDX-License-Identifier
in headers
Using with Alire
If you are using Alire in your project, use the following commands to use the library:
alr with utilada
alr with utilada_aws
alr with utilada_curl
alr with utilada_lzma
alr with utilada_unit
alr with utilada_xml
Using without Alire
The library needs Alire to compile but you can use it in your project if you build the library with the same compiler and then install it. For a detailed description on how you can configure, build and install the library refer to the Installation guide. Otherwise, you can easily configure and build the library with the steps described below.
The support for AWS, Curl, LZMA and XML/Ada are enabled only when a HAVE_XXX=yes
configuration
variable has defined. Run the setup command that records in the Makefile.conf
the configuration
you want to build:
make setup BUILD=debug PREFIX=/build/install HAVE_XML_ADA=yes HAVE_CURL=yes HAVE_LZMA=yes HAVE_AWS=yes
Then, build, run the test and install:
make
make test
make install
To use the installed libraries, make sure your ADA_PROJECT_PATH
contains the directory
where you installed the libraries (configured by the PREFIX=<path>
option in the setup phase).
The installed GNAT projects are the same as those used when using Alire.
Samples
The samples are built by using:
cd samples
alr build