{"id":22253515,"url":"https://github.com/nitrokey/serde-byte-array","last_synced_at":"2025-08-14T07:43:52.030Z","repository":{"id":80182450,"uuid":"605644682","full_name":"Nitrokey/serde-byte-array","owner":"Nitrokey","description":null,"archived":false,"fork":false,"pushed_at":"2023-09-05T08:03:32.000Z","size":24,"stargazers_count":6,"open_issues_count":1,"forks_count":2,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-08-09T22:43:20.588Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","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/Nitrokey.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE-APACHE","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":"2023-02-23T15:44:37.000Z","updated_at":"2024-12-13T21:01:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"80563f28-d4b6-4603-9d50-f53631df9991","html_url":"https://github.com/Nitrokey/serde-byte-array","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/Nitrokey/serde-byte-array","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nitrokey%2Fserde-byte-array","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nitrokey%2Fserde-byte-array/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nitrokey%2Fserde-byte-array/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nitrokey%2Fserde-byte-array/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Nitrokey","download_url":"https://codeload.github.com/Nitrokey/serde-byte-array/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nitrokey%2Fserde-byte-array/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270385016,"owners_count":24574537,"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-08-14T02:00:10.309Z","response_time":75,"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":[],"created_at":"2024-12-03T07:18:45.322Z","updated_at":"2025-08-14T07:43:52.020Z","avatar_url":"https://github.com/Nitrokey.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# serde\\_byte\\_array\n\nWrapper types to enable optimized handling of `[u8; N]`\n\n## Explanation\n\nWithout specialization, Rust forces Serde to treat `[u8; N]` just like any\nother array. In reality this particular array can often be serialized and\ndeserialized in a more efficient, compact representation in many formats.\n\nWhen working with such a format, you can opt into specialized handling of\n`[u8; N]` by wrapping it in `serde_byte_array::ByteArray\u003cN\u003e`.\n\nAdditionally this crate supports the Serde `with` attribute to enable efficient\nhandling of `[u8; N]` and `\u0026[u8; N]`  in structs without needing a wrapper type.\n\n## Example\n\n```rust\nuse serde::{Deserialize, Serialize};\n\n#[derive(Deserialize, Serialize)]\nstruct Efficient\u003c'a\u003e {\n    #[serde(with = \"serde_byte_array\")]\n    bytes: [u8; 3],\n\n    #[serde(with = \"serde_byte_array\", borrow)]\n    bytes_ref: \u0026'a [u8; 3],\n}\n```\n\n\u003cbr\u003e\n\n#### License\n\n\u003csup\u003e\nLicensed under either of \u003ca href=\"LICENSE-APACHE\"\u003eApache License, Version\n2.0\u003c/a\u003e or \u003ca href=\"LICENSE-MIT\"\u003eMIT license\u003c/a\u003e at your option.\n\u003c/sup\u003e\n\n\u003cbr\u003e\n\n\u003csub\u003e\nUnless you explicitly state otherwise, any contribution intentionally submitted\nfor inclusion in this crate by you, as defined in the Apache-2.0 license, shall\nbe dual licensed as above, without any additional terms or conditions.\n\u003c/sub\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnitrokey%2Fserde-byte-array","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnitrokey%2Fserde-byte-array","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnitrokey%2Fserde-byte-array/lists"}