View Source Bundlex (Bundlex v1.5.3)
Some common utility functions.
Summary
Functions
Returns path where compiled native is stored.
Returns family of the platform obtained with platform/0
.
A function returning information about the target platform. In case of cross-compilation the information can be provided by setting appropriate environment variables.
platform()
deprecated
Returns current platform name.
Types
@type platform_t() :: :linux | :macosx | :windows32 | :windows64 | :nerves | :custom
@type target() :: %{ architecture: String.t(), vendor: String.t(), os: String.t(), abi: String.t() }
A map containing four fields that describe the target platform.
It consists of:
- architecture - e.g.
x86_64
orarm64
- vendor - e.g.
pc
- os - operating system, e.g.
linux
ordarwin20.6.0
- abi - application binary interface, e.g.
musl
orgnu
Functions
Link to this function
build_path(application \\ MixHelper.get_app!(), native, native_interface)
View SourceReturns path where compiled native is stored.
@spec family() :: :unix | :windows | :custom
Returns family of the platform obtained with platform/0
.
@spec get_target() :: target()
A function returning information about the target platform. In case of cross-compilation the information can be provided by setting appropriate environment variables.
This function is deprecated. Use Bundlex.get_target/0 instead.
@spec platform() :: platform_t()
Returns current platform name.