{"id":35357855,"url":"https://github.com/rly0nheart/updates-rs","last_synced_at":"2026-01-13T19:13:24.964Z","repository":{"id":331382359,"uuid":"1126166689","full_name":"rly0nheart/updates-rs","owner":"rly0nheart","description":"A Rust library that checks for crate updates","archived":false,"fork":false,"pushed_at":"2026-01-05T00:16:42.000Z","size":56,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-01-07T07:31:23.458Z","etag":null,"topics":["update-checker","updater","updater-script"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/updates","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/rly0nheart.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-01T09:30:30.000Z","updated_at":"2026-01-05T00:11:20.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/rly0nheart/updates-rs","commit_stats":null,"previous_names":["rly0nheart/updates-rs"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/rly0nheart/updates-rs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rly0nheart%2Fupdates-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rly0nheart%2Fupdates-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rly0nheart%2Fupdates-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rly0nheart%2Fupdates-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rly0nheart","download_url":"https://codeload.github.com/rly0nheart/updates-rs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rly0nheart%2Fupdates-rs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28397826,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-13T14:36:09.778Z","status":"ssl_error","status_checked_at":"2026-01-13T14:35:19.697Z","response_time":56,"last_error":"SSL_read: 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":["update-checker","updater","updater-script"],"created_at":"2026-01-01T23:34:42.439Z","updated_at":"2026-01-13T19:13:24.958Z","avatar_url":"https://github.com/rly0nheart.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"A Rust library that checks for crate updates.\n\n\u003e [!Note]\n\u003e **updates-rs** only checks crates that are publicly listed on [crates.io](https://crates.io).\n\n## Quick Start\n\nRun the following command to add updates to your project's dependencies:\n\n```shell\ncargo add updates\n```\n\n## Usage\n\n### Basic\n\nThe easiest way to use this crate is with the `check()` function:\n\n```rust\n\nfn main() {\n    // Check for updates at startup\n    updates::check(\n        env!(\"CARGO_PKG_NAME\"),\n        env!(\"CARGO_PKG_VERSION\"),\n        false  // use cache\n    );\n    \n    // Your application code here...\n    println!(\"Hello, world!\");\n}\n```\n\nIf an update is available, it will print to stderr:\n```text\nVersion 1.0.0 of my-tool is outdated. Version 1.2.0 was released 3 days ago.\n```\n\n### Advanced\n\nFor more control over the checking process, use [`UpdateChecker`] directly:\n\n```rust\nuse updates::UpdateChecker;\n\nfn main() {\n    let checker = UpdateChecker::new(false);\n    \n    match checker.check(\"serde\", \"1.0.150\") {\n        Some(update) =\u003e {\n            println!(\"Update available!\");\n            println!(\"Current version: {}\", update.running_version);\n            println!(\"Latest version: {}\", update.available_version);\n            \n            if let Some(date) = update.release_date {\n                println!(\"Released: {}\", date);\n            }\n        }\n        None =\u003e {\n            println!(\"You're on the latest version!\");\n        }\n    }\n}\n```\n\n## Bypassing the Cache\n\nIf you need to always get the latest information (e.g., in a CI environment),\nset `bypass_cache` to `true`:\n\n```rust\nuse updates::update_check;\n\nfn main() {\n    // Always query crates.io, ignore cache\n    update_check(\"my-tool\", \"1.0.0\", true);\n}\n```\n\n## Caching Behaviour\n\nUpdate checks are cached in your system's temp directory for 1 hour:\n\n- **Cache location**: `{temp_dir}/updates_cache.bin`\n- **Cache duration**: 3600 seconds (1 hour)\n- **Cache format**: Compact binary format using postcard serialisation\n\nThe cache is automatically shared across multiple runs of your application,\nso users won't be spammed with update checks every time they run your program.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frly0nheart%2Fupdates-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frly0nheart%2Fupdates-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frly0nheart%2Fupdates-rs/lists"}