Narra

Reference

std/build

std/build

The target a program is built for: operating system, architecture and build mode.

narra
import * as Build from "std/build"

The guide teaches it in chapter 19, Building for other systems.

This page is generated by scripts/std/generate.nra from narrac query --json interface std/build. Do not edit it.

Types

Os

narra
export enum Os derives Show, Equatable {
  MacOS
  Linux
  Windows
  Wasi
}

Arch

narra
export enum Arch derives Show, Equatable {
  Arm64
  X86_64
  Wasm32
}

Target

narra
export struct Target {
  os: Os
  arch: Arch
}

Functions: hostTarget.

Constants

os

narra
export const os: Os

arch

narra
export const arch: Arch

debug

narra
export const debug: bool

Functions

hostTarget

narra
export function hostTarget(): Option<Target>

Effects: none.