# `Nerves.TargetTuple`
[🔗](https://github.com/nerves-project/nerves/blob/v2.0.0-pre.2/lib/nerves/target_tuple.ex#L5)

Utilities for figuring out compilation target tuples

Fun rant: https://mcyoung.xyz/2025/04/14/target-triples/

Standardizing on target tuple contents is hard
so this module exists to convert tuples to whatever gets the
job done. The pain is intended to be here, so that workarounds
don't propagate everywhere.

# `t`

```elixir
@type t() :: %Nerves.TargetTuple{
  abi: nil | String.t(),
  arch: String.t(),
  os: String.t(),
  vendor: String.t()
}
```

Target tuple

This contains the parsed `:erlang.system_info(:system_architecture)` results and
is used for conversion to other formats.

# `host_string`

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

Convert a target tuple back to it's :erlang.system_info(:system_architecture) form

# `new`

```elixir
@spec new(String.t() | charlist()) :: t()
```

Create a new tuple

If an argument isn't passed, the host is queried.

# `to_nerves_v1_host_tuple`

```elixir
@spec to_nerves_v1_host_tuple(t()) :: String.t() | :error
```

Convert a host tuple into the tuple format used by Nerves v1 toolchain artifacts

---

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