NativeArtifact.Resolver (native_artifact v0.1.0)

Copy Markdown View Source

Pure, deterministic resolution from pinned metadata and explicit evidence.

resolve/3 accepts a Manifest, decoded data, or JSON binary and an atom-keyed evidence map. No path is read and no host information is inferred. Evidence fields are :target (Target), :nif ({major, minor}), :erts, :os_version, :libc_version, :vm_variant, :system_libraries, and :binding. Missing values mean unknown evidence, never a compatible default.

All compatible baseline artifacts have equal priority. IDs sort diagnostics, not preference; ties return ambiguous_artifact. The optional :artifact_id selector narrows the candidates. :manifest_limits forwards Manifest limits.

Summary

Functions

resolve(manifest, evidence, opts \\ [])

@spec resolve(term(), map(), keyword()) ::
  {:ok, map()} | {:error, NativeArtifact.Error.t()}