# kinda v0.12.0 - Table of Contents

> Bind a C library to BEAM with Zig.

## Pages

- [Kinda](readme.md)

## Modules

- Core
  - [Kinda](Kinda.md): Kinda binds C libraries to the BEAM with Zig.
  - [Kinda.CallError](Kinda.CallError.md): The exception raised when a generated NIF call fails.
  - [Kinda.CallbackRuntime](Kinda.CallbackRuntime.md): Executes the BEAM side of a native callback and completes its reply token.
  - [Kinda.Codec](Kinda.Codec.md): Normalizes values returned by raw NIF functions.
  - [Kinda.CommandError](Kinda.CommandError.md): The exception raised when an external command cannot be run successfully.
  - [Kinda.Declaration](Kinda.Declaration.md): Canonical downstream entry point for Kinda's formalized declaration contract.
  - [Kinda.GenerationError](Kinda.GenerationError.md): The exception raised when Kinda cannot resolve or generate a declaration.
  - [Kinda.NIFLoadError](Kinda.NIFLoadError.md): The exception raised when the BEAM cannot load a generated native library.
  - [Kinda.Resource.Declaration](Kinda.Resource.Declaration.md): Declares the stable lifecycle contract of a native resource.
  - [Kinda.ResourceKind](Kinda.ResourceKind.md): Defines a typed wrapper for a resource-backed native kind.

- Codegen
  - [Kinda.CodeGen](Kinda.CodeGen.md): Behavior and macros for declaration-driven NIF module generation.
  - [Kinda.CodeGen.DeclarationManifest](Kinda.CodeGen.DeclarationManifest.md): A versioned declaration manifest for generated NIFs and types.
  - [Kinda.CodeGen.DeclarationSurfaces](Kinda.CodeGen.DeclarationSurfaces.md): The resolved declaration surfaces of a generator module.
  - [Kinda.CodeGen.KindDecl](Kinda.CodeGen.KindDecl.md): A kind declaration describing the Zig type of a generated NIF value.
  - [Kinda.CodeGen.NIFDecl](Kinda.CodeGen.NIFDecl.md): A generated NIF declaration.
  - [Kinda.CodeGen.TypeDecl](Kinda.CodeGen.TypeDecl.md): A generated type declaration.
  - [Kinda.CodeGen.TypeSpecRef](Kinda.CodeGen.TypeSpecRef.md): A small embedded DSL describing typespecs in declaration manifests.

- Wrapper extraction
  - [Kinda.Wrapper.CField](Kinda.Wrapper.CField.md): Normalized C field fact extracted from a record declaration.

  - [Kinda.Wrapper.CRecord](Kinda.Wrapper.CRecord.md): Normalized C record declaration extracted from a wrapper surface.

  - [Kinda.Wrapper.CType](Kinda.Wrapper.CType.md): Normalized C type fact extracted from a wrapper surface.

  - [Kinda.Wrapper.CallbackBridge](Kinda.Wrapper.CallbackBridge.md): Metadata for wrapper entries that require a callback-bridge layer.
  - [Kinda.Wrapper.Example](Kinda.Wrapper.Example.md): Runnable example for the wrapper extraction and reporting surface.

  - [Kinda.Wrapper.Extract](Kinda.Wrapper.Extract.md): Extracts a normalized wrapper manifest from a Clang AST tree.

  - [Kinda.Wrapper.Function](Kinda.Wrapper.Function.md): Normalized function declaration extracted from a wrapper surface.

  - [Kinda.Wrapper.Generate](Kinda.Wrapper.Generate.md): Generic emission helpers for wrapper manifests.

  - [Kinda.Wrapper.Manifest](Kinda.Wrapper.Manifest.md): Framework-owned intermediate representation for wrapper extraction.
  - [Kinda.Wrapper.Policy](Kinda.Wrapper.Policy.md): Consumer-facing policy contract for wrapper generation.

- Verification
  - [Kinda.ExampleVerifier](Kinda.ExampleVerifier.md): Verifies the bundled `kinda_example` application from the root repo.

  - [Kinda.RootVerifier](Kinda.RootVerifier.md): Verifies the root `kinda` repo, including bundled example surfaces.

  - [Kinda.SystemCommandRunner](Kinda.SystemCommandRunner.md): Runs external commands and turns command-boundary failures into
`Kinda.CommandError` exceptions.

- Testing
  - [Kinda.Testing.Isolated](Kinda.Testing.Isolated.md): Runs an MFA in a fresh BEAM VM.
  - [Kinda.Testing.Lifecycle](Kinda.Testing.Lifecycle.md): Deterministic lifecycle scenarios for owned native resources.
  - [Kinda.Testing.NIFUpgrade](Kinda.Testing.NIFUpgrade.md): Test support for loading a second copy of a NIF into an existing module.
  - [Kinda.Testing.NativeScenario](Kinda.Testing.NativeScenario.md): Runs serializable native-resource scenarios inside an isolated BEAM.

- Precompilation
  - [Kinda.Prebuilt.Meta](Kinda.Prebuilt.Meta.md)
  - [Kinda.Precompiler](Kinda.Precompiler.md): The `ElixirMake.Precompiler` implementation for Kinda-built NIFs.

## Mix Tasks

- [mix kinda.duckdb.verify](Mix.Tasks.Kinda.Duckdb.Verify.md)
- [mix kinda.ecto_sqlite.verify](Mix.Tasks.Kinda.EctoSqlite.Verify.md)
- [mix kinda.example.verify](Mix.Tasks.Kinda.Example.Verify.md)
- [mix kinda.python.verify](Mix.Tasks.Kinda.Python.Verify.md)
- [mix kinda.sqlite.verify](Mix.Tasks.Kinda.Sqlite.Verify.md)
- [mix kinda.verify](Mix.Tasks.Kinda.Verify.md)
- [mix kinda.wrapper.example](Mix.Tasks.Kinda.Wrapper.Example.md)

