Skip to main content

Module version

Module version 

Source
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::Version of 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 latest is newer than the current version. Returns Some((current, latest)) if an update is available.