defmodule Weave.Native do @moduledoc """ NIF wrapper for the `weave_nif` Rust crate. Provides low-level bindings to the Rust graph engine and image processing. This module should not be called directly by application code -- use `Weave.Graph` or `Weave.Image` instead. """ use Rustler, otp_app: :weave, crate: "weave_nif", path: "nif" @doc "Returns `\"ok\"` if the Rust NIF is loaded and functional." def health_check, do: :erlang.nif_error(:nif_not_loaded) @doc """ Detects conflict-of-interest patterns in a subgraph. Both arguments are JSON strings. Returns the detected patterns as a JSON string on success, or raises on NIF load failure. This function runs on a dirty CPU scheduler so it does not block the normal BEAM schedulers. """ def detect_conflicts(_subgraph_json, _opts_json), do: :erlang.nif_error(:nif_not_loaded) end