{"id":23896508,"url":"https://github.com/brecert/anyint","last_synced_at":"2025-02-23T07:29:56.279Z","repository":{"id":57674260,"uuid":"355949687","full_name":"brecert/anyint","owner":"brecert","description":"a rust crate providing traits and structs for working with integers of any bit size","archived":false,"fork":false,"pushed_at":"2022-04-18T14:00:44.000Z","size":243,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"nightly","last_synced_at":"2025-02-04T21:46:59.719Z","etag":null,"topics":["arbitrary-sized-integers","integers","numbers","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/brecert.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-04-08T14:56:08.000Z","updated_at":"2022-06-25T13:14:51.000Z","dependencies_parsed_at":"2022-09-11T17:52:02.701Z","dependency_job_id":null,"html_url":"https://github.com/brecert/anyint","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/brecert%2Fanyint","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brecert%2Fanyint/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brecert%2Fanyint/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brecert%2Fanyint/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brecert","download_url":"https://codeload.github.com/brecert/anyint/tar.gz/refs/heads/nightly","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240284938,"owners_count":19777195,"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":["arbitrary-sized-integers","integers","numbers","rust"],"created_at":"2025-01-04T16:52:51.255Z","updated_at":"2025-02-23T07:29:56.246Z","avatar_url":"https://github.com/brecert.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# anyint — any bit sized integers\n\n[![Latest Version](https://img.shields.io/crates/v/anyint.svg)](https://crates.io/crates/anyint)\n[![Rust Documentation](https://img.shields.io/badge/api-rustdoc-blue.svg)](https://docs.rs/anyint)\n\nThis library provides traits and structs for working with integers of any bit size.\n\n*Compiler support: tested with rustc 1.61.0 nightly, unsure about support on lower versions*\n\n### Example\n\n```rust\nuse anyint::prelude::*;\nuse anyint::macros::{Int, int};\n\n// int macro to make working with the types easier\nassert_eq!(int!(0u6), int::\u003cu8, 6\u003e::new(0));\nassert_eq!(int!(-32i6), int::\u003ci8, 6\u003e::new(-32));\n\n// many of the same methods that the standard library integers have\nlet num = int!(63u6).wrapping_add(int!(3u6));\nassert_eq!(num.0, 2);\n\n// Int type macro to make working with the types easier\nfn add(a: u16, b: u16) -\u003e Int![u12] {\n  int::new(a) + int::new(b)\n}\nassert_eq!(add(5, 10), int::new(15));\n```\n\n### Details / Notes\n\nThe underlying representation of your integer will be what is provided for the `anyint::int` struct.\n\nThis is to keep performance reasonable and the implementations simple.\n\nMost of the common methods that std integers have should also be implemented here, if there's any that's missing feel free to create an issue about it.\n\n### FAQ\n\n1. **Is this crate `no_std` compatable?**\n    * Yes! Just add `default-features = false`.\n\n\n\u003c!-- This readme is heavily inspired by yaahc's and dtolnay's crate READMEs, thank you! --\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrecert%2Fanyint","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrecert%2Fanyint","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrecert%2Fanyint/lists"}