# `Bundlex`
[🔗](https://github.com/membraneframework/bundlex/blob/v1.5.8/lib/bundlex.ex#L1)

Some common utility functions.

# `platform_t`

```elixir
@type platform_t() :: :linux | :macosx | :windows32 | :windows64 | :nerves | :custom
```

# `target`

```elixir
@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` 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`

# `build_path`

```elixir
@spec build_path(application :: atom(), native :: atom(), native_interface :: atom()) ::
  String.t()
```

Returns path where compiled native is stored.

# `family`

```elixir
@spec family() :: :unix | :windows | :custom
```

Returns family of the platform obtained with `platform/0`.

# `get_target`

```elixir
@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.

# `platform`

> This function is deprecated. Use Bundlex.get_target/0 instead.

```elixir
@spec platform() :: platform_t()
```

Returns current platform name.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
