{"id":20424947,"url":"https://github.com/avitex/rust-zc","last_synced_at":"2025-07-24T00:34:49.122Z","repository":{"id":54436527,"uuid":"318103335","full_name":"avitex/rust-zc","owner":"avitex","description":"Rust library providing `Zc` for self-referential zero-copy structures","archived":false,"fork":false,"pushed_at":"2021-02-18T05:00:31.000Z","size":159,"stargazers_count":41,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-14T05:37:28.005Z","etag":null,"topics":["no-std","rust-lang","zero-copy"],"latest_commit_sha":null,"homepage":"","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/avitex.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":"2020-12-03T06:54:20.000Z","updated_at":"2024-09-30T00:57:41.000Z","dependencies_parsed_at":"2022-08-13T15:40:20.029Z","dependency_job_id":null,"html_url":"https://github.com/avitex/rust-zc","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/avitex/rust-zc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avitex%2Frust-zc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avitex%2Frust-zc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avitex%2Frust-zc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avitex%2Frust-zc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/avitex","download_url":"https://codeload.github.com/avitex/rust-zc/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avitex%2Frust-zc/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266490695,"owners_count":23937504,"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-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"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":["no-std","rust-lang","zero-copy"],"created_at":"2024-11-15T07:11:35.991Z","updated_at":"2025-07-24T00:34:49.080Z","avatar_url":"https://github.com/avitex.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"[![Build Status](https://github.com/avitex/rust-zc/workflows/build/badge.svg)](https://github.com/avitex/rust-zc/actions?query=workflow:build)\n[![Coverage Status](https://codecov.io/gh/avitex/rust-zc/branch/master/graph/badge.svg?token=X2LXHI8VYL)](https://codecov.io/gh/avitex/rust-zc)\n[![Crate](https://img.shields.io/crates/v/zc.svg)](https://crates.io/crates/zc)\n[![Docs](https://docs.rs/zc/badge.svg)](https://docs.rs/zc)\n\n# rust-zc\n\n**Rust library providing `Zc` for self-referential zero-copy structures.**  \nDocumentation hosted on [docs.rs](https://docs.rs/zc).\n\n```toml\nzc = \"0.4\"\n```\n\n## Usage\n\n```rust\nuse zc::Dependant;\n\n#[derive(PartialEq, Debug, Dependant)]\npub struct StructWithBytes\u003c'a\u003e(\u0026'a [u8]);\n\nimpl\u003c'a\u003e From\u003c\u0026'a [u8]\u003e for StructWithBytes\u003c'a\u003e {\n    fn from(bytes: \u0026'a [u8]) -\u003e Self {\n        Self(\u0026bytes[1..])\n    }\n}\n\nfn main() {\n    let owner = vec![1, 2, 3];\n    let data = zc::from!(owner, StructWithBytes, [u8]);\n\n    assert_eq!(\n        data.get::\u003cStructWithBytes\u003e(),\n        \u0026StructWithBytes(\u0026[2, 3])\n    )\n}\n```\n\n## Testing\n\nRun standard tests:\n\n```sh\ncargo test\n```\n\nRun miri tests:\n\n```sh\ncargo miri test --test test_zc\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favitex%2Frust-zc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Favitex%2Frust-zc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favitex%2Frust-zc/lists"}