Skip to main content

Module platform

Module platform 

Source
Expand description

Shared platform-identity utilities.

Provides OS name, architecture, and client identity strings used by provider request builders. Centralises the mapping from Rust’s std::env::consts values to the provider-expected naming conventions (e.g. darwin instead of macos, arm64 instead of aarch64).

Constants§

VERSION
Crate version baked in at compile time.

Functions§

arch_name
Return the architecture name in the format most providers expect.
os_name
Return the OS name in the format most providers expect.
pi_user_agent
Canonical Pi User-Agent: "pi_agent_rust/{version}".
pi_user_agent_with
Canonical Pi User-Agent with an additional component: "pi_agent_rust/{version} {extra}".
platform_tag
"{os}/{arch}" — e.g. "linux/amd64", "darwin/arm64".