{"id":33926500,"url":"https://github.com/corrode/bumpref","last_synced_at":"2026-06-01T04:31:30.851Z","repository":{"id":324130964,"uuid":"1096114418","full_name":"corrode/bumpref","owner":"corrode","description":".bump() method for Arc and Rc that signals cheap refcount cloning","archived":false,"fork":false,"pushed_at":"2025-11-14T01:05:43.000Z","size":6,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-20T15:15:43.702Z","etag":null,"topics":["arc","bump","refcount"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/bumpref","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/corrode.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-14T00:44:52.000Z","updated_at":"2025-12-01T20:37:00.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/corrode/bumpref","commit_stats":null,"previous_names":["corrode/bumpref"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/corrode/bumpref","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/corrode%2Fbumpref","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/corrode%2Fbumpref/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/corrode%2Fbumpref/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/corrode%2Fbumpref/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/corrode","download_url":"https://codeload.github.com/corrode/bumpref/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/corrode%2Fbumpref/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33760645,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-01T02:00:06.963Z","response_time":115,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","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":["arc","bump","refcount"],"created_at":"2025-12-12T10:19:13.736Z","updated_at":"2026-06-01T04:31:30.832Z","avatar_url":"https://github.com/corrode.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bumpref\n\nA lightweight Rust crate that provides a `bump()` method for reference-counted pointers.\nThis is an explicit alias for `clone()` that makes it clear the operation is cheap (just incrementing a reference count).\n\n## Usage\n\nAdd this to your `Cargo.toml`:\n\n```toml\n[dependencies]\nbumpref = \"0.1\"\n```\n\nThen use it in your code:\n\n```rust\nextern crate bumpref;\n\nuse bumpref::Bump;\nuse std::sync::Arc;\nuse std::rc::Rc;\n\nfn main() {\n    // For Arc\n    let arc = Arc::new(42);\n    let arc_bumped = arc.bump(); // same as Arc::clone(\u0026arc)\n\n    // For Rc\n    let rc = Rc::new(\"hello\");\n    let rc_bumped = rc.bump();\n\n    // Also works with Weak references\n    let weak = Arc::downgrade(\u0026arc);\n    let weak_bumped = weak.bump();\n}\n```\n\n## Supported Types\n\n- `Arc\u003cT\u003e` and `std::sync::Weak\u003cT\u003e`\n- `Rc\u003cT\u003e` and `std::rc::Weak\u003cT\u003e`\n\nAll implementations work with `T: ?Sized`, so they support trait objects and slices.\n\n## Why?\n\nWhen code contains many `.clone()` calls on reference-counted types, it's not immediately obvious whether you're doing an expensive deep clone or just bumping a refcount. Using `.bump()` makes the intent explicit and signals to readers that the operation is O(1).\n\n## Inspiration\n\nThis came out of a conversation with Richard Feldman on the 'Rust in Production' podcast\nabout how Zed uses reference-counted pointers extensively in their codebase and how Richard \nwas initially concerned that cloning datastructures might be expensive\nuntil learning that all those clones were just bumping reference counts.\nThe interview is [here](https://corrode.dev/podcast/s05e04-roc/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcorrode%2Fbumpref","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcorrode%2Fbumpref","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcorrode%2Fbumpref/lists"}