{"id":15354767,"url":"https://github.com/bokuweb/wu-diff-rs","last_synced_at":"2025-07-06T23:34:39.838Z","repository":{"id":57672396,"uuid":"127631888","full_name":"bokuweb/wu-diff-rs","owner":"bokuweb","description":"Compute differences between two slices using wu(the O(NP)) algorithm.","archived":false,"fork":false,"pushed_at":"2025-03-13T12:03:21.000Z","size":82,"stargazers_count":4,"open_issues_count":4,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-03T20:47:08.952Z","etag":null,"topics":[],"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/bokuweb.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2018-04-01T13:29:42.000Z","updated_at":"2025-03-13T12:03:26.000Z","dependencies_parsed_at":"2025-04-15T06:17:53.494Z","dependency_job_id":"b2c71bc3-c4f1-4117-a7ca-e8cf712966bc","html_url":"https://github.com/bokuweb/wu-diff-rs","commit_stats":{"total_commits":21,"total_committers":4,"mean_commits":5.25,"dds":"0.19047619047619047","last_synced_commit":"7b7d304d816af16eba097017dcb4436a8e55b499"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/bokuweb/wu-diff-rs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bokuweb%2Fwu-diff-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bokuweb%2Fwu-diff-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bokuweb%2Fwu-diff-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bokuweb%2Fwu-diff-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bokuweb","download_url":"https://codeload.github.com/bokuweb/wu-diff-rs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bokuweb%2Fwu-diff-rs/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262553401,"owners_count":23327608,"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":"2024-10-01T12:20:53.150Z","updated_at":"2025-07-06T23:34:39.802Z","avatar_url":"https://github.com/bokuweb.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# wu-diff-rs\n\nCompute differences between two slices using wu(the O(NP)) algorithm.\n\n[![](http://meritbadge.herokuapp.com/wu-diff)](https://crates.io/crates/wu-diff)\n[![CircleCI](https://circleci.com/gh/bokuweb/wu-diff-rs.svg?style=svg)](https://circleci.com/gh/bokuweb/wu-diff-rs)\n[![Build status](https://ci.appveyor.com/api/projects/status/9n0gbnhfx1ta9fty/branch/master?svg=true)](https://ci.appveyor.com/project/bokuweb/wu-diff-rs/branch/master)\n\n## Example\n\n```rust\nextern crate wu_diff;\n\nuse self::wu_diff::*;\n\nfn main() {\n    let old = vec![\"foo\", \"bar\", \"baz\"];\n    let new = vec![\"foo\", \"baz\", \"hoge\"];\n\n    for diff in wu_diff::diff(\u0026old, \u0026new) {\n        match diff {\n            DiffResult::Added(a) =\u003e {\n                let i = a.new_index.unwrap();\n                println!(\"+{} new index = {}\", new[i], i)\n            }\n            DiffResult::Common(c) =\u003e {\n                let new_index = c.new_index.unwrap();\n                let old_index = c.old_index.unwrap();\n                println!(\n                    \" {} old index = {}, new index = {}\",\n                    new[new_index], old_index, new_index\n                )\n            }\n            DiffResult::Removed(r) =\u003e {\n                let i = r.old_index.unwrap();\n                println!(\"-{} old index = {}\", old[i], i)\n            }\n        }\n    }\n}\n```\n\nYou can also run example as shown below.\n\n```bash\nrustup run nightly cargo run --example example\n```\n\n## LICENSE\n\nThe MIT License (MIT)\n\nCopyright (c) 2018 @bokuweb\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbokuweb%2Fwu-diff-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbokuweb%2Fwu-diff-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbokuweb%2Fwu-diff-rs/lists"}