Bundlex v0.1.1 Bundlex.Project behaviour View Source
Link to this section Summary
Types
Type describing project configuration
Type describing NIF configuration keyword list. Configuration consists of fields:
sources
- C files to be compiled (at least one must be provided),includes
- Paths to look for header files (empty list by default).libs
- Names of libraries to link (empty list by default).pkg_configs
- Names of libraries that should be linked with pkg config (empty list by default).deps
- Dependencies in the form{app_name, nif_name}
, whereapp_name
is the application name of the dependency, andnif_name
is the name of nif specified in bundlex file of this dependency. Sources, includes, libs and pkg_configs from those nifs will be appended. Empty list by default.export_only?
- Flag specifying whether NIF is only to be added as dependency and should not be compiled itself.false
by default.src_base
- Native files should reside inproject_root/c_src/<src_base>
. Current app name by default
Functions
Returns the bundlex project module of given application. If the module has not
been loaded yet, it is loaded from project_dir/bundlex.exs
file
Determines if a module is a bundlex project module
Link to this section Types
Type describing project configuration.
Link to this type
nif_config_t()
View Source
nif_config_t() :: [ sources: [String.t()], includes: [String.t()], libs: [String.t()], pkg_configs: [String.t()], deps: [{Application.app(), nif_name_t()}], export_only?: boolean(), src_base: String.t() ]
Type describing NIF configuration keyword list. Configuration consists of fields:
sources
- C files to be compiled (at least one must be provided),includes
- Paths to look for header files (empty list by default).libs
- Names of libraries to link (empty list by default).pkg_configs
- Names of libraries that should be linked with pkg config (empty list by default).deps
- Dependencies in the form{app_name, nif_name}
, whereapp_name
is the application name of the dependency, andnif_name
is the name of nif specified in bundlex file of this dependency. Sources, includes, libs and pkg_configs from those nifs will be appended. Empty list by default.export_only?
- Flag specifying whether NIF is only to be added as dependency and should not be compiled itself.false
by default.src_base
- Native files should reside inproject_root/c_src/<src_base>
. Current app name by default.
Link to this section Functions
Returns the bundlex project module of given application. If the module has not
been loaded yet, it is loaded from project_dir/bundlex.exs
file.
Determines if a module is a bundlex project module.
Link to this section Callbacks
Callback returning project configuration.