{"id":16812075,"url":"https://github.com/royjacobson/ser20","last_synced_at":"2025-06-17T10:11:35.465Z","repository":{"id":70698734,"uuid":"579988746","full_name":"royjacobson/ser20","owner":"royjacobson","description":"A C++20 serialization library (cereal fork) ","archived":false,"fork":false,"pushed_at":"2023-01-12T21:23:17.000Z","size":3052,"stargazers_count":29,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-11T01:46:01.440Z","etag":null,"topics":["cplusplus","cplusplus-20","cpp20","serialization"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/royjacobson.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":"2022-12-19T12:51:32.000Z","updated_at":"2025-03-28T21:56:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"69a531c0-e8f3-4172-b569-0775c881ccb1","html_url":"https://github.com/royjacobson/ser20","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/royjacobson/ser20","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/royjacobson%2Fser20","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/royjacobson%2Fser20/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/royjacobson%2Fser20/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/royjacobson%2Fser20/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/royjacobson","download_url":"https://codeload.github.com/royjacobson/ser20/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/royjacobson%2Fser20/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260336345,"owners_count":22993742,"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":["cplusplus","cplusplus-20","cpp20","serialization"],"created_at":"2024-10-13T10:20:35.706Z","updated_at":"2025-06-17T10:11:30.449Z","avatar_url":"https://github.com/royjacobson.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"Ser20 - A C++20 library for serialization\n==========================================\n\nSer20 is a C++20 fork of cereal, a C++11 serialization library. It is completely compatible\nexcept for a namespace change. Thanks to modern meta-programming, Ser20 is 15% smaller and \ncan compile up to 25% faster. Ser20 also has some other runtime optimizations, and is optimized for debug experience and debug symbols size.\n\nSer20 requires compiler support for C++20 concepts. Clang 13 and GCC10 should be modern enough,\nbut CI testing is not set up very hermetically yet.\n\n### Using Ser20\n\n#### Installation\n\nThe best way to use Ser20 is with CMake. Ser20 is not header-only, which means that a compilation step is necessary to use it.\nThe simplest way to do that is to use Ser20 as a subproject in your CMake project.\n\n#### Usage\n\nUsing Ser20 is pretty simple. Except for a new namespace, it is completely compatible with Ser20\nand therefor pretty compatible with boost::serialize as well.\n\nThis is a simple usage example:\n\n```cpp\n#include \u003cser20/types/unordered_map.hpp\u003e\n#include \u003cser20/types/memory.hpp\u003e\n#include \u003cser20/archives/binary.hpp\u003e\n#include \u003cfstream\u003e\n    \nstruct MyRecord {\n  uint8_t x, y;\n  float z;\n\n  template \u003cclass Archive\u003e void serialize(Archive\u0026 ar) { ar(x, y, z); }\n};\n\nstruct SomeData {\n  int32_t id;\n  std::shared_ptr\u003cstd::unordered_map\u003cuint32_t, MyRecord\u003e\u003e data;\n\n  template \u003cclass Archive\u003e void save(Archive\u0026 ar) const { ar(data); }\n\n  template \u003cclass Archive\u003e void load(Archive\u0026 ar) {\n    static int32_t idGen = 0;\n    id = idGen++;\n    ar(data);\n  }\n};\n\nint main() {\n  std::ofstream os(\"out.bin\", std::ios::binary);\n  Ser20::BinaryOutputArchive archive(os);\n\n  SomeData myData;\n  archive(myData);\n\n  return 0;\n}\n```\n\n### Performance\n\nAlthough it's by far not the fastest serialization library out there, Ser20 is\nsometimes two times as fast as cereal and boost::serialization in binary serialization:\n\n![A three way benchmark of boost cereal and ser20](doc/benchmarks.png)\n\nThis difference is mostly due to buffering of small reads and writes to ostreams.\n\n## Ser20 has a permissive license\n\nSer20 is licensed under the [BSD license](http://opensource.org/licenses/BSD-3-Clause).\n\n## Ser20 build status\n\n* [![Linux build status](https://github.com/royjacobson/ser20/actions/workflows/ci.yml/badge.svg)](https://github.com/royjacobson/ser20/actions/workflows/ci.yml)\n* [![Mac build status](https://github.com/royjacobson/ser20/actions/workflows/ci-macos.yml/badge.svg)](https://github.com/royjacobson/ser20/actions/workflows/ci-macos.yml)\n\u003c!---\n* [![Windows build status](https://ci.appveyor.com/api/projects/status/91aou6smj36or0vb/branch/master?svg=true)](https://ci.appveyor.com/project/AzothAmmo/Ser20/branch/master)\n\n---\u003e\n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froyjacobson%2Fser20","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Froyjacobson%2Fser20","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froyjacobson%2Fser20/lists"}