{"id":16680946,"url":"https://github.com/llogiq/overflower","last_synced_at":"2025-04-07T13:07:59.575Z","repository":{"id":52406363,"uuid":"59425137","full_name":"llogiq/overflower","owner":"llogiq","description":"A Rust compiler plugin and support library to annotate overflow behavior","archived":false,"fork":false,"pushed_at":"2023-05-29T04:58:23.000Z","size":87,"stargazers_count":106,"open_issues_count":9,"forks_count":5,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-31T11:06:56.096Z","etag":null,"topics":["arithmetic","hacktoberfest"],"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/llogiq.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-05-22T17:28:31.000Z","updated_at":"2025-03-11T15:09:34.000Z","dependencies_parsed_at":"2025-01-14T16:17:06.699Z","dependency_job_id":"c00b695a-5ec2-4972-9044-f179df3d38d5","html_url":"https://github.com/llogiq/overflower","commit_stats":{"total_commits":70,"total_committers":5,"mean_commits":14.0,"dds":0.08571428571428574,"last_synced_commit":"92b484dd120c03a42096b328af1807e8c6c2cc1d"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/llogiq%2Foverflower","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/llogiq%2Foverflower/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/llogiq%2Foverflower/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/llogiq%2Foverflower/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/llogiq","download_url":"https://codeload.github.com/llogiq/overflower/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247657281,"owners_count":20974345,"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":["arithmetic","hacktoberfest"],"created_at":"2024-10-12T13:44:24.883Z","updated_at":"2025-04-07T13:07:59.557Z","avatar_url":"https://github.com/llogiq.png","language":"Rust","readme":"# overflower\n\n[![Build Status](https://travis-ci.org/llogiq/overflower.svg)](https://travis-ci.org/llogiq/overflower)\n[![Current Version](https://img.shields.io/crates/v/overflower.svg)](https://crates.io/crates/overflower)\n\nThis project contains a compiler plugin and supporting library to allow the\nprogrammer to annotate their code to declare how integer overflows should be\ndealt with.\n\n# Usage\n\n**Note**: This needs a nightly compiler both for the compiler plugin and the\nsupporting library, as the latter makes use of specialization, which is\nunstable for now.\n\nTo use it, you need the following in your Cargo.toml:\n\n```toml\n[dependencies]\noverflower = \"0.9\"\n```\n\nYou may also make it an optional dependency (`overflower = { version = \"0.4.6\",\noptional = true }`).\n\nNext, in your crate root, you need to add:\n\n```rust\n#![feature(plugin)]\n#![plugin(overflower)]\n\nextern crate overflower_support;\n\n// Now you can annotate items (up to and including the whole crate)\n#[overflow(panic)]\nfn panic_on_overflow() { .. }\n\n#[overflow(wrap)]\nfn like_you_just_dont_care() { .. }\n\n#[overflow(saturate)]\nfn too_much_sunlight() {\n    #[overflow(default)]\n    fn but_use_standard_ops_here() { .. }\n    ..\n}\n```\n\nIn case of an optional dependency, you'd add the following instead:\n\n```rust\n#![cfg_attr(feature=\"overflower\", feature(plugin))]\n#![cfg_attr(feature=\"overflower\", plugin(overflower))]\n\n#[cfg(feature=\"overflower\")\nextern crate overflower_support;\n\n// as well as the following instead of e.g. `#[overflow(wrap)]`\n#[cfg_attr(feature=\"overflower\", overflow(wrap))];\n```\n\nThis is a bit of a work in progress, but most things should already be usable.\n\nLicense: Apache 2.0\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fllogiq%2Foverflower","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fllogiq%2Foverflower","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fllogiq%2Foverflower/lists"}