# `Precompiled.Match`
[🔗](https://github.com/TomHoenderdos/elixir_precompiled/blob/v0.2.1/lib/precompiled/match.ex#L5)

The key: when a precompiled build may stand in for a local compile. Pure
functions over the project's lock, the manifest entry and the toolchain,
so every rule is testable without a network or a build.

# `ctx`

```elixir
@type ctx() :: %{
  name: String.t(),
  version: String.t(),
  lock_entry: tuple(),
  lock: map(),
  system: {String.t(), String.t()},
  elixir: String.t(),
  otp: String.t(),
  dep_env: String.t(),
  config: (String.t(), [String.t()] -&gt; {:ok, term()} | :error),
  prefer: String.t() | nil
}
```

# `candidate?`

```elixir
@spec candidate?(atom(), map(), [atom()], [atom()] | nil) :: boolean()
```

# `compile_env_from_app`

```elixir
@spec compile_env_from_app(Path.t()) :: [map()] | nil
```

# `compile_env_ok`

```elixir
@spec compile_env_ok([map()], (String.t(), [String.t()] -&gt; {:ok, term()} | :error)) ::
  :ok | {:miss, String.t()}
```

# `files_hash`

```elixir
@spec files_hash(map()) :: String.t() | nil
```

The identity of a build's bytes: sha256 over its files' path, sha256 and
mode, in path order. Two manifest entries with the same hash install the
same files. nil for an entry with a malformed file list, or a path with a
NUL or newline, which could pass one file off as another's line.

# `nerves_children`

```elixir
@spec nerves_children(map()) :: [atom()]
```

Lock-closure children of `nerves`; nerves_bootstrap recompiles them whenever it compiles nerves.

# `select`

```elixir
@spec select(map(), ctx()) :: {:ok, map(), String.t()} | {:miss, String.t()}
```

# `tooling?`

```elixir
@spec tooling?(String.t()) :: boolean()
```

---

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