NativeArtifact (native_artifact v0.1.0)

Copy Markdown View Source

Contracts for managing precompiled NIF bundles.

Explicit targets, bounded Manifest v1 validation and pure resolution/planning and verified local installation are implemented. Plans perform no I/O; local execution revalidates their complete snapshots. Downloads, caches, source build execution and Mix integration remain pending. No platform has completed runtime certification.

Summary

Functions

Executes a consistent precompiled plan using supplied local archive bytes.

Builds a pure, inspectable plan from pinned metadata and explicit evidence.

Functions

install(plan, opts \\ [])

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

Executes a consistent precompiled plan using supplied local archive bytes.

Required :archive_path and :priv_dir are normalized absolute local paths; :priv_dir must be an existing physical application-owned directory. Optional :archive_limits and :timeout are forwarded to the local Installer. Selection, mode and manifest limits come only from the freshly revalidated plan. Source plans return :source_execution_pending without filesystem/build/network work.

plan(manifest, opts \\ [])

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

Builds a pure, inspectable plan from pinned metadata and explicit evidence.