{"id":15467805,"url":"https://github.com/bluss/twoway","last_synced_at":"2025-09-09T00:41:19.365Z","repository":{"id":33799903,"uuid":"37493612","full_name":"bluss/twoway","owner":"bluss","description":"Twoway / Fast substring search for strings and byte strings (Rust) / Also assorted benchmarks and string search snippets","archived":false,"fork":false,"pushed_at":"2021-05-19T22:07:17.000Z","size":82,"stargazers_count":64,"open_issues_count":4,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-09-06T00:59:54.823Z","etag":null,"topics":["exact-string-matching","rust","string-search"],"latest_commit_sha":null,"homepage":"https://docs.rs/twoway/","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/bluss.png","metadata":{"files":{"readme":"README.rst","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":"2015-06-15T21:58:42.000Z","updated_at":"2025-07-10T18:59:16.000Z","dependencies_parsed_at":"2022-09-26T20:41:23.425Z","dependency_job_id":null,"html_url":"https://github.com/bluss/twoway","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/bluss/twoway","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bluss%2Ftwoway","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bluss%2Ftwoway/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bluss%2Ftwoway/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bluss%2Ftwoway/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bluss","download_url":"https://codeload.github.com/bluss/twoway/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bluss%2Ftwoway/sbom","scorecard":{"id":245145,"data":{"date":"2025-08-11","repo":{"name":"github.com/bluss/twoway","commit":"e99b3c718df1117ad7f54c33f6540c8f46cc17dd"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4,"checks":[{"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":"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":"Code-Review","score":1,"reason":"Found 3/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":"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":"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":"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":"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":10,"reason":"project is fuzzed","details":["Info: RustCargoFuzzer integration found: fuzz/fuzz_targets/fuzz_target_1.rs:2","Info: RustCargoFuzzer integration found: fuzz/fuzz_targets/substring.rs:2"],"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":"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 12 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-17T07:27:25.091Z","repository_id":33799903,"created_at":"2025-08-17T07:27:25.091Z","updated_at":"2025-08-17T07:27:25.091Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274231051,"owners_count":25245687,"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-08T02:00:09.813Z","response_time":121,"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":["exact-string-matching","rust","string-search"],"created_at":"2024-10-02T01:27:07.728Z","updated_at":"2025-09-09T00:41:19.328Z","avatar_url":"https://github.com/bluss.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\nThis is my substring search workspace.\n\nPlease read the `API documentation here`__\n\n__ https://docs.rs/twoway/\n\n|build_status|_ |crates|_\n\n.. |build_status| image:: https://travis-ci.org/bluss/twoway.svg?branch=master\n.. _build_status: https://travis-ci.org/bluss/twoway\n\n.. |crates| image:: http://meritbadge.herokuapp.com/twoway\n.. _crates: https://crates.io/crates/twoway\n\nDocumentation\n-------------\n\nFast substring search for strings and byte strings, using the `two-way algorithm`_.\n\nThis is the same code as is included in Rust's libstd to “power” ``str::find(\u0026str)``,\nbut here it is exposed with some improvements:\n\n- Available for byte string searches using ``\u0026[u8]``\n- Having an optional SSE4.2 accelerated version (if detected at runtime) which is even faster.\n- Using ``memchr`` for the single byte case, which is ultra fast.\n\n- ``twoway::find_bytes(text: \u0026[u8], pattern: \u0026[u8]) -\u003e Option\u003cusize\u003e``\n- ``twoway::rfind_bytes(text: \u0026[u8], pattern: \u0026[u8]) -\u003e Option\u003cusize\u003e``\n- ``twoway::find_str(text: \u0026str, pattern: \u0026str) -\u003e Option\u003cusize\u003e``\n- ``twoway::rfind_str(text: \u0026str, pattern: \u0026str) -\u003e Option\u003cusize\u003e``\n\nRecent Changes\n--------------\n\n- 0.2.1\n\n  - Update dev-deps\n\n- 0.2.0\n\n  - Use `std::arch` and transparently support SSE4.2 when possible (x86 and\n    x86-64 only) to enable an accelerated implementation of the algorithm.\n    Forward search only. By @RReverser and @bluss\n  - Fix a bug in the SSE4.2 algorithm that made it much slower than it should have been,\n    so performance increases as well.\n  - Requires Rust 1.27\n\n- 0.1.8\n\n  - Tweak crate keywords by @tari\n  - Only testing and benchmarking changes otherwise (no changes to the crate itself)\n\n- 0.1.7\n\n  - The crate is optionally ``no_std``. Regular and ``pcmp`` both support this\n    mode.\n\n- 0.1.6\n\n  - The hidden and internal test module set, technically pub, was removed from\n    standard compilation.\n\n- 0.1.5\n\n  - Update from an odds dependency to using ``unchecked-index`` instead\n    (only used by the pcmp feature).\n  - The hidden and internal test module tw, technically pub, was removed from\n    standard compilation.\n\n- 0.1.4\n\n  - Update memchr dependency to 2.0\n\n- 0.1.3\n\n  - Link to docs.rs docs\n  - Drop ``pcmp``'s itertools dependency\n  - Update nightly code for recent changes\n\n- 0.1.2\n\n  - Internal improvements to the ``pcmp`` module.\n\n- 0.1.1\n\n  - Add ``rfind_bytes``, ``rfind_str``\n\n- 0.1.0\n\n  - Initial release\n  - Add ``find_bytes``, ``find_str``\n\nLicense\n-------\n\nMIT / APACHE-2.0\n\n\nInteresting Links\n-----------------\n\n.. _`two-way algorithm`: http://www-igm.univ-mlv.fr/~lecroq/string/node26.html\n\n- Two Way: http://www-igm.univ-mlv.fr/~lecroq/string/node26.html\n- Matters Computational: http://www.jjj.de/fxt/#fxtbook\n\n\nNotes\n-----\n\nConsider denying 0/n factorizations, see\nhttp://lists.gnu.org/archive/html/bug-gnulib/2010-06/msg00184.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbluss%2Ftwoway","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbluss%2Ftwoway","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbluss%2Ftwoway/lists"}