{"id":23736749,"url":"https://github.com/jmcomets/artsy","last_synced_at":"2026-02-27T18:30:15.287Z","repository":{"id":57495037,"uuid":"163077186","full_name":"jmcomets/artsy","owner":"jmcomets","description":null,"archived":false,"fork":false,"pushed_at":"2019-02-18T13:56:01.000Z","size":42,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-31T08:39:27.991Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jmcomets.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}},"created_at":"2018-12-25T11:34:57.000Z","updated_at":"2021-08-19T20:29:23.000Z","dependencies_parsed_at":"2022-08-28T14:25:03.609Z","dependency_job_id":null,"html_url":"https://github.com/jmcomets/artsy","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmcomets%2Fartsy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmcomets%2Fartsy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmcomets%2Fartsy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmcomets%2Fartsy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jmcomets","download_url":"https://codeload.github.com/jmcomets/artsy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239869327,"owners_count":19710504,"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-12-31T07:37:41.135Z","updated_at":"2026-02-27T18:30:15.245Z","avatar_url":"https://github.com/jmcomets.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"artsy\n=====\n\n[![Travis badge](https://travis-ci.org/jmcomets/artsy.svg?branch=master)](https://travis-ci.org/jmcomets/artsy)\n[![crates.io badge](https://img.shields.io/crates/v/artsy.svg)](https://crates.io/crates/artsy)\n\n[Documentation][]\n\nA work-in-progress implementation of an [ART Tree][paper].\n\n## Features\n\n### Terminator Customization\n\nAlthough the original ART paper only considers ASCII strings as keys, therefore\ndefines `\\0` as string terminator, the idea can be extended to UTF-8 by using\n`0xff` as string terminator. Of course, you can use any terminator if you're\ninserting raw bytes.\n\nBy default, you should use `for_utf8()` if you're using `String` keys.\n\nTerminator customization is why each lookup/insertion/deletion method returns a\n`Result\u003c.., KeyContainsTerminator\u003e`; each method is also accompanied by a\nequivalent unchecked version.\n\n### Filtering used node types\n\nAlthough the original ART paper uses 4 different types of nodes (4, 16, 48 and\n256 children), you may not want the node types used for sparser tries or the\nintermediate node types (for whatever reason). Each node type, other than the\nfinal trie node of 256 children, may be disabled by building *without* its\nfeature flag enabled:\n\n```bash\ncargo build --features \"node4\" # only use the smallest node, fallback to Node256\n\ncargo build --features \"node4 node16\" # disable Node48\n\ncargo build --features \"node16\" # only use the intermediate node with SIMD search\n```\n\n### Disabling SIMD for Node16\n\nSIMD should be enabled by default (if you system supports it). To explicitly\ndisable SIMD, build with the feature `no-simd` set.\n\n## Examples\n\n### Insert / Lookup\n\n```rust\nlet mut map = Trie::for_utf8();\nmap.insert(b\"a\", 0).unwrap();\nmap.insert(b\"ac\", 1).unwrap();\n\nassert_eq!(map.get(b\"a\").unwrap(), Some(\u00260));\nassert_eq!(map.get(b\"ac\").unwrap(), Some(\u00261));\nassert_eq!(map.get(b\"ab\").unwrap(), None);\n```\n\n## Todo List\n\n- [ ] Refactor insert/update child, removing duplication \u0026 extra find after insertion\n- [ ] Key/Value/Items `Iterator`\n- [ ] Deletion\n- [ ] Path Compression\n\n[paper]: https://db.in.tum.de/~leis/papers/ART.pdf\n\n[Documentation]: https://docs.rs/artsy\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjmcomets%2Fartsy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjmcomets%2Fartsy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjmcomets%2Fartsy/lists"}