# `Sys.Arch`
[🔗](https://github.com/harmont-dev/hyper/blob/main/lib/sys/arch.ex#L1)

CPU architecture detection for the current machine.

# `t`

```elixir
@type t() :: :x86_64 | :aarch64
```

A CPU architecture Hyper supports.

# `current`

```elixir
@spec current() :: {:ok, t()} | {:error, {:unsupported_arch, String.t()}}
```

Detect the CPU architecture of the current machine.

Returns the architecture as an atom, or `{:error, {:unsupported_arch, raw}}`
where `raw` is the unrecognised `:erlang.system_info(:system_architecture)`
string.

# `goarch`

```elixir
@spec goarch(t()) :: String.t()
```

Map an architecture to the Go/OCI arch name (`skopeo --override-arch`, image manifests).

# `parse`

```elixir
@spec parse(String.t()) :: {:ok, t()} | {:error, {:unsupported_arch, String.t()}}
```

Classify a raw architecture string (a target triplet or a bare arch name)
into a supported architecture. An unrecognised string is refused with
`{:error, {:unsupported_arch, raw}}`, echoing the input.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
