Expand description
Version string and update-check helpers. Version checker โ non-blocking startup check for newer crate versions.
Spawns a background task that queries crates.io for koda-cli.
If a newer version exists, prints a one-line hint after the banner.
Never blocks startup โ the REPL is ready immediately.
ยงBehavior
- Runs once per session at startup
- Timeout: 3 seconds (fails silently on slow networks)
- Compares
semver::Versionof current binary vs latest on crates.io - Shows:
๐ฆ Update available: 0.2.1 โ 0.3.0 (cargo install koda-cli)
Functionsยง
- crate_
name - The crate name, useful for building install commands.
- spawn_
version_ check - Spawn a background version check. Returns a handle that can be awaited.
- update_
available - Check whether
latestis newer than the current version. ReturnsSome((current, latest))if an update is available.