ExMujoco.Loader (ExMujoco v0.2.2)

Copy Markdown View Source

Loading the NIF, and refusing to go on if it does not match the headers it was generated from.

Called from the NIF module's @on_load after the library is in, so a mismatch is a module that will not load — which is loud — rather than a physics run that is quietly a different version.

The loading itself has to happen in the module that names the library: :erlang.load_nif only loads a library whose ERL_NIF_INIT name is the calling module's.

Summary

Functions

Whether the library and the headers agree.

Functions

check()

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

Whether the library and the headers agree.

Both numbers are mjVERSION_HEADER-shaped: 4000001 is 4.0.1.