{"id":18044603,"url":"https://github.com/ctamblyn/bit-iter","last_synced_at":"2025-04-10T01:06:39.556Z","repository":{"id":46199186,"uuid":"372299656","full_name":"ctamblyn/bit-iter","owner":"ctamblyn","description":"Rust crate to iterate forwards or backwards over the positions of set bits in a word.  Useful for working with event flags, some bitboards etc.","archived":false,"fork":false,"pushed_at":"2025-03-04T23:31:05.000Z","size":44,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-10T01:06:30.653Z","etag":null,"topics":["bit-algorithms","bit-iterator","bit-twiddling","bits","flags","iterator","no-std","rust"],"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/ctamblyn.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":"2021-05-30T19:32:20.000Z","updated_at":"2025-03-04T23:31:07.000Z","dependencies_parsed_at":"2022-09-08T11:30:27.990Z","dependency_job_id":null,"html_url":"https://github.com/ctamblyn/bit-iter","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctamblyn%2Fbit-iter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctamblyn%2Fbit-iter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctamblyn%2Fbit-iter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctamblyn%2Fbit-iter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ctamblyn","download_url":"https://codeload.github.com/ctamblyn/bit-iter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248137887,"owners_count":21053775,"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":["bit-algorithms","bit-iterator","bit-twiddling","bits","flags","iterator","no-std","rust"],"created_at":"2024-10-30T18:09:34.166Z","updated_at":"2025-04-10T01:06:39.534Z","avatar_url":"https://github.com/ctamblyn.png","language":"Rust","readme":"# bit-iter\n\n![Test results](https://github.com/ctamblyn/bit-iter/actions/workflows/quickstart.yml/badge.svg)\n[![Crates.io](https://img.shields.io/crates/v/bit-iter)](https://crates.io/crates/bit-iter)\n[![Documentation](https://docs.rs/bit-iter/badge.svg)](https://docs.rs/bit-iter)\n\nIterate forwards or backwards over the positions of bits set in a word.\n\nA `BitIter` may be constructed from any integral value, and returns the\npositions of the `1` bits in ascending order.\n\n`BitIter` implements `DoubleEndedIterator`, so you can iterate over the\npositions of the set bits in descending order too.\n\n## Example\n\n```rust\nfn main() {\n    use bit_iter::*;\n\n    let x : u32 = 0x10001;\n\n    for b in BitIter::from(x) {\n        println!(\"Bit {} is set.\", b);\n    }\n\n    println!(\"In reverse order:\");\n\n    for b in BitIter::from(x).rev() {\n        println!(\"Bit {} is set.\", b);\n    }\n}\n```\n\nOutput:\n\n```text\nBit 0 is set.\nBit 16 is set.\nIn reverse order:\nBit 16 is set.\nBit 0 is set.\n```\n\n## Minimum supported Rust version (MSRV) policy\n\n`bit-iter`'s current minimum supported Rust version (MSRV) is **1.82.0**.\n\n`bit-iter` is guaranteed to compile with that version.  It might also compile\nwith older versions, but that could change in a future patch release.\n\nIf the MSRV of `bit-iter` changes, that will be done in a _minor_ version\nrelease (e.g. 1.3.x -\u003e 1.4.0).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fctamblyn%2Fbit-iter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fctamblyn%2Fbit-iter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fctamblyn%2Fbit-iter/lists"}