{"id":22286912,"url":"https://github.com/koraa/xxhrs","last_synced_at":"2025-09-14T23:49:33.133Z","repository":{"id":57672261,"uuid":"266409513","full_name":"koraa/xxhrs","owner":"koraa","description":"Safe XXHash and XXH3 bindings for rust.","archived":false,"fork":false,"pushed_at":"2024-06-26T10:28:16.000Z","size":73,"stargazers_count":10,"open_issues_count":1,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-16T20:21:58.200Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/koraa.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2020-05-23T19:56:27.000Z","updated_at":"2025-07-25T10:59:52.000Z","dependencies_parsed_at":"2024-06-26T10:22:14.722Z","dependency_job_id":"166967d7-0ac1-426b-a31f-28c1c50452f0","html_url":"https://github.com/koraa/xxhrs","commit_stats":{"total_commits":47,"total_committers":4,"mean_commits":11.75,"dds":0.1063829787234043,"last_synced_commit":"287d060b956933f9db58848e9e2539b337c52e0b"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/koraa/xxhrs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koraa%2Fxxhrs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koraa%2Fxxhrs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koraa%2Fxxhrs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koraa%2Fxxhrs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/koraa","download_url":"https://codeload.github.com/koraa/xxhrs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koraa%2Fxxhrs/sbom","scorecard":{"id":567567,"data":{"date":"2025-08-11","repo":{"name":"github.com/koraa/xxhrs","commit":"e51ffb4382ac6915fc3b48ba17437533809364c3"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.7,"checks":[{"name":"Code-Review","score":1,"reason":"Found 5/27 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":"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":"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":"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":"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":"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":"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":"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":"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":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"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":"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 11 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-20T15:23:27.807Z","repository_id":57672261,"created_at":"2025-08-20T15:23:27.808Z","updated_at":"2025-08-20T15:23:27.808Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275184804,"owners_count":25419913,"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-09-14T02:00:10.474Z","response_time":75,"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":[],"created_at":"2024-12-03T16:58:34.509Z","updated_at":"2025-09-14T23:49:33.110Z","avatar_url":"https://github.com/koraa.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# xxhrs\n\nBindings to the xxhash C library. Covers the old xxhash functions as well as\nthe new xxh3 hash function.\n\n## Use cases?\n\nThis was written mainly so xxh3 can be evaluated for use in rust. If you just\nneed an xxhash implementation, you can use [twox](https://crates.io/crates/twox-hash),\nif you want a fast hash function to use in hash tables you probably want [ahash](https://crates.io/crates/ahash).\n\nCurrently xxh3 is still experimental and it's output can change, however\nas soon as it's implementation has stabilized, it's hash output will remain\nconsistent across processes \u0026 computers.\n\nAfter that has happened, possible use cases for this crate are:\n\n* You specifically need a xxh3 implementation\n* You need high performance and one shot hashing is OK (you probably want xxh3_64)\n* You need high performance and you are hashing particularly long inputs (thousands of KB, again xxh3_64 is what you want)\n* You need a 128 bit hash function\n\nNote that if you are using xxhrs for performance, you should probably create benchmarks.\n\n## Usage\n\nCargo.toml\n\n```toml\n[dependencies]\n# Random entropy is enabled by default; it enables RandomState*\n# and EntropyPool::randomize()\nxxhrs = { version = \"1.0.2\", features = [\"random_entropy\"] }\n```\n\n```rust\nuse std::{collections::HashMap, hash::Hasher};\nuse xxhrs::{\n  RandomStateXXH64, RandomStateXXH3_64, XXH32, XXH64,\n  XXH3_64, XXH3_128, EntropyPool\n};\n\n// Old XXHash 64 bit version\nlet mut h = HashMap::\u003ci32, \u0026str, RandomStateXXH64\u003e::default();\nh.insert(42, \"the answer\");\nassert_eq!(h.get(\u002642), Some(\u0026\"the answer\"));\n\n// XXH3 64 bit version\nlet mut h = HashMap::\u003ci32, \u0026str, RandomStateXXH64\u003e::default();\nh.insert(42, \"the answer\");\nassert_eq!(h.get(\u002642), Some(\u0026\"the answer\"));\n\n// XXHash 32 bit without seed, one shot hashing\nassert_eq!(XXH32::hash(b\"MyData\"), 1695511942);\n\n// XXHash 64 bit with seed, one shot hashing\nassert_eq!(XXH64::hash_with_seed(1234, b\"MyData\"), 4228889600861627182);\n\n// XXH3 64 bit version, streaming hashing, with seed\nlet mut h = XXH3_64::with_seed(1234);\nh.write(b\"MyFirstData\");\nh.write(b\"MySecondData\");\nassert_eq!(h.finish(), 8235025456677196530);\n\n// XXH3 128 bit version, straming hashing, with custom key\nlet entropy = EntropyPool::with_key(b\"My Custom Key!\"); // Can be reused for extra performance!\nlet mut h = XXH3_128::with_entropy(\u0026entropy);\nh.write(b\"MyFirstData\");\nh.write(b\"MySecondData\");\nassert_eq!(h.finish(), 49549903637678458428443811344187957401);\n```\n\n## Testing\n\n```bash\n$ cargo test --all-features\n$ cargo test --no-default-features\n```\n\n## Version History\n\n* 2.0.1 – [Fixed UB from MaybeUninit\u003cT\u003e::assume_init()](https://github.com/koraa/xxhrs/pull/10) by manually zero-initializing buffer and padding fields.\n* 2.0.0 – Prefix all exports from our libxxhrs with `xxhrs_equodaeyiejoopibaeva_` to avoid name collisions when linking with another version of libxxhrs.\n\n## License\n\nCopyright © (C) 2020, Karolin Varner. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n\nRedistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\nRedistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\nNeither the name of the Karolin Varner nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL Softwear, BV BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkoraa%2Fxxhrs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkoraa%2Fxxhrs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkoraa%2Fxxhrs/lists"}