API Reference › Os › Os.arch
method

Os.arch

Os.arch() -> string

The host CPU architecture as reported by the system, e.g. "arm64" or "x86_64". This reads the uname machine field using the macOS/BSD layout; a target-aware value for other platforms is a documented follow-up.

Example

program Arch {
  entry {
    let a = Os.arch()
    print(len(a))
  }
}
← All symbols