Companion

Current Platform

Properties

Link copied to clipboard
open override val arch: Arch

Architecture

Link copied to clipboard
open override val buildVariant: BuildVariant

Build variant

Link copied to clipboard
open override val endian: Endian

Endian-ness

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

JVM, Android & K/N: true Android: true JS, WASM_JS: false <-- workers have different heaps

Link copied to clipboard
open val isAndroid: Boolean

Whether this is an Android platform

Link copied to clipboard
open val isApple: Boolean

Whether this is an Apple device

Link copied to clipboard

Whether this is a mobile platform

Link copied to clipboard
open override val isBigEndian: Boolean

Whether this is a big endian platform

Link copied to clipboard
open override val isDebug: Boolean

Whether this is a debug build

Link copied to clipboard

Whether this is running in a JS or a WASM runtime

Link copied to clipboard
open val isIos: Boolean

Whether this is an iOS platform

Link copied to clipboard
open val isJs: Boolean

Whether this is running in JS

Link copied to clipboard

Whether this is running in a JS browser environment

Link copied to clipboard

Whether this is running in a JS browser or worker environment

Link copied to clipboard

Whether this is running in a JS Deno environment

Link copied to clipboard

Whether this is running in a JS Node.js environment

Link copied to clipboard

Whether this is running in a JS or a WASM runtime

Link copied to clipboard
open val isJsShell: Boolean

Whether this is running in a JS shell

Link copied to clipboard

Whether this is running in a JS worker environment

Link copied to clipboard
open val isJvm: Boolean

Whether this is running in a JVM

Link copied to clipboard
open val isLinux: Boolean

Whether this is a Linux platform

Link copied to clipboard
open override val isLittleEndian: Boolean

Whether this is a little endian platform

Link copied to clipboard
open val isMac: Boolean

Whether this is a Mac platform

Link copied to clipboard
open val isNative: Boolean

Whether this is running with Kotlin/Native

Link copied to clipboard

Whether this is running with Kotlin/Native in a desktop environment

Link copied to clipboard
open val isPosix: Boolean

Whether this is a Posix platform

Link copied to clipboard
open override val isRelease: Boolean

Whether this is a release build

Link copied to clipboard
open val isTvos: Boolean

Whether this is a tvOS platform

Link copied to clipboard
open val isUnix: Boolean

Whether this is a Unix platform

Link copied to clipboard
open val isWasm: Boolean

Whether this is running in WASM

Link copied to clipboard
open val isWatchos: Boolean

Whether this is a watchOS platform

Link copied to clipboard
open val isWindows: Boolean

Whether this is a Windows platform

Link copied to clipboard
Link copied to clipboard
open override val os: Os

Operating System

Link copied to clipboard
open override val rawOsName: String

Raw OS name

Link copied to clipboard
open override val rawPlatformName: String

Raw platform name

Link copied to clipboard
open override val runtime: Runtime

Runtime

Functions

Link copied to clipboard
operator fun invoke(endian: Endian = Endian.LITTLE_ENDIAN, arch: Arch = Arch.UNKNOWN, os: Os = Os.UNKNOWN, runtime: Runtime = Runtime.JVM, buildVariant: BuildVariant = BuildVariant.DEBUG, rawPlatformName: String = "unknown", rawOsName: String = "unknown", hasMultithreadedSharedHeap: Boolean = false): Platform