Target Triple#

class Triple#

A target triple defines a platform.

to_s()#

Convert the target triple to a string. Will return for example "wasm32-unknown-emscripten".

Return type:

String

arch()#

Gets the architecture of the platform.

Example: x86_64-unknown-freebsd -> x86_64

Return type:

String

vendor()#

Gets the vendor of the platform.

Example: aarch64-apple-ios -> apple

Return type:

String

os()#

Gets the operating system of the platform.

Example: aarch64-unknown-linux -> linux

Return type:

String

abi()#

Gets the binary interface of the platform.

Example: x86_64-unknown-linux-gnu -> gnu

Return type:

String

binary_format()#

Gets the binary format of the platform.

Return type:

String

endianness()#

Gets the endianness of the platform. This can be :little or :big.

Return type:

Symbol

pointer_width()#

Gets the size of a pointer on the platform as a number of bytes.

Return type:

Integer

posix?()#

Returns true for posix and mostly posix-compliant operating systems.

Return type:

Boolean

posix_certified?()#

Returns true if the linux is posix certified.

Return type:

Boolean

darwin?()#

Return true if the platform is a darwin platform (e.g. macOS, iOS, tvOS, …).

Return type:

Boolean

Constants#

TARGET#

The platform compiling to.

Can be used for conditional compilation, e.g.

if TARGET.os == "emscripten"
  # ...
end
Return type:

Triple

HOST#

The host platform compiling on.

Return type:

Triple