Skip to main content

host_platform

Function host_platform 

Source
pub fn host_platform() -> Platform
Expand description

What: The lookup rules of the platform this executable was compiled for. cfg!(...) is a compile-time true/false about the target platform. Why: Production uses the host’s rules; tests pass a platform explicitly.

In TS you’d write (pseudocode):

function hostPlatform(): Platform { return process.platform; }