View Source Bundlex.Native (Bundlex v1.5.3)

Module responsible for parsing and processing natives' configurations.

Summary

Functions

Parses natives and generates compiler commands.

Types

@type t() :: %Bundlex.Native{
  app: Application.app(),
  compiler_flags: [String.t()],
  deps: [t()],
  includes: [String.t()],
  interface: Bundlex.Project.native_interface() | nil,
  language: Bundlex.Project.native_language(),
  lib_dirs: [String.t()],
  libs: [String.t()],
  linker_flags: [String.t()],
  name: Bundlex.Project.native_name(),
  os_deps: [Bundlex.Project.os_dep()],
  pkg_configs: [String.t()],
  preprocessors: [Bundlex.Project.Preprocessor.t()],
  sources: [String.t()],
  type: :native | :lib
}

Functions

Link to this function

resolve_natives(project, platform)

View Source
@spec 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.