Niffler.Library.on_load

You're seeing just the callback on_load, go back to Niffler.Library module for more information.

Specs

on_load() :: binary()

Return a c-fragement that is called on the first call to the module. Typicall this fragment would contain a call to dlopen() when loading a dynamic library.

This c-fragment should return a char* (a common string in c) when any error has occured.

Example:

  @impl true
  def on_load() do
    """
    // loading the library with dlopen()
    gmp = dlopen("libgmp.#{library_suffix()}", RTLD_LAZY);
    if (!gmp) {
      return "could not load libgmp";
    }
    """
  end