{"id":15573067,"url":"https://github.com/zsuzuki/structbuilder","last_synced_at":"2025-03-29T06:30:17.862Z","repository":{"id":57572614,"uuid":"118244411","full_name":"zsuzuki/structbuilder","owner":"zsuzuki","description":"C++ struct builder by toml(by Golang)","archived":false,"fork":false,"pushed_at":"2019-05-14T01:57:28.000Z","size":1043,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-24T01:52:38.565Z","etag":null,"topics":["cpp14","golang","lua","serialize","struct"],"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/zsuzuki.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}},"created_at":"2018-01-20T13:16:14.000Z","updated_at":"2019-05-14T01:57:30.000Z","dependencies_parsed_at":"2022-08-24T08:41:23.478Z","dependency_job_id":null,"html_url":"https://github.com/zsuzuki/structbuilder","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/zsuzuki%2Fstructbuilder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zsuzuki%2Fstructbuilder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zsuzuki%2Fstructbuilder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zsuzuki%2Fstructbuilder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zsuzuki","download_url":"https://codeload.github.com/zsuzuki/structbuilder/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246149952,"owners_count":20731405,"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":["cpp14","golang","lua","serialize","struct"],"created_at":"2024-10-02T18:10:20.825Z","updated_at":"2025-03-29T06:30:17.809Z","avatar_url":"https://github.com/zsuzuki.png","language":"C++","readme":"# structbuilder\nC++ struct builder by toml(by Golang)\n\n# package\n\nused toml package:[go-toml](https://github.com/pelletier/go-toml)\n\nused json serializer:[json](https://github.com/nlohmann/json)\n\ntarget lua utility:[sol2](https://github.com/ThePhD/sol2)\n\n# usage\n\n```shell\n$ structbuilder [-format] [-s] [-cpp output-c++source] [-hpp output-c++header] [-json output-json-serializer-c++-source] [-lua output-lua-interface] .toml-file\n```\n- \"-format\" use clang-format for output-files\n- \"-s\" select serializer format\n- \"-cpp\" name of output c++ source file(for serializer format only)\n- \"-hpp\" name of header c++\n- \"-json\" output json serializer source\n- \"-lua\" output lua interface source\n\n# toml format\n\n## struct format\n\nstruct [struct.hpp](cpp/struct.hpp)\n```toml\nnamespace = \"Sample\"\nlocal_include = [\"serializer.hpp\"]\ninclude = [\"cstdint\",\"vector\",\"string\",\"array\",\"nlohmann/json.hpp\"]\nstruct_name = \"Test\"\ncomment = \"\"\"\nTest class\n\"\"\"\n\nserializer_json = \"nlohmann::json\"\nserializer = \"Serializer\"\nlua = true\n\n[[member]]\nname = \"index\"\ntype = \"bit-unsigned\"\nbits = 5\n[[member]]\nname = \"beer_type\"\ntype = \"bit-enum\"\ncast = \"BeerType\"\nbits = 5\nenum = [\"Ales\",\"Larger\",\"Pilsner\",\"Lambic\",\"IPA\"]\n[[member]]\nname = \"generation\"\ntype = \"bit-signed\"\nbits = 3\n[[member]]\nname = \"enabled\"\ntype = \"bit-bool\"\n[[member]]\nname = \"count\"\ntype = \"int\"\n[[member]]\nname = \"max_speed\"\ntype = \"uint32_t\"\n[[member]]\nname = \"note\"\ntype = \"Note\"\ncontainer = \"std::array\"\nreserve = 4\n    [[member.Note]]\n    name = \"page\"\n    type = \"int\"\n    [[member.Note]]\n    name = \"line\"\n    type = \"int\"\n```\n\n## serializer format\n\nserialize [test.hpp](cpp/test.hpp) \n\n```toml\nnamespace = \"Sample\"\nlocal_include = [\"test.hpp\", \"serializer.hpp\"]\n# include = [\"serializer.hpp\"]\nversion = 1001 # m.n.oo\nunsupport = 999 # 0.9.99\n\nstruct_name = \"Test\"\n\n[[member]]\nname = \"child_list\"\nvar_name = \"t\"\nsize_type = \"uint8_t\"\nraw_access = true\n\n[[member.child]]\nname = \"field\"\ntype = \"struct\"\nraw_access = true\n\n[[member.child]]\nname = \"message\"\ntype = \"char\"\nsize_type = \"uint8_t\"\n#raw_access = true\n\n[[member.child]]\nname = \"ranking\"\ntype = \"uint16_t\"\nsize_type = \"uint8_t\"\ncontainer = true\nraw_access = true\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzsuzuki%2Fstructbuilder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzsuzuki%2Fstructbuilder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzsuzuki%2Fstructbuilder/lists"}