{"id":15910599,"url":"https://github.com/louisgariepy/const-chunks","last_synced_at":"2025-10-27T20:42:18.680Z","repository":{"id":164631484,"uuid":"640084319","full_name":"LouisGariepy/const-chunks","owner":"LouisGariepy","description":"Extension trait to chunk iterators into const-length arrays.","archived":false,"fork":false,"pushed_at":"2024-01-23T17:53:59.000Z","size":36,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-04-24T19:49:19.960Z","etag":null,"topics":["adapter","chunk","iterator","rust"],"latest_commit_sha":null,"homepage":"","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/LouisGariepy.png","metadata":{"files":{"readme":"README.md","changelog":null,"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}},"created_at":"2023-05-13T00:24:19.000Z","updated_at":"2023-10-09T08:11:39.000Z","dependencies_parsed_at":"2024-01-23T18:49:43.383Z","dependency_job_id":null,"html_url":"https://github.com/LouisGariepy/const-chunks","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LouisGariepy%2Fconst-chunks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LouisGariepy%2Fconst-chunks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LouisGariepy%2Fconst-chunks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LouisGariepy%2Fconst-chunks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LouisGariepy","download_url":"https://codeload.github.com/LouisGariepy/const-chunks/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244931366,"owners_count":20534005,"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":["adapter","chunk","iterator","rust"],"created_at":"2024-10-06T15:10:27.867Z","updated_at":"2025-10-27T20:42:18.601Z","avatar_url":"https://github.com/LouisGariepy.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `const-chunks`\n\n\u003cdiv align=\"center\"\u003e\n  \u003c!-- Version --\u003e\n  \u003ca href=\"https://crates.io/crates/const-chunks\"\u003e\n    \u003cimg src=\"https://img.shields.io/crates/v/const-chunks.svg?style=flat-square\"\n    alt=\"Crates.io version\" /\u003e\n  \u003c/a\u003e\n\n  \u003c!-- Docs --\u003e\n  \u003ca href=\"https://docs.rs/const-chunks/latest/const_chunks/\"\u003e\n    \u003cimg alt=\"docs.rs\" src=\"https://img.shields.io/docsrs/const-chunks?style=flat-square\"\u003e\n  \u003c/a\u003e\n  \n  \u003c!-- Dependencies --\u003e\n  \u003ca href=\"https://deps.rs/repo/github/LouisGariepy/const-chunks\"\u003e\n    \u003cimg src=\"https://deps.rs/repo/github/LouisGariepy/const-chunks/status.svg?style=flat-square\"\n    alt=\"Crates.io version\" /\u003e\n  \u003c/a\u003e\n\n  \u003c!-- no_std --\u003e\n  \u003cpicture\u003e\n    \u003cimg alt=\"no_std compatible\" src=\"https://img.shields.io/badge/no__std-compatible-light_green?style=flat-square\"/\u003e\n  \u003c/picture\u003e\n \n  \u003c!-- License --\u003e\n  \u003ca href=\"https://github.com/LouisGariepy/const-chunks#License\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/License-APACHE--2.0%2FMIT-blue?style=flat-square\" alt=\"License\"\u003e\n  \u003c/a\u003e\n\u003c/div\u003e\n\n\u003cbr/\u003e\n\nThis crate provides a `#![no_std]`-compatible extension trait that lets you chunk iterators into constant-length arrays using `const` generics.\n\nSee the [docs](https://docs.rs/const-chunks/latest/const_chunks/) for more info.\n\n```rust\nuse const_chunks::IteratorConstChunks;\n\nlet mut iter = vec![1, 2, 3, 4, 5].into_iter().const_chunks::\u003c2\u003e();\nassert_eq!(iter.next(), Some([1,2]));\nassert_eq!(iter.next(), Some([3,4]));\nassert_eq!(iter.next(), None);\n\nlet mut remainder = iter.into_remainder().unwrap();\nassert_eq!(remainder.next(), Some(5));\nassert_eq!(remainder.next(), None);\n```\n\n## Safety\n\nThis crate uses unsafe to manipulate uninitialized memory.\n\nTo prevent undefined behavior, the code runs MIRI in CI. It's also well-documented and easy to audit.\n\nNevertheless, you should still consider this fact if you're trying to minimize unsafe dependencies.\n\n## MSRV\n\nThis crate requires `rustc` version 1.65 or newer.\n\nThis crate's MSRV is enforced through the manifest's `rust-version` key.\n\n## License\n\nLicensed under either of\n\n* Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or \u003chttp://www.apache.org/licenses/LICENSE-2.0\u003e)\n* MIT license ([LICENSE-MIT](LICENSE-MIT) or \u003chttp://opensource.org/licenses/MIT\u003e)\n\nat your option.\n\n### Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flouisgariepy%2Fconst-chunks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flouisgariepy%2Fconst-chunks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flouisgariepy%2Fconst-chunks/lists"}