# `Kinda.CodeGen.NIFDecl`
[🔗](https://github.com/beaver-lodge/kinda/blob/main/lib/codegen/nif_decl.ex#L1)

A generated NIF declaration.

Describes a NIF's wrapper and NIF names, parameters (as an arity or a list
of names), C types, typespecs and dirty scheduler flag, and round-trips to
and from the JSON-compatible manifest format. `from_resource_kind/1` expands
the standard NIF functions a resource kind is expected to provide.

# `dirty`

```elixir
@type dirty() :: :dirty_io | :dirty_cpu | false
```

# `name`

```elixir
@type name() :: nil | String.t() | atom()
```

# `t`

```elixir
@type t() :: %Kinda.CodeGen.NIFDecl{
  arity: term(),
  dirty: dirty(),
  doc: String.t() | nil,
  nif_name: name(),
  param_ctypes: [Kinda.Wrapper.CType.t() | nil] | nil,
  param_typespecs: [Kinda.CodeGen.TypeSpecRef.t()] | nil,
  params: [String.t() | atom()] | integer(),
  return_ctype: Kinda.Wrapper.CType.t() | nil,
  return_typespec: Kinda.CodeGen.TypeSpecRef.t() | nil,
  wrapper_name: name()
}
```

# `from_manifest`

```elixir
@spec from_manifest(map()) :: t()
```

# `from_resource_kind`

# `to_manifest`

```elixir
@spec to_manifest(t()) :: map()
```

---

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