{"id":27015295,"url":"https://github.com/fregate/termlib","last_synced_at":"2025-04-04T14:18:00.084Z","repository":{"id":151522752,"uuid":"624326831","full_name":"fregate/termlib","owner":"fregate","description":"Erlang binary term parser/builder","archived":false,"fork":false,"pushed_at":"2024-11-01T08:08:45.000Z","size":122,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-11-01T09:18:57.779Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fregate.png","metadata":{"files":{"readme":"README.md","changelog":null,"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}},"created_at":"2023-04-06T08:16:22.000Z","updated_at":"2024-09-16T09:57:55.000Z","dependencies_parsed_at":null,"dependency_job_id":"ff07a687-607a-4361-b063-5ca67c8668a8","html_url":"https://github.com/fregate/termlib","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fregate%2Ftermlib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fregate%2Ftermlib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fregate%2Ftermlib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fregate%2Ftermlib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fregate","download_url":"https://codeload.github.com/fregate/termlib/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247190219,"owners_count":20898702,"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":[],"created_at":"2025-04-04T14:17:59.420Z","updated_at":"2025-04-04T14:18:00.069Z","avatar_url":"https://github.com/fregate.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# termlib\nErlang binary term parser/builder\n\nLightwieght library to parse Erlang binary representation of terms (after erlang:term_to_binary) and create binary to parse with erlang:binary_to_term.\n\nNot all Erlang types are supprted at this moment.\n\n\n# Roadmap\n1. Support all erlang types. And make some C++ equivalents\n2. Rewrite it for look more modern, like [glaze](https://github.com/stephenberry/glaze/). For example:\n```\n\tstruct MyStruct {\n\t\tint value;\n\t\tstd::string atom;\n\t\tstd::string str;\n\t\tstd::vector\u003cint\u003e single_type_list;\n\t\tstd::tuple\u003cint, std::string, double\u003e various_types_list;\n\t};\n\n\t// Define order of field in Term\n\ttemplate\u003c\u003e\n\tstruct erlterm::meta\u003cMyStruct\u003e {\n\t\tusing T = MyStruct;\n\t\tstatic constexpr auto value = term(\n\t\t\t\u0026T::value,\n\t\t\t\u0026T::str,\n\t\t\t\u0026T::atom,\n\t\t\t\u0026T::single_type_list,\n\t\t\t\u0026T::various_types_list\n\t\t);\n\t};\n\n\t// usage\n\tMyStruct s{};\n\tauto ec = erlterm::read_term\u003cMyStruct\u003e(data, s);\n\tif (ec) {\n\t\t// Handle error\n\t}\n\n\t// or\n\n\tauto s = erlterm::read_term\u003cMyStruct\u003e(data);\n\tif (s) { // check std::expected\n\t\t// use s.value()\n\t\t// else - handle error\n\t}\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffregate%2Ftermlib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffregate%2Ftermlib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffregate%2Ftermlib/lists"}