{"id":26103667,"url":"https://github.com/aleph-alpha/lock-hierarchy-rs","last_synced_at":"2025-10-20T05:21:37.370Z","repository":{"id":59758818,"uuid":"538997284","full_name":"Aleph-Alpha/lock-hierarchy-rs","owner":"Aleph-Alpha","description":"Validate lock hierarchies in Rust code","archived":false,"fork":false,"pushed_at":"2025-02-12T10:54:23.000Z","size":28,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":13,"default_branch":"main","last_synced_at":"2025-06-23T07:07:26.589Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/Aleph-Alpha.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-09-20T13:15:02.000Z","updated_at":"2025-02-12T10:53:35.000Z","dependencies_parsed_at":"2025-02-10T12:26:27.378Z","dependency_job_id":"b983f307-7aaf-4dbe-88f5-200e8ebe981e","html_url":"https://github.com/Aleph-Alpha/lock-hierarchy-rs","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/Aleph-Alpha/lock-hierarchy-rs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aleph-Alpha%2Flock-hierarchy-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aleph-Alpha%2Flock-hierarchy-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aleph-Alpha%2Flock-hierarchy-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aleph-Alpha%2Flock-hierarchy-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Aleph-Alpha","download_url":"https://codeload.github.com/Aleph-Alpha/lock-hierarchy-rs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aleph-Alpha%2Flock-hierarchy-rs/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263228318,"owners_count":23433971,"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":[],"created_at":"2025-03-09T20:41:59.013Z","updated_at":"2025-10-20T05:21:32.341Z","avatar_url":"https://github.com/Aleph-Alpha.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Lock hierarchy\n\nThis Rust crate offers debug assertions for violations of lock hierarchies. No runtime overhead or protection occurs for release builds.\n\n## Usage\n\n```rust\nuse lock_hierarchy::Mutex;\n\nlet mutex_a = Mutex::new(()); // Level 0\nlet mutex_b = Mutex::with_level((), 0); // also level 0\n// Fine, first mutex in thread\nlet _guard_a = mutex_a.lock().unwrap();\n// Must panic, lock hierarchy violation\nlet _guard_b = mutex_b.lock().unwrap();\n```\n\n```rust\nuse lock_hierarchy::Mutex;\n\nlet mutex_a = Mutex::with_level((), 1); // Level 1\nlet mutex_b = Mutex::new(()); // level 0\n// Fine, first mutex in thread\nlet _guard_a = mutex_a.lock().unwrap();\n// Fine: 0 is lower level than 1\nlet _guard_b = mutex_b.lock().unwrap();\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faleph-alpha%2Flock-hierarchy-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faleph-alpha%2Flock-hierarchy-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faleph-alpha%2Flock-hierarchy-rs/lists"}