A new feature was added to Emacs 25 that lets you load dynamic modules. This means you are no longer limited to Emac Lisp, you can extend Emacs by using native compiled code. The two main advantages are better integration and speed (if you know what you are doing).

Modules work as "plugins" in many other programs. Each module is compiled to a shared library (with .so , .dylib or .dll extension depending on your system). This shared library implements functions that will get called by the main program. The plugin API or module interface describes what the main program expects as entry points and what the module can use to interact with the main program.

Concretely this API is accessible through the emacs-module.h header file. This is the only thing you need to make an Emacs module, you don't have to link against any Emacs binaries or libraries.

The most important things this file defines is:

An emacs_value opaque type which is used to pass Lisp values to and from Emacs.

opaque type which is used to pass Lisp values to and from Emacs. An emacs_runtime structure which is used to get an environment pointer.

structure which is used to get an environment pointer. An emacs_env structure that contains function pointers to the API.

structure that contains function pointers to the API. The function prototype of the module main entry point.

extern int emacs_module_init ( struct emacs_runtime * ert );

This is the function Emacs will call when it loads your module. It will pass you a pointer to a runtime structure, from which you can get an environement pointer:

emacs_env *env = ert->get_environment(ert);

This environement pointer lets you interact with the Lisp interpreter thru function pointers. All those function pointers take the environment as the first parameter.