Skip to main content
Log in

Mojo struct

CompilationTarget

@register_passable(trivial) struct CompilationTarget[value: target = _current_target()]

A struct that provides information about a target architecture.

This struct encapsulates various methods to query target-specific information such as architecture features, OS details, endianness, and memory characteristics.

Parameters

  • value (target): The target architecture to query. Defaults to the current target.

Implemented traits

AnyType, UnknownDestructibility

Methods

has_sse4

static has_sse4() -> Bool

Checks if the target supports SSE4 instructions.

Returns:

True if the target supports SSE4, False otherwise.

is_x86

static is_x86() -> Bool

Checks if the target is an x86 architecture.

Returns:

True if the target is x86, False otherwise.