{"id":17278138,"url":"https://github.com/mingun/serde-pod","last_synced_at":"2026-01-30T10:13:22.526Z","repository":{"id":52383488,"uuid":"162022720","full_name":"Mingun/serde-pod","owner":"Mingun","description":"Простая сериализация данных в формате, близком к расположению элементов в памяти","archived":false,"fork":false,"pushed_at":"2021-04-30T06:21:21.000Z","size":22,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-28T14:05:34.662Z","etag":null,"topics":["pod","serde","serde-serialization"],"latest_commit_sha":null,"homepage":null,"language":"Rust","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/Mingun.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-12-16T17:04:37.000Z","updated_at":"2021-04-30T06:21:20.000Z","dependencies_parsed_at":"2022-08-23T00:31:29.577Z","dependency_job_id":null,"html_url":"https://github.com/Mingun/serde-pod","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mingun%2Fserde-pod","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mingun%2Fserde-pod/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mingun%2Fserde-pod/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mingun%2Fserde-pod/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Mingun","download_url":"https://codeload.github.com/Mingun/serde-pod/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247459701,"owners_count":20942271,"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":["pod","serde","serde-serialization"],"created_at":"2024-10-15T09:10:53.916Z","updated_at":"2026-01-30T10:13:22.462Z","avatar_url":"https://github.com/Mingun.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"serde-pod (plain old data)\n==========================\nРеализует простую сериализацию и десериализацию структур, наиболее близкую к их представлению в памяти.\n\n# Пример\nЧитаем заголовок GFF файла (формат Bioware, используемый для хранения данных в\nтаких играх, как Neverwinter Nights, Neverwinter Nights 2 и Ведьмак):\n\n```rust\nextern crate byteorder;\n#[macro_use]\nextern crate serde_derive;\nextern crate serde_pod;\nuse serde_pod::{from_bytes, Result};\n\n#[derive(Debug, Deserialize, PartialEq)]\nstruct Signature([u8; 4]);\n\n#[derive(Debug, Deserialize, PartialEq)]\nstruct Version([u8; 4]);\n\n#[derive(Debug, Deserialize, PartialEq)]\nstruct Section {\n  offset: u32,\n  count:  u32,\n}\n#[derive(Debug, Deserialize, PartialEq)]\nstruct GffHeader {\n  signature:     Signature,\n  version:       Version,\n  structs:       Section,\n  fields:        Section,\n  labels:        Section,\n  field_data:    Section,\n  field_indices: Section,\n  list_indices:  Section,\n}\n\nfn main() {\n  let header: GffHeader = from_bytes::\u003cbyteorder::LE, _\u003e(\u0026[\n    // Signature\n    0x47, 0x55, 0x49, 0x20,\n    // Version\n    0x56, 0x33, 0x2E, 0x32,\n    // structs\n    0x38, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00,\n    // fields\n    0xEC, 0x00, 0x00, 0x00, 0x93, 0x00, 0x00, 0x00,\n    // labels\n    0xD0, 0x07, 0x00, 0x00, 0x1A, 0x00, 0x00, 0x00,\n    // field_data\n    0x70, 0x09, 0x00, 0x00, 0x1D, 0x02, 0x00, 0x00,\n    // field_indices\n    0x8D, 0x0B, 0x00, 0x00, 0x4C, 0x02, 0x00, 0x00,\n    // list_indices\n    0xD9, 0x0D, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00,\n  ])?;\n\n  assert_eq!(header, GffHeader {\n    signature:     Signature(*b\"GUI \"),\n    version:       Version(*b\"V3.2\"),\n    structs:       Section { offset:   0x38, count:  15 },\n    fields:        Section { offset:   0xEC, count: 147 },\n    labels:        Section { offset: 0x07D0, count:  26 },\n    field_data:    Section { offset: 0x0970, count: 541 },\n    field_indices: Section { offset: 0x0B8D, count: 588 },\n    list_indices:  Section { offset: 0x0DD9, count:  36 },\n  });\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmingun%2Fserde-pod","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmingun%2Fserde-pod","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmingun%2Fserde-pod/lists"}