View Source Bundlex (Bundlex v1.4.5)

Some common utility functions.

Summary

Types

A map containing four fields that describe the platform.

Functions

Returns family of the platform obtained with platform/0.

A function returning a target triplet for the environment on which it is run.

Returns current platform name.

Types

@type platform_t() :: :linux | :macosx | :windows32 | :windows64 | :nerves
@type target() :: %{
  architecture: String.t(),
  vendor: String.t(),
  os: String.t(),
  abi: String.t() | nil
}

A map containing four fields that describe the platform.

It consists of:

  • architecture - e.g. x86_64 or arm64
  • vendor - e.g. pc
  • os - operating system, e.g. linux or darwin20.6.0
  • abi - application binary interface, e.g. musl or gnu (nil if unknown / non-existent)

Functions

Link to this function

build_path(application \\ MixHelper.get_app!(), native, native_interface)

View Source
@spec build_path(application :: atom(), native :: atom(), native_interface :: atom()) ::
  String.t()

Returns path where compiled native is stored.

@spec family() :: :unix | :windows

Returns family of the platform obtained with platform/0.

@spec get_target() :: target()

A function returning a target triplet for the environment on which it is run.

@spec platform() :: platform_t()

Returns current platform name.