{"id":13408767,"url":"https://github.com/stcarrez/ada-util","last_synced_at":"2025-04-12T07:36:06.304Z","repository":{"id":25777086,"uuid":"29215442","full_name":"stcarrez/ada-util","owner":"stcarrez","description":"Ada Utility Library - Composing streams, processes, logs, serialization, encoders and more","archived":false,"fork":false,"pushed_at":"2024-05-19T13:43:13.000Z","size":7842,"stargazers_count":68,"open_issues_count":4,"forks_count":14,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-05-20T05:34:21.291Z","etag":null,"topics":["ada","beans","json","logging","process","serializer","streams"],"latest_commit_sha":null,"homepage":"","language":"Ada","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stcarrez.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.Ahven","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":"support/add-junit-result.sh","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-01-13T22:49:03.000Z","updated_at":"2024-06-01T16:12:46.668Z","dependencies_parsed_at":"2024-03-09T23:31:54.951Z","dependency_job_id":"688a0aca-5c49-4d06-8e7e-1d7defce8301","html_url":"https://github.com/stcarrez/ada-util","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stcarrez%2Fada-util","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stcarrez%2Fada-util/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stcarrez%2Fada-util/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stcarrez%2Fada-util/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stcarrez","download_url":"https://codeload.github.com/stcarrez/ada-util/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248535416,"owners_count":21120555,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ada","beans","json","logging","process","serializer","streams"],"created_at":"2024-07-30T20:00:55.109Z","updated_at":"2025-04-12T07:36:06.286Z","avatar_url":"https://github.com/stcarrez.png","language":"Ada","readme":"# Ada Utility Library\n\n[![Alire](https://img.shields.io/endpoint?url=https://alire.ada.dev/badges/utilada.json)](https://alire.ada.dev/crates/utilada)\n[![Alire](https://img.shields.io/endpoint?url=https://alire.ada.dev/badges/utilada_lzma.json)](https://alire.ada.dev/crates/utilada_lzma)\n[![Alire](https://img.shields.io/endpoint?url=https://alire.ada.dev/badges/utilada_curl.json)](https://alire.ada.dev/crates/utilada_curl)\n[![Alire](https://img.shields.io/endpoint?url=https://alire.ada.dev/badges/utilada_unit.json)](https://alire.ada.dev/crates/utilada_unit)\n[![Alire](https://img.shields.io/endpoint?url=https://alire.ada.dev/badges/utilada_xml.json)](https://alire.ada.dev/crates/utilada_xml)\n[![Alire](https://img.shields.io/endpoint?url=https://alire.ada.dev/badges/utilada_aws.json)](https://alire.ada.dev/crates/utilada_aws)\n[![Build Status](https://img.shields.io/endpoint?url=https://porion.vacs.fr/porion/api/v1/projects/ada-util/badges/build.json)](https://porion.vacs.fr/porion/projects/view/ada-util/summary)\n[![Test Status](https://img.shields.io/endpoint?url=https://porion.vacs.fr/porion/api/v1/projects/ada-util/badges/tests.json)](https://porion.vacs.fr/porion/projects/view/ada-util/xunits)\n[![Coverage](https://img.shields.io/endpoint?url=https://porion.vacs.fr/porion/api/v1/projects/ada-util/badges/coverage.json)](https://porion.vacs.fr/porion/projects/view/ada-util/summary)\n[![Documentation Status](https://readthedocs.org/projects/ada-util/badge/?version=latest)](https://ada-util.readthedocs.io/en/latest/?badge=latest)\n[![Download](https://img.shields.io/badge/download-2.8.0-brightgreen.svg)](http://download.vacs.fr/ada-util/ada-util-2.8.0.tar.gz)\n[![License](https://img.shields.io/badge/license-APACHE2-blue.svg)](LICENSE)\n[![GitLab](https://img.shields.io/badge/repo-GitLab-6C488A.svg)](https://gitlab.com/stcarrez/ada-util)\n[![Commits](https://img.shields.io/github/commits-since/stcarrez/ada-util/2.8.0.svg)](Commits)\n\n\nThis Ada library contains various utility packages for building\nAda applications.  This includes:\n\n* A logging framework close to Java log4j framework,\n* Support for INI and property files,\n* A serialization/deserialization framework for XML, JSON, CSV, Forms\n* Ada beans framework,\n* Encoding/decoding framework (Base16, Base32, Base64, SHA, HMAC-SHA, AES-256),\n* A composing stream framework (raw, files, buffers, pipes, sockets, encryption, decryption, LZMA compression, LZMA decompression),\n* Several concurrency tools (reference counters, counters, pools, fifos, arrays),\n* Process creation and pipes,\n* Support for loading shared libraries (on Windows or Unix),\n* HTTP client library on top of CURL or AWS.\n\nAda Util also provides a small test utility library on top of\nAhven or AUnit to help in writing unit tests.  Ahven is the default testing\nframework as it provides better reports.\n\n## Version 2.8.1  - Under development\n  - Fix #59: Encryption of non-aligned array raises constraint error\n\n## Version 2.8.0  - Nov 2024\n  - Cleanup build environment to drop configure\n  - Improvement of Util.Files.Walk to scan and honor a root .gitignore from any child directory\n  - Feature #55: Support indentation when writing JSON streams\n  - Feature #56: Support for pseudo tty when launching a process\n  - Feature #57: Support for OpenBSD\n\n[List all versions](https://github.com/stcarrez/ada-util/blob/master/NEWS.md)\n\n## Using with Alire\n\nIf you are using [Alire](https://alire.ada.dev/) in your project, run the following command\nwithin your [Alire](https://alire.ada.dev/) project to use the library:\n\n```\nalr with utilada\n```\n\nDepending on your project, you may need one or some of the following other components:\n\n```\nalr with utilada_aws\nalr with utilada_curl\nalr with utilada_lzma\nalr with utilada_unit\nalr with utilada_xml\n```\n\n## Using without Alire\n\nIf you don't have [Alire](https://alire.ada.dev/) or want to build and install the library\non a specific place, run a `setup` command to configure the build as well as installation\ndirectory.\nFor a detailed description on how you can configure, build and install the library\nrefer to the [Installation](https://ada-util.readthedocs.io/en/latest/Installation/) guide.\nOtherwise, you can easily configure and build the library with the steps described below.\n\nThe support for AWS, Curl, LZMA and XML/Ada are enabled only when a `HAVE_XXX=yes` configuration\nvariable has defined.  Run the setup command that records in the `Makefile.conf` the configuration\nyou want to build.\n\nThe `HAVE_ALIRE` configuration allows you to build with [Alire](https://alire.ada.dev/) or not.\n\nThe `UTIL_OS` configuration is mandatory for the setup to indicate the build host configuration.\nIt must one of the allowed values defined in `utilada_conf.gpr` GNAT project in the\n`Os_Version_Type` declaration:\n\n```\n   type Os_Version_Type is (\"none\", \"unix\", \"windows\",\n                            \"linux32\", \"linux64\", \"win32\", \"win64\", \"macos64\",\n                            \"netbsd32\", \"netbsd64\", \"freebsd32\", \"freebsd64\",\n                            \"openbsd32\", \"openbsd64\");\n```\n\nThe example below enables the XML/Ada and AWS components but disables\nthe Curl and LZMA support and disables the use of [Alire](https://alire.ada.dev/) to build\nthe library.\n\n```\nmake setup BUILD=debug PREFIX=/build/install \\\n  UTIL_OS=linux64 \\\n  HAVE_XML_ADA=yes HAVE_AWS=yes \\\n  HAVE_CURL=no HAVE_LZMA=no HAVE_ALIRE=no\n```\n\nThen build, run the unit tests and install by using:\n\n```\nmake\nmake test\nmake install\n```\n\nTo use the installed libraries, make sure your `ADA_PROJECT_PATH` contains the directory\nwhere you installed the libraries (configured by the `PREFIX=\u003cpath\u003e` option in the setup phase).\nThe installed GNAT projects are the same as those used when using [Alire](https://alire.ada.dev/).\n\n# Samples\n\nThe samples are built by using:\n```\ncd samples\nalr build\n```   \n\nor by running:\n\n```\nmake samples\n```\n\n\n| Package              | Example                                                                      |\n|----------------------|------------------------------------------------------------------------------|\n| `Util.Dates.Formats` | [date.adb](https://github.com/stcarrez/ada-util/tree/master/samples/src/date.adb)|\n| `Util.Beans.Objects` | [objcalc.adb](https://github.com/stcarrez/ada-util/tree/master/samples/src/objcalc.adb), [jsonobj.adb](https://github.com/stcarrez/ada-util/tree/master/samples/src/jsonobj.adb), [jsonread.adb](https://github.com/stcarrez/ada-util/tree/master/samples/src/jsonread.adb)|\n| `Util.Beans.Objects.Maps` | [jsonobj.adb](https://github.com/stcarrez/ada-util/tree/master/samples/src/jsonobj.adb), [genentities.adb](https://github.com/stcarrez/ada-util/tree/master/samples/src/genentities.adb)|\n| `Util.Beans.Objects.Vectors` | [datasets.adb](https://github.com/stcarrez/ada-util/tree/master/samples/src/datasets.adb), [jsonobj.adb](https://github.com/stcarrez/ada-util/tree/master/samples/src/jsonobj.adb)|\n| `Util.Beans.Objects.Datasets` | [datasets.adb](https://github.com/stcarrez/ada-util/tree/master/samples/src/datasets.adb)|\n| `Util.Beans.Objects.Iterators` | [jsonread.adb](https://github.com/stcarrez/ada-util/tree/master/samples/src/jsonread.adb)|\n| `Util.Encoders` | [encodes.adb](https://github.com/stcarrez/ada-util/tree/master/samples/src/encodes.adb) |\n| `Util.Encoders.AES` | [decrypt.adb](https://github.com/stcarrez/ada-util/tree/master/samples/src/decrypt.adb), [encrypt.adb](https://github.com/stcarrez/ada-util/tree/master/samples/src/encrypt.adb), [decrypt_array.adb](https://github.com/stcarrez/ada-util/tree/master/samples/src/decrypt_array.adb), [encrypt_array.adb](https://github.com/stcarrez/ada-util/tree/master/samples/src/encrypt_array.adb) |\n| `Util.Encoders.SHA256` | [sha256.adb](https://github.com/stcarrez/ada-util/tree/master/samples/src/sha256.adb) |\n| `Util.Files` | [realpath.adb](https://github.com/stcarrez/ada-util/tree/master/samples/src/realpath.adb), [gperfhash.adb](https://github.com/stcarrez/ada-util/tree/master/samples/src/gperfhash.adb) |\n| `Util.Files.Rolling` | [rolling_file.adb](https://github.com/stcarrez/ada-util/tree/master/samples/src/rolling_file.adb) |\n| `Util.Files.Walk` | [tree.adb](https://github.com/stcarrez/ada-util/tree/master/samples/src/tree.adb) |\n| `Util.Http.Clients` | [wget.adb](https://github.com/stcarrez/ada-util/tree/master/samples/src/wget.adb) |\n| `Util.Log.Loggers` | [log.adb](https://github.com/stcarrez/ada-util/tree/master/samples/src/log.adb), [syslog_appenders.adb](https://github.com/stcarrez/ada-util/tree/master/samples/src/syslog_appenders.adb), [multipro_refs.adb](https://github.com/stcarrez/ada-util/tree/master/samples/src/multipro_refs.adb), [date.adb](https://github.com/stcarrez/ada-util/tree/master/samples/src/date.adb), [xmlrd.adb](https://github.com/stcarrez/ada-util/tree/master/samples/src/xmlrd.adb), [gperfhash.adb](https://github.com/stcarrez/ada-util/tree/master/samples/src/gperfhash.adb), [multipro.adb](https://github.com/stcarrez/ada-util/tree/master/samples/src/multipro.adb), [mapping.adb](https://github.com/stcarrez/ada-util/tree/master/samples/src/mapping.adb), [csv_city.adb](https://github.com/stcarrez/ada-util/tree/master/samples/src/csv_city.adb), [bundles.adb](https://github.com/stcarrez/ada-util/tree/master/samples/src/bundles.adb) |\n| `Util.Measures` | [measures.adb](https://github.com/stcarrez/ada-util/tree/master/samples/src/measures.adb) |\n| `Util.Processes` | [launch.adb](https://github.com/stcarrez/ada-util/tree/master/samples/src/launch.adb), [env.adb](https://github.com/stcarrez/ada-util/tree/master/samples/src/env.adb), [popen.adb](https://github.com/stcarrez/ada-util/tree/master/samples/src/popen.adb) |\n| `Util.Properties` | [properties.adb](https://github.com/stcarrez/ada-util/tree/master/samples/src/properties.adb), [proplist.adb](https://github.com/stcarrez/ada-util/tree/master/samples/src/proplist.adb), [bundles.adb](https://github.com/stcarrez/ada-util/tree/master/samples/src/bundles.adb) |\n| `Util.Refs` | [multipro_refs.adb](https://github.com/stcarrez/ada-util/tree/master/samples/src/multipro_refs.adb) |\n| `Util.Streams.AES` | [decrypt.adb](https://github.com/stcarrez/ada-util/tree/master/samples/src/decrypt.adb), [encrypt.adb](https://github.com/stcarrez/ada-util/tree/master/samples/src/encrypt.adb) |\n| `Util.Streams.Base64` | [lzma_encrypt_b64.adb](https://github.com/stcarrez/ada-util/tree/master/samples/src/lzma_encrypt_b64.adb), [lzma_decrypt_b64.adb](https://github.com/stcarrez/ada-util/tree/master/samples/src/lzma_decrypt_b64.adb), [dumpcert.adb](https://github.com/stcarrez/ada-util/tree/master/samples/src/dumpcert.adb) |\n| `Util.Streams.Buffered.Parts` | [multipart.adb](https://github.com/stcarrez/ada-util/tree/master/samples/src/multipart.adb), [dumpcert.adb](https://github.com/stcarrez/ada-util/tree/master/samples/src/dumpcert.adb) |\n| `Util.Streams.Files` | [copy.adb](https://github.com/stcarrez/ada-util/tree/master/samples/src/copy.adb), [sha256.adb](https://github.com/stcarrez/ada-util/tree/master/samples/src/sha256.adb), [compress.adb](https://github.com/stcarrez/ada-util/tree/master/samples/src/compress.adb), [decompress.adb](https://github.com/stcarrez/ada-util/tree/master/samples/src/decompress.adb), [decrypt.adb](https://github.com/stcarrez/ada-util/tree/master/samples/src/decrypt.adb), [encrypt.adb](https://github.com/stcarrez/ada-util/tree/master/samples/src/encrypt.adb), [lzma_encrypt.adb](https://github.com/stcarrez/ada-util/tree/master/samples/src/lzma_encrypt.adb), [lzma_decrypt.adb](https://github.com/stcarrez/ada-util/tree/master/samples/src/lzma_decrypt.adb) |\n| `Util.Streams.Pipes` | [launch.adb](https://github.com/stcarrez/ada-util/tree/master/samples/src/launch.adb), [popen.adb](https://github.com/stcarrez/ada-util/tree/master/samples/src/popen.adb) |\n| `Util.Serialize.IO.CSV` | [csv_city.adb](https://github.com/stcarrez/ada-util/tree/master/samples/src/csv_city.adb) |\n| `Util.Serialize.IO.JSON` | [serialize.adb](https://github.com/stcarrez/ada-util/tree/master/samples/src/serialize.adb), [json.adb](https://github.com/stcarrez/ada-util/tree/master/samples/src/json.adb), [jsonobj.adb](https://github.com/stcarrez/ada-util/tree/master/samples/src/jsonobj.adb), [jsonread.adb](https://github.com/stcarrez/ada-util/tree/master/samples/src/jsonread.adb), [genentities.adb](https://github.com/stcarrez/ada-util/tree/master/samples/src/genentities.adb) |\n| `Util.Serialize.IO.XML` | [serialize_xml.adb](https://github.com/stcarrez/ada-util/tree/master/samples/src/serialize_xml.adb), [xmi.adb](https://github.com/stcarrez/ada-util/tree/master/samples/src/xmi.adb), [xmlrd.adb](https://github.com/stcarrez/ada-util/tree/master/samples/src/xmlrd.adb) |\n| `Util.Serialize.Mappers` | [csv_reader.adb](https://github.com/stcarrez/ada-util/tree/master/samples/src/csv_reader.adb), [csv_city.adb](https://github.com/stcarrez/ada-util/tree/master/samples/src/csv_city.adb), [xmi.adb](https://github.com/stcarrez/ada-util/tree/master/samples/src/xmi.adb), [xmlrd.adb](https://github.com/stcarrez/ada-util/tree/master/samples/src/xmlrd.adb) |\n| `Util.Serialize.Mappers.Record_Mapper` | [xmi.adb](https://github.com/stcarrez/ada-util/tree/master/samples/src/xmi.adb), [xmlrd.adb](https://github.com/stcarrez/ada-util/tree/master/samples/src/xmlrd.adb) |\n| `Util.Serialize.Mappers.Vector_Mapper` | [json.adb](https://github.com/stcarrez/ada-util/tree/master/samples/src/json.adb), [xmlrd.adb](https://github.com/stcarrez/ada-util/tree/master/samples/src/xmlrd.adb) |\n| `Util.Strings` | [cut.adb](https://github.com/stcarrez/ada-util/tree/master/samples/src/cut.adb), [escape.adb](https://github.com/stcarrez/ada-util/tree/master/samples/src/escape.adb) |\n| `Util.Strings.Tokenizers` | [cut.adb](https://github.com/stcarrez/ada-util/tree/master/samples/src/cut.adb), [escape.adb](https://github.com/stcarrez/ada-util/tree/master/samples/src/escape.adb) |\n| `Util.Strings.Transforms` | [escape.adb](https://github.com/stcarrez/ada-util/tree/master/samples/src/escape.adb), [gperfhash.adb](https://github.com/stcarrez/ada-util/tree/master/samples/src/gperfhash.adb) |\n| `Util.Strings.Vectors` | [gperfhash.adb](https://github.com/stcarrez/ada-util/tree/master/samples/src/gperfhash.adb) |\n\n# Documentation\n\n* [Ada Utility Library Programmer's Guide](https://ada-util.readthedocs.io/en/latest/) [PDF](https://github.com/stcarrez/ada-util/blob/master/docs/utilada-book.pdf)\n* [Wiki Documentation](https://github.com/stcarrez/ada-util/wiki)\n\n# Articles\n\n* [IO stream composition and serialization with Ada Utility Library](https://blog.vacs.fr/vacs/blogs/post.html?post=2022/03/05/IO-stream-composition-and-serialization-with-Ada-Utility-Library)\n* [Easy reading and writing files with Ada Utility Library](https://blog.vacs.fr/vacs/blogs/post.html?post=2020/08/09/Easy-reading-and-writing-files-with-Ada-Utility-Library)\n* [Process creation in Java and Ada](https://blog.vacs.fr/vacs/blogs/post.html?post=2012/03/16/Process-creation-in-Java-and-Ada)\n* [Ada perfect hash generation with gperfhash](https://blog.vacs.fr/vacs/blogs/post.html?post=2012/01/16/Ada-perfect-hash-generation)\n* [Aunit vs Ahven](https://blog.vacs.fr/vacs/blogs/post.html?post=2011/11/27/Aunit-vs-Ahven)\n","funding_links":[],"categories":["Frameworks"],"sub_categories":["Components"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstcarrez%2Fada-util","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstcarrez%2Fada-util","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstcarrez%2Fada-util/lists"}