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

Nerves tooling for building embedded Elixir

Please see the [getting started guides](getting-started.html) for using Nerves.

# `build_plan`

```elixir
@spec build_plan() :: Nerves.BuildPlan.t()
```

Get the current Nerves build plan

If you're writing a custom `Nerves.BuildAction`, use the `build_plan` that's passed
to the callbacks. This is handy for situations where the plan isn't easily accessible
and for debug.

# `erts`

```elixir
@spec erts() :: Path.t() | true
```

Return the ERTS path for the release

On target builds, returns the path to the cross-compiled ERTS from the
Nerves system artifact. On host, returns `true` to use the host ERTS.

This call belongs in your project's `mix.exs`'s `release/0` function:

```
def release do
  [
    ...
    include_erts: &Nerves.erts/0,
    ...
  ]
end
```

# `init_release`

```elixir
@spec init_release(Mix.Release.t()) :: Mix.Release.t()
```

Inject Nerves release steps

This makes sure that the Nerves tooling is available to affect the
Mix release process.

This call belongs in your project's `mix.exs`'s `release/0` function:

```
def release do
  [
    ...
    steps: [&Nerves.init_release/1, :assemble],
    ...
  ]
end
```

# `version`

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

Returns the Nerves version as a binary

---

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