{"id":22181592,"url":"https://github.com/bgianfo/rust-run-down","last_synced_at":"2025-10-14T11:15:23.817Z","repository":{"id":36462841,"uuid":"225002546","full_name":"bgianfo/rust-run-down","owner":"bgianfo","description":"run-down protection in rust. ","archived":false,"fork":false,"pushed_at":"2023-05-18T13:57:42.000Z","size":75,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-16T09:02:07.215Z","etag":null,"topics":["crates","reference-counting","run-down-protection","rust","synchronization"],"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/bgianfo.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2019-11-30T11:33:46.000Z","updated_at":"2022-08-26T21:41:26.000Z","dependencies_parsed_at":"2022-08-18T03:05:13.496Z","dependency_job_id":null,"html_url":"https://github.com/bgianfo/rust-run-down","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/bgianfo/rust-run-down","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bgianfo%2Frust-run-down","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bgianfo%2Frust-run-down/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bgianfo%2Frust-run-down/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bgianfo%2Frust-run-down/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bgianfo","download_url":"https://codeload.github.com/bgianfo/rust-run-down/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bgianfo%2Frust-run-down/sbom","scorecard":{"id":236057,"data":{"date":"2025-08-11","repo":{"name":"github.com/bgianfo/rust-run-down","commit":"6f55af1df21d715aaa0110975981780cfd1ef471"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.4,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/21 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/ci.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:42: update your workflow using https://app.stepsecurity.io/secureworkflow/bgianfo/rust-run-down/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:47: update your workflow using https://app.stepsecurity.io/secureworkflow/bgianfo/rust-run-down/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:68: update your workflow using https://app.stepsecurity.io/secureworkflow/bgianfo/rust-run-down/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:73: update your workflow using https://app.stepsecurity.io/secureworkflow/bgianfo/rust-run-down/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:81: update your workflow using https://app.stepsecurity.io/secureworkflow/bgianfo/rust-run-down/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:91: update your workflow using https://app.stepsecurity.io/secureworkflow/bgianfo/rust-run-down/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:100: update your workflow using https://app.stepsecurity.io/secureworkflow/bgianfo/rust-run-down/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:103: update your workflow using https://app.stepsecurity.io/secureworkflow/bgianfo/rust-run-down/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:109: update your workflow using https://app.stepsecurity.io/secureworkflow/bgianfo/rust-run-down/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:112: update your workflow using https://app.stepsecurity.io/secureworkflow/bgianfo/rust-run-down/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:117: update your workflow using https://app.stepsecurity.io/secureworkflow/bgianfo/rust-run-down/ci.yml/master?enable=pin","Info:   0 out of   4 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   7 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 9 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-17T05:47:37.440Z","repository_id":36462841,"created_at":"2025-08-17T05:47:37.440Z","updated_at":"2025-08-17T05:47:37.440Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279018120,"owners_count":26086281,"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","status":"online","status_checked_at":"2025-10-14T02:00:06.444Z","response_time":60,"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":["crates","reference-counting","run-down-protection","rust","synchronization"],"created_at":"2024-12-02T09:46:11.815Z","updated_at":"2025-10-14T11:15:23.801Z","avatar_url":"https://github.com/bgianfo.png","language":"Rust","readme":"run-down [![Build Status][gh-ci-img]][gh-ci] [![run-down crate][crate-img]][crate] [![codecov][codecov-img]][codecov] [![GitHub license][license-img]][license] [![Dependabot Status][dependabot-img]][dependabot]\n=====\n\nThe `run-down` crate provides an implementation of run-down protection.\n\n## Overview\n\nRun-down protection as a pattern is useful in situations where re-initialization\nor destruction of a shared resource is required in a [SMP][smp-link] environment.\n\nThe pattern has two parts, a means to guarantee the resource is accessible and remains so for\nthe during of it's usage. As well as way to make the resource inaccessible from a point going forward\nand the ability to wait for all outstanding usages to drain so you can safely perform the required operation. \n\nThis crate was inspired by the [run-down protection primitive in the NT kernel][nt-run-down-docs].\nWhere it's used in situations such as driver unload, where futher access to the driver\nneeds to be rejected and the unloading thread must wait for inflight acesss to stop before\nthe driver can be completely unload.\n\n## Documentation\n\n[https://docs.rs/run-down](https://docs.rs/run-down)\n\n## Example\n\n```rust\nuse run_down::{\n    RundownGuard,\n    RundownRef\n};\nuse std::sync::Arc;\nuse std::thread;\nuse std::time::Duration;\n\nlet rundown = Arc::new(RundownRef::new());\n\nfor i in 1..25 {\n\n    let rundown_clone = Arc::clone(\u0026rundown);\n\n    thread::spawn(move || {\n    \n        // Attempt to acquire rundown protection, while the main\n        // thread could be running down the object as we execute.\n        // \n        match rundown_clone.try_acquire() {\n            Ok(run_down_guard) =\u003e {\n                println!(\"{}: Run-down protection acquired.\", i);\n\n                // Stall the thread while holding rundown protection.\n                thread::sleep(Duration::from_millis(10));\n            }\n            Err(m) =\u003e {\n                println!(\"{}: Failed to acquire run-down protection - {:?}\", i, m);\n            },\n        }\n    });\n}\n\nprintln!(\"0: Waiting for rundown to complete\");\nrundown.wait_for_rundown();\nprintln!(\"0: Rundown complete\");\n```\n\n## TODO\n\n - Add a more interesting real-world example.\n \n - Add some benchmarks to see if there is any opportunity to optimize the implementation.\n\nNote: This crate is not created by, affiliated with, or supported by Microsoft.\n\n\u003c!-- Markdown References --\u003e\n[gh-ci]: https://github.com/bgianfo/pr-dash/actions\n[gh-ci-img]: https://img.shields.io/github/workflow/status/bgianfo/rust-run-down/ci/master?color=green\u0026logo=github\n\n[license]: https://github.com/bgianfo/rust-run-down/blob/master/LICENSE\n[license-img]: https://img.shields.io/github/license/bgianfo/rust-run-down.svg?color=green\n\n[dependabot]: https://dependabot.com\n[dependabot-img]: https://img.shields.io/static/v1?label=dependabot\u0026message=enabled\u0026color=green\u0026logo=dependabot\n\n[crate]: https://crates.io/crates/run-down\n[crate-img]:http://meritbadge.herokuapp.com/run-down\n\n[codecov]: https://codecov.io/gh/bgianfo/rust-run-down\n[codecov-img]: https://img.shields.io/codecov/c/github/bgianfo/rust-run-down/master?logo=codecov\u0026color=green\n\n[nt-run-down-docs]: https://docs.microsoft.com/en-us/windows-hardware/drivers/kernel/run-down-protection\n\n[smp-link]: https://en.wikipedia.org/wiki/Symmetric_multiprocessing\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbgianfo%2Frust-run-down","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbgianfo%2Frust-run-down","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbgianfo%2Frust-run-down/lists"}