{"id":18604756,"url":"https://github.com/avsystem/avs_commons","last_synced_at":"2025-07-26T19:05:29.958Z","repository":{"id":14099902,"uuid":"16804272","full_name":"AVSystem/avs_commons","owner":"AVSystem","description":"A set of common code used in AVSystem for projects written in C.","archived":false,"fork":false,"pushed_at":"2025-05-28T11:28:38.000Z","size":5190,"stargazers_count":7,"open_issues_count":1,"forks_count":13,"subscribers_count":25,"default_branch":"master","last_synced_at":"2025-05-28T12:32:21.542Z","etag":null,"topics":["c","iot","networking"],"latest_commit_sha":null,"homepage":"","language":"C","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/AVSystem.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2014-02-13T13:53:06.000Z","updated_at":"2025-05-28T11:28:19.000Z","dependencies_parsed_at":"2024-10-24T14:12:15.754Z","dependency_job_id":"3eda3097-02e0-43da-99c8-a1f53049d5bb","html_url":"https://github.com/AVSystem/avs_commons","commit_stats":null,"previous_names":[],"tags_count":83,"template":false,"template_full_name":null,"purl":"pkg:github/AVSystem/avs_commons","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AVSystem%2Favs_commons","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AVSystem%2Favs_commons/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AVSystem%2Favs_commons/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AVSystem%2Favs_commons/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AVSystem","download_url":"https://codeload.github.com/AVSystem/avs_commons/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AVSystem%2Favs_commons/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267213462,"owners_count":24053912,"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","status":"online","status_checked_at":"2025-07-26T02:00:08.937Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["c","iot","networking"],"created_at":"2024-11-07T02:18:55.109Z","updated_at":"2025-07-26T19:05:29.911Z","avatar_url":"https://github.com/AVSystem.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AVSystem Commons Library\n\nA set of common code used in [AVSystem](http://www.avsystem.com/) for projects written in C.\n\nCurrently the included components are:\n\n * Data structures\n   * `avs_buffer` - simple data buffer with circular-like semantics\n   * `avs_list` - lightweight, generic and type-safe implementation of a singly linked list, with API optimized for ad-hoc usage\n   * `avs_rbtree` - basic implementation of a red-black binary search tree\n   * `avs_vector` - generic implementation of a C++-style vector (dynamic array)\n * Networking framework\n   * `avs_http` - minimal implementation of a [Hypertext Transfer Protocol (HTTP)](https://tools.ietf.org/html/rfc7230) client\n   * `avs_net` - abstraction layer for TCP, UDP, SSL/TLS and DTLS network sockets, as well as DNS resolution and URL parsing\n   * **NOTE:** `avs_commons` versions up to 4.0.x included an `avs_coap` module. This has been removed in favor of the [new CoAP implementation](https://github.com/AVSystem/Anjay/tree/master/deps/avs_coap) distributed as part of [Anjay](https://github.com/AVSystem/Anjay)\n * Other modules\n   * `avs_algorithm` - currently contains a base64 encoder and decoder\n   * `avs_log` - simple logging framework\n   * `avs_stream` - generic framework for I/O streams; includes pre-implemented streams that can be used through its unified API:\n     * `md5.h` - calculating MD5 hashes\n     * `netbuf.h` - buffered network I/O\n     * `stream_file.h` - file I/O\n     * `stream_inbuf.h` - read-only wrapper for raw memory buffers\n     * `stream_membuf.h` - in-memory stream optimized for a single-message write-then-read cycle\n     * `stream_outbuf.h` - write-only wrapper for raw memory buffers\n   * `avs_unit` - simple and easy to use unit testing framework\n   * `avs_utils` - currently contains utility function for handling time values, psudorandom number generation and string tokenization\n\nMost of the library is written in standard and portable C99. There are some dependencies on POSIX APIs, but there are provisions for replacing them when necessary (see the `compat` directory for details).\n\n`avs_unit` relies on some GCC-isms and is unlikely to work with any compiler that is not based on either GCC or Clang.\n\nThe code is available under [Apache 2.0 License](LICENSE).\n\n## Building\n\n### Building using CMake\n\nThe preferred way of building `avs_commons` is to use CMake:\n\n```sh\ncmake . \u0026\u0026\nmake \u0026\u0026\nmake install\n```\n\nYou may use `cmake -LH` or tools such as `cmake-gui` or `ccmake` to examine the available configuration options.\n\n### Alternative build systems\n\nAlternatively, you may use any other build system. You will need to:\n\n * Prepare your `avs_commons_config.h` file. See the comments in [`avs_commons_config.h.in`](include_public/avsystem/commons/avs_commons_config.h.in) for details.\n * Configure your build system so that:\n   * At least all `*.c` and `*.h` files from `src` and `include_public` directories are preserved, with the directory structure intact.\n   * All `*.c` files inside `src` or any of its direct or indirect subdirectories are compiled.\n   * `src` and `include_public` directories are included in the header search path when compiling `avs_commons`.\n   * `include_public` directory or a copy of it is included in the header search path when compiling dependent application code.\n\nAn example simplistic build process for a Unix-like shell could be:\n\n```sh\n# configuration\ncp include_public/avsystem/commons/avs_commons_config.h.in include_public/avsystem/commons/avs_commons_config.h\nvi include_public/avsystem/commons/avs_commons_config.h  # manually configure the library here\n\n# compilation\ncc -Iinclude_public -Isrc -c $(find src -name '*.c')\nar rcs libavs_commons.a *.o\n\n# installation\ncp libavs_commons.a /usr/local/lib/\ncp -r include_public/avsystem /usr/local/include/\n```\n\n## Contact, contributing\n\n * Your feedback is important! Feel free to create an Issue here on GitHub.\n * If you would like to contribute to avs_commons just send us a pull request.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favsystem%2Favs_commons","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Favsystem%2Favs_commons","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favsystem%2Favs_commons/lists"}