View Source Evision.JS (Evision v1.0.1-rc.0)

Generated map of evision bindings to their opencv.js counterparts.

Each entry carries the Elixir (module, fun, arity) plus the opencv.js call shape: :js_kind discriminates between :function, :method and :constructor; :js_name is set for free functions, :js_class for class methods and constructors, and :js_method for methods only.

opencv_js_url/0 returns where to fetch the matching CSP-clean opencv.js runtime for these entries; opencv_js_path/0 returns its local path when embedded via config :evision, Evision.JS, embed_js: true.

Summary

Types

An opencv.js correspondence entry.

Functions

Return {:ok, entry} for a known (module, fun, arity); :error otherwise.

Filesystem path of the opencv.js embedded in priv, or :error.

URL of the CSP-clean opencv.js published with this evision release.

Whether the given (module, fun, arity) has an opencv.js counterpart.

Every opencv.js correspondence entry emitted by evision's codegen.

Types

@type entry() :: %{
  :module => module(),
  :fun => atom(),
  :arity => arity(),
  :js_kind => :function | :method | :constructor,
  optional(:arg_plan) => [:in | :out],
  optional(:js_name) => String.t(),
  optional(:js_class) => String.t(),
  optional(:js_method) => String.t()
}

An opencv.js correspondence entry.

Functions

Link to this function

lookup(module, fun, arity)

View Source
@spec lookup(module(), atom(), arity()) :: {:ok, entry()} | :error

Return {:ok, entry} for a known (module, fun, arity); :error otherwise.

@spec opencv_js_path() :: {:ok, String.t()} | :error

Filesystem path of the opencv.js embedded in priv, or :error.

Present when evision was built with config :evision, Evision.JS, embed_js: true (or EVISION_EMBED_JS=true), which downloads or builds the matching opencv.js into priv at compile time.

Link to this function

opencv_js_url(version \\ nil)

View Source
@spec opencv_js_url(String.t() | nil) :: String.t()

URL of the CSP-clean opencv.js published with this evision release.

The asset is attached to the v<version> release tag. version defaults to the running evision version (Application.spec(:evision, :vsn)), so the URL points at the opencv.js that matches these correspondence entries; pass a version to target another release. The pinned checksum lives beside it at the same URL with opencv.sha256 in place of opencv.js.

Link to this function

runnable?(module, fun, arity)

View Source
@spec runnable?(module(), atom(), arity()) :: boolean()

Whether the given (module, fun, arity) has an opencv.js counterpart.

@spec whitelist() :: [entry()]

Every opencv.js correspondence entry emitted by evision's codegen.