{"id":18545745,"url":"https://github.com/icrawl/rustflake","last_synced_at":"2025-09-25T18:26:01.400Z","repository":{"id":38209180,"uuid":"200422272","full_name":"iCrawl/rustflake","owner":"iCrawl","description":"Thread-safe \"twitter\" snowflakes.","archived":false,"fork":false,"pushed_at":"2023-03-13T14:59:32.000Z","size":52,"stargazers_count":36,"open_issues_count":3,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-09T00:14:14.597Z","etag":null,"topics":["crate","epoch","rust","snowflakes","twitter"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/rustflake","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/iCrawl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":["icrawl"],"patreon":"iCrawl","open_collective":null,"ko_fi":"crawltogo","tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2019-08-03T21:25:13.000Z","updated_at":"2025-05-22T15:02:06.000Z","dependencies_parsed_at":"2025-04-09T19:36:42.326Z","dependency_job_id":null,"html_url":"https://github.com/iCrawl/rustflake","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/iCrawl/rustflake","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iCrawl%2Frustflake","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iCrawl%2Frustflake/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iCrawl%2Frustflake/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iCrawl%2Frustflake/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iCrawl","download_url":"https://codeload.github.com/iCrawl/rustflake/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iCrawl%2Frustflake/sbom","scorecard":{"id":476571,"data":{"date":"2025-08-11","repo":{"name":"github.com/iCrawl/rustflake","commit":"69bede511f7db2202f817e5b872f78a8ecd61bd1"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.7,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/13 approved changesets -- score normalized to 0","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":"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":"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":"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":"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":"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":"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":"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE: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 20 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"}},{"name":"Vulnerabilities","score":7,"reason":"3 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: RUSTSEC-2022-0078 / GHSA-f85w-wvc7-crwc","Warn: Project is vulnerable to: RUSTSEC-2022-0049 / GHSA-3fg9-hcq5-vxrc","Warn: Project is vulnerable to: RUSTSEC-2020-0071 / GHSA-wcg3-cvx6-7396"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-19T15:26:47.069Z","repository_id":38209180,"created_at":"2025-08-19T15:26:47.069Z","updated_at":"2025-08-19T15:26:47.069Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276966304,"owners_count":25736755,"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-25T02:00:09.612Z","response_time":80,"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":["crate","epoch","rust","snowflakes","twitter"],"created_at":"2024-11-06T20:21:59.832Z","updated_at":"2025-09-25T18:26:01.381Z","avatar_url":"https://github.com/iCrawl.png","language":"Rust","funding_links":["https://github.com/sponsors/icrawl","https://patreon.com/iCrawl","https://ko-fi.com/crawltogo"],"categories":[],"sub_categories":[],"readme":"# rustflake\n\nThread-safe \"twitter\" snowflakes.\n\nBy default the original Twitter snowflake format defines:\n- 41 bits are used to store a custom epoch with millisecond precision\n- 10 bits are used to store worker and datacenter information\n- 12 bits are used to store a sequence number\n\nThis crate lets you customize your own epoch and worker/datacenter information.\n\n## Usage\nAdd this to your `Cargo.toml`:\n\n```toml\n[dependencies]\nrustflake = \"0.1.0\"\n```\n\nand this to your crate root:\n\n```rust\nuse rustflake;\n```\n\n## Example\n\n```rust\nuse rustflake::Snowflake;\n\nfn main() {\n    let mut snowflake = Snowflake::default();\n    println!(\"{}\", \u0026snowflake.generate());\n}\n```\n\n```rust\nuse rustflake::Snowflake;\n\nfn main() {\n    // Discord Epoch\n    // Though those are not \"real\" discord Ids,\n    // because discord increases the sequence\n    // for *every* generated Id on that process\n    let mut snowflake = Snowflake::new(1420070400000, 1, 1);\n    println!(\"{}\", \u0026snowflake.generate());\n}\n```\n\n```rust\nuse rustflake::Snowflake;\n\nfn main() {\n    // Using a builder approach\n    let mut snowflake = Snowflake::default()\n        .epoch(1_564_790_400_000)\n        .worker_id(2)\n        .datacenter_id(3);\n    println!(\"{}\", \u0026snowflake.generate());\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ficrawl%2Frustflake","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ficrawl%2Frustflake","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ficrawl%2Frustflake/lists"}