{"id":13599906,"url":"https://github.com/ratel-rust/toolshed","last_synced_at":"2026-03-09T00:32:01.356Z","repository":{"id":57670198,"uuid":"112167904","full_name":"ratel-rust/toolshed","owner":"ratel-rust","description":"Arena allocator and a handful of useful data structures","archived":false,"fork":false,"pushed_at":"2020-03-21T11:03:04.000Z","size":66,"stargazers_count":41,"open_issues_count":3,"forks_count":6,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-07-28T20:51:11.649Z","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":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ratel-rust.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-11-27T08:22:06.000Z","updated_at":"2025-04-23T17:29:59.000Z","dependencies_parsed_at":"2022-09-26T20:40:52.218Z","dependency_job_id":null,"html_url":"https://github.com/ratel-rust/toolshed","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/ratel-rust/toolshed","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ratel-rust%2Ftoolshed","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ratel-rust%2Ftoolshed/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ratel-rust%2Ftoolshed/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ratel-rust%2Ftoolshed/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ratel-rust","download_url":"https://codeload.github.com/ratel-rust/toolshed/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ratel-rust%2Ftoolshed/sbom","scorecard":{"id":762572,"data":{"date":"2025-08-11","repo":{"name":"github.com/ratel-rust/toolshed","commit":"8cff0c97ab34a70f1d45f39d854489637a0215c5"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.2,"checks":[{"name":"Code-Review","score":1,"reason":"Found 4/21 approved changesets -- score normalized to 1","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":"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":"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":"Dangerous-Workflow","score":-1,"reason":"no workflows found","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":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"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":"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":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"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-APACHE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE-APACHE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"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":"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 17 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-22T23:49:40.810Z","repository_id":57670198,"created_at":"2025-08-22T23:49:40.811Z","updated_at":"2025-08-22T23:49:40.811Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30278516,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-08T20:45:49.896Z","status":"ssl_error","status_checked_at":"2026-03-08T20:45:49.525Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2024-08-01T17:01:17.212Z","updated_at":"2026-03-09T00:32:01.330Z","avatar_url":"https://github.com/ratel-rust.png","language":"Rust","readme":"# Toolshed\n\nThis crate contains an `Arena` allocator, along with a few common data\nstructures that can be used in tandem with it.\n\nFor all those times when you need to create a recursively nested tree\nof `enum`s and find yourself in pain having to put everything in\n`Box`es all the time.\n\n## Features\n\n+ Paginated `Arena`: internally preallocates 64KiB _pages_ on the heap and\n    allows `Copy` types to be put on that heap.\n\n+ `CopyCell`: virtually identical to `std::cell::Cell` but requires that\n    internal types implement `Copy`, and implements `Copy` itself.\n\n+ `List`, `Map` and `Set`: your basic data structures that allocate on the\n    `Arena` and use internal mutability via `CopyCell`. Never worry about\n    sharing pointers again!\n\n+ `BloomMap` and `BloomSet`: special variants of `Map` and `Set` with a\n    very simple but very fast bloom filter. If a map / set is often queried\n    for keys / elements it doesn't contain, the bloom filter check will\n    reduce the need to do a full tree lookup, greatly increasing performance.\n    The overhead compared to a regular `Map` or `Set` is also minimal.\n\n+ All data structures implement expected traits, such as `Debug` or `PartialEq`.\n\n+ Optional **serde** `Serialize` support behind a feature flag.\n\n## Example\n\n```rust\nextern crate toolshed;\n\nuse toolshed::Arena;\nuse toolshed::map::Map;\n\n// Only `Copy` types can be allocated on the `Arena`!\n#[derive(Debug, PartialEq, Clone, Copy)]\nenum Foo\u003c'arena\u003e {\n    Integer(u64),\n\n    // Recursive enum without `Box`es!\n    Nested(\u0026'arena Foo\u003c'arena\u003e),\n}\n\nfn main() {\n    // Create a new arena\n    let arena = Arena::new();\n\n    // We allocate first instance of `Foo` in the arena.\n    //\n    // Please note that the `alloc` method returns a `\u0026mut` reference.\n    // Since we want to share our references around, we are going to\n    // dereference and re-reference them to immutable ones with `\u0026*`.\n    let child: \u0026Foo = \u0026*arena.alloc(Foo::Integer(42));\n\n    // Next instance of `Foo` will contain the child reference.\n    let parent: \u0026Foo = \u0026*arena.alloc(Foo::Nested(child));\n\n    // Empty map does not allocate\n    let map = Map::new();\n\n    // Inserting stuff in the map requires a reference to the `Arena`.\n    // The reference can be shared, since `Arena` uses interior mutability.\n    map.insert(\u0026arena, \"child\", child);\n\n    // We can put our `map` on the arena as well. Once again we use the `\u0026*`\n    // operation to change the reference to be immutable, just to demonstrate\n    // that our `Map` implementation is perfectly happy with internal mutability.\n    let map: \u0026Map\u003c\u0026str, \u0026Foo\u003e = \u0026*arena.alloc(map);\n\n    // Each insert allocates a small chunk of data on the arena. Since arena is\n    // preallocated on the heap, these inserts are very, very fast.\n    //\n    // We only have a non-mutable reference to `map` now, however `Map` is also\n    // using interior mutability on references to allow exactly this kind of\n    // behavior in a safe manner.\n    map.insert(\u0026arena, \"parent\", parent);\n\n    assert_eq!(map.get(\"child\"), Some(\u0026Foo::Integer(42)));\n    assert_eq!(map.get(\"parent\"), Some(\u0026Foo::Nested(\u0026Foo::Integer(42))));\n    assert_eq!(map.get(\"heh\"), None);\n}\n```\n\n## Benches\n\nHere is a very biased benchmark of the different sets:\n\n```\nrunning 8 tests\ntest bloom_set_create  ... bench:          49 ns/iter (+/- 0)\ntest bloom_set_read    ... bench:         181 ns/iter (+/- 10)\ntest fxhash_set_create ... bench:          86 ns/iter (+/- 1)\ntest fxhash_set_read   ... bench:         312 ns/iter (+/- 4)\ntest hash_set_create   ... bench:         152 ns/iter (+/- 94)\ntest hash_set_read     ... bench:       1,105 ns/iter (+/- 1)\ntest set_create        ... bench:          37 ns/iter (+/- 0)\ntest set_read          ... bench:         440 ns/iter (+/- 1)\n```\n\n* `set` and `bloom_set` are benchmarks of `Set` and `BloomSet` from this crate.\n* `hash_set` is the default stdlib `HashSet`.\n* `fxhash_set` is a `HashSet` using the `fxhash` crate hash.\n\n## License\n\nThis crate is distributed under the terms of both the MIT license\nand the Apache License (Version 2.0). Choose whichever one works best for you.\n\nSee [LICENSE-APACHE](LICENSE-APACHE) and [LICENSE-MIT](LICENSE-MIT) for details.\n","funding_links":[],"categories":["Rust"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fratel-rust%2Ftoolshed","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fratel-rust%2Ftoolshed","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fratel-rust%2Ftoolshed/lists"}