Bundlex.Native (Bundlex v0.5.1) View Source

Module responsible for parsing and processing natives' configurations.

Link to this section Summary

Functions

Parses natives and generates compiler commands.

Link to this section Types

Specs

interface_t() :: :nif | :cnode | :port

Specs

t() :: %Bundlex.Native{
  app: atom(),
  compiler_flags: [String.t()],
  deps: [t()],
  includes: [String.t()],
  interface: interface_t() | nil,
  language: :c | :cpp,
  lib_dirs: [String.t()],
  libs: [String.t()],
  linker_flags: [String.t()],
  name: atom(),
  pkg_configs: [String.t()],
  preprocessors: [Bundlex.Project.Preprocessor.t()],
  sources: [String.t()],
  type: :native | :lib
}

Link to this section Functions

Link to this function

resolve_natives(project, platform)

View Source

Specs

resolve_natives(Bundlex.Project.t(), Bundlex.platform_t()) ::
  {:ok, compiler_commands :: [String.t()]}
  | {:error,
     {application :: atom(),
      {:unknown_fields, [field :: atom()]}
      | {:no_sources_in_native, native_name :: atom()}
      | :invalid_project_specification
      | {:no_bundlex_project_in_file, path :: binary()}
      | :unknown_application}}

Parses natives and generates compiler commands.