• Stars
    star
    69
  • Rank 452,630 (Top 9 %)
  • Language
    Ada
  • License
    Apache License 2.0
  • Created almost 10 years ago
  • Updated about 2 months ago

Reviews

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

Repository Details

Ada Utility Library - Composing streams, processes, logs, serialization, encoders and more

Ada Utility Library

Alire Alire Alire Alire Alire Alire Build Status Test Status Coverage Documentation Status Download License GitLab Commits

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.7.0 - Under development

  • New package Util.Files.Walk to iterate over directory trees and honor .gitignore
  • 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)

Version 2.6.0 - Jul 2023

  • New encoder/decoder for Base32
  • Feature #32: Custom log appender
  • Feature #36: Add HOTP algorithm
  • Feature #38: Allow to read stdout and stderr as separate streams when spawning a process
  • Feature #40: Input stream reader to read parts from another stream
  • Feature #41: Support to ignore line breaks when decoding Base64 streams
  • Feature #42: Improvement of test framework to launch and verify external program execution and output
  • Fix #37: Support to build with -gnatW8
  • Fix #35: utilada_curl crate uses wrong curl dependency

List all versions

Build with Alire

alr with utilada
alr with utilada_aws
alr with utilada_curl
alr with utilada_lzma
alr with utilada_unit
alr with utilada_xml

Build with configure

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.

To use Ahven testing framework, configure and build as follows:

./configure
make

To use AUnit, build with the following commands:

./configure --enable-aunit
make

The unit tests are built and executed with:

   make test

And unit tests are executed with (256 success, 0 failed):

   bin/util_harness

For the installation, use the following command:

   make install

Build without configure

Since the integration with Alire, you can build without running configure. However, there are a number of checks and dependencies which are not verified and you must run several commands manually, choosing the correct values for UTIL_ASM_TYPE and UTIL_OS build variables. The trick is to give gprbuild the Alire configuration project in .alire/utilada_conf.gpr.

For a simple Linux 64-bit build, use:

gprbuild -aP.alire -Putilada_core -p
gprbuild -aP.alire -Putilada_base -p
gprbuild -aP.alire -Putilada_sys -p
gprbuild -aP.alire -Putilada_aws -p
gprbuild -aP.alire -Putilada_curl -p
gprbuild -aP.alire -Putilada_xml -p

For a Linux 32-bit build, use

gprbuild -aP.alire -Putilada_sys -p -XUTIL_OS=linux32

For Windows-64 try:

gprbuild -aP.alire -Putilada_sys -p -XUTIL_OS=win64

Checkout the file .alire/utilada_conf.gpr for other alternatives.

You can then use gprinstall for the installation:

gprinstall -aP.alire -Putilada_core -p
gprinstall -aP.alire -Putilada_base -p
gprinstall -aP.alire -Putilada_sys -p
gprinstall -aP.alire -Putilada_aws -p
gprinstall -aP.alire -Putilada_curl -p
gprinstall -aP.alire -Putilada_xml -p

I've never tried to build on Windows without msys2. I don't know if it works. I suspect there will be problems.

Samples

The samples can be built using:

   gprbuild -Psamples
Package Example
Util.Dates.Formats date.adb
Util.Beans.Objects objcalc.adb, jsonobj.adb, jsonread.adb
Util.Beans.Objects.Maps jsonobj.adb, genentities.adb
Util.Beans.Objects.Vectors datasets.adb, jsonobj.adb
Util.Beans.Objects.Datasets datasets.adb
Util.Beans.Objects.Iterators jsonread.adb
Util.Encoders encodes.adb
Util.Encoders.AES decrypt.adb, encrypt.adb
Util.Encoders.SHA256 sha256.adb
Util.Files realpath.adb, gperfhash.adb
Util.Files.Rolling rolling_file.adb
Util.Files.Walk tree.adb
Util.Http.Clients wget.adb, facebook.adb
Util.Log.Loggers log.adb, syslog_appenders.adb, multipro_refs.adb, date.adb, xmlrd.adb, gperfhash.adb, multipro.adb, mapping.adb, csv_city.adb, bundles.adb
Util.Measures measures.adb
Util.Processes launch.adb, env.adb, popen.adb
Util.Properties properties.adb, proplist.adb, bundles.adb
Util.Refs multipro_refs.adb
Util.Streams.AES decrypt.adb, encrypt.adb
Util.Streams.Base64 lzma_encrypt_b64.adb, lzma_decrypt_b64.adb, dumpcert.adb
Util.Streams.Buffered.Parts multipart.adb, dumpcert.adb
Util.Streams.Files copy.adb, sha256.adb, compress.adb, decompress.adb, decrypt.adb, encrypt.adb, lzma_encrypt.adb, lzma_decrypt.adb
Util.Streams.Pipes launch.adb, popen.adb
Util.Serialize.IO.CSV csv_city.adb
Util.Serialize.IO.JSON serialize.adb, json.adb, jsonobj.adb, jsonread.adb, genentities.adb
Util.Serialize.IO.XML serialize_xml.adb, xmi.adb, xmlrd.adb
Util.Serialize.Mappers csv_reader.adb, csv_city.adb, xmi.adb, xmlrd.adb
Util.Serialize.Mappers.Record_Mapper xmi.adb, xmlrd.adb
Util.Serialize.Mappers.Vector_Mapper json.adb, xmlrd.adb
Util.Strings cut.adb, escape.adb
Util.Strings.Tokenizers cut.adb, escape.adb
Util.Strings.Transforms escape.adb, gperfhash.adb
Util.Strings.Vectors gperfhash.adb

Documentation

Articles

More Repositories

1

ada-awa

Ada Web Application - Framework to build high performance secure web applications
Ada
93
star
2

sql-benchmark

Tool to make SQL benchmark on different drivers, languages and databases
Ada
31
star
3

ada-keystore

Ada Keystore - protect your sensitive data with secure storage
Ada
31
star
4

swagger-ada

Ada support for OpenAPI code generator
Ada
27
star
5

ada-ado

Ada Database Objects
Ada
25
star
6

ada-security

Ada Security - OAuth 2.0 client and server framework to secure web applications
Ada
22
star
7

ada-enet

Ada Embedded Network Stack
Ada
21
star
8

ada-wiki

Ada Wiki Engine - Wiki parser and renderer with several Wiki syntaxes
Ada
19
star
9

etherscope

Ethernet traffic monitor on a STM32F746 board
Ada
17
star
10

dynamo

Dynamo Ada Application Code Generator
Ada
17
star
11

ada-asf

Ada Server Faces - Web Server Faces JSR 252, JSR 314 and JSR 344
Ada
12
star
12

resource-embedder

ARE - Advanced Resource Embedder include files, scripts, images in Ada, C, Go binaries
Ada
10
star
13

ada-search

Ada
9
star
14

ada-bfd

Ada BFD is an Ada binding for the GNU Binutils BFD library. It allows to read binary ELF, COFF files by using the GNU BFD.
Ada
8
star
15

swagger-ada-todo

Simple todo list server with OpenAPI
Ada
8
star
16

ada-el

Ada EL - Expression Language Library (JSR245)
Ada
7
star
17

ada-servlet

Ada Servlet - Web Servlet Library following JSR 154, JSR 315
Ada
7
star
18

atlas

AWA Demonstrator
TSQL
7
star
19

ada-css

Ada parser for CSS files with CSS Object Model API
Ada
6
star
20

ada-lzma

Ada binding for liblzma compression library
Ada
6
star
21

mat

Memory Analysis Tool
Ada
6
star
22

ada-stemmer

Multi natural language stemmer with Snowball generator
Ada
4
star
23

stm32-ui

STM32 UI library and tools
Ada
4
star
24

ada-rest-api-server-benchmark

Benchmark for REST api on Ada servers
Ada
3
star
25

jason

Project and ticket management
Ada
3
star
26

bbox-ada-api

Ada Binding for the Bbox API
Ada
3
star
27

wi2wic

Wiki 2 Wiki Converter
Ada
2
star
28

hestia

Heat Controller
Ada
2
star
29

ada-mail

Mail tools
Ada
2
star
30

ada-libsecret

Ada Binding for the libsecret library
Ada
2
star
31

babel

Babel Backup
Ada
1
star
32

ada-awe

Automatically exported from code.google.com/p/ada-awe
Ada
1
star
33

helios

Helios Fast Reliable Monitoring Agent
Ada
1
star
34

awa-alire-index

1
star
35

xcra

Automatically exported from code.google.com/p/xcra
C++
1
star