{"id":18994565,"url":"https://github.com/timelessnesses/cuid2-timeless","last_synced_at":"2026-02-23T20:34:22.528Z","repository":{"id":240443381,"uuid":"802578960","full_name":"timelessnesses/cuid2-timeless","owner":"timelessnesses","description":"cuid2 implementation from cuid2 python library just to get my rust game up (i am suffering)","archived":false,"fork":false,"pushed_at":"2024-06-09T06:27:24.000Z","size":64,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-30T18:48:03.401Z","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":"wtfpl","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/timelessnesses.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}},"created_at":"2024-05-18T17:33:21.000Z","updated_at":"2024-06-09T06:27:27.000Z","dependencies_parsed_at":"2024-05-18T23:19:23.896Z","dependency_job_id":"61cdeb13-d6a8-499f-ad9d-0278bb3615ee","html_url":"https://github.com/timelessnesses/cuid2-timeless","commit_stats":null,"previous_names":["timelessnesses/cuid2-timeless"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/timelessnesses/cuid2-timeless","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timelessnesses%2Fcuid2-timeless","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timelessnesses%2Fcuid2-timeless/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timelessnesses%2Fcuid2-timeless/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timelessnesses%2Fcuid2-timeless/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/timelessnesses","download_url":"https://codeload.github.com/timelessnesses/cuid2-timeless/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timelessnesses%2Fcuid2-timeless/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29754463,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-23T19:23:13.917Z","status":"ssl_error","status_checked_at":"2026-02-23T19:23:11.618Z","response_time":90,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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-11-08T17:26:02.418Z","updated_at":"2026-02-23T20:34:22.523Z","avatar_url":"https://github.com/timelessnesses.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cuid2-timeless\n\nAn unstable, barely tested, probably giving wrong output and might panic out of nowhere CUID2 implementation in Rust. Built for learning more rust and I don't know how to test it.\n\n\u003e [!CAUTION]\n\u003e This library is slower than cuid-rust by a whole lot!\n\u003e this benchmark was ran with AMD Ryzen 7 7730U 8 Cores and 16 Logical Processors with 16 Gigabytes of RAM\n\u003e |benchmark              |cuid2-timeless|cuid2 (cuid-rust)|\n\u003e |-----------------------|--------------|-----------------|\n\u003e |single cuid generation |53.180 µs     |2.8162 µs        |\n\u003e |10,000 cuids generation|553.52 ms     |28.900 ms        |\n\u003e\n\u003e This library is for learning purposes. Please don't use this library in production! Use [cuid-rust](https://github.com/mplanchard/cuid-rust) instead!\n\n## Installation\n\n`cargo add cuid2_timeless --features sha3` (or you can use sha2 if you wanted to)\n\n## Usage\n\nEither use the `cuid2_timeless::cuid_wrapper()` and call it again to get ID or get some customization with `cuid2_timeless::Cuid`\n\n```rust\nuse cuid2_timeless;\n\nlet mut cuid = cuid2_timeless::cuid_wrapper();\nprintln!(\"{}\", cuid().unwrap());\n```\n\nor some customization\n\n```rust\nuse cuid2_timeless;\nuse rand::{self, Rng};\n\nlet mut cuid = cuid2_timeless::Cuid::new(\n    Box::new( // A randomizer function\n        || {\n            rand::thread_rng().gen()\n        }\n    ),\n    Box::new( // Your very own counter function\n        |mut i| {\n            Box::new(move || {\n                i += 1;\n                i\n            })\n        }\n    ),\n    24, // Length\n    Box::new(cuid2_timeless::utils::create_fingerprint) // And a fingerprint creator function (im too lazy to implement)\n);\ncuid.generate(None).unwrap();\n```\n\nor verify if it actually is `CUID`\n\n```rust\nuse cuid2_timeless;\n\nprintln!(\"{}\", cuid2_timeless::is_cuid(\"f9ovgvsnly7h6khwt4nx08kom\".to_string(), None, None));\n```\n\n## Features\n\n- `regex` is a feature for either remove or add `regex` crate to the module. Turning this off will remove the `is_cuid` function (enabled by default)\n- `random` is a feature for either remove or add `rand` crate to the module. Turning this off will remove `Default` trait from `Cuid` (enabled by default)\n- `sha2` is a feature for either remove or add `sha2` crate to the module. Turning this off will remove SHA2 hashing algorithm, but turning this feature on will uses `sha2` for hashing (cannot enabled with `sha3` present, compiling will error if `sha2` and `sha3` is enabled, not enabled by default)\n- `sha3` is a feature for either remove or add `sha3` crate to the module. Turning this off will remove SHA3 hashing algorithm, but turning this feature on will uses `sha3` for hashing (cannot enabled with `sha2` present, compiling will error if `sha2` and `sha3` is enabled, enabled by default)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimelessnesses%2Fcuid2-timeless","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimelessnesses%2Fcuid2-timeless","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimelessnesses%2Fcuid2-timeless/lists"}