All Projects → membraneframework → Unifex

membraneframework / Unifex

Licence: apache-2.0
Tool for generating interfaces between native C code and Elixir

Programming Languages

elixir
2628 projects

Unifex

Hex.pm API Docs CircleCI

Unifex is a tool for generating interfaces between native C code and Elixir, that:

  • provides intuitive and concise tools for defining native interfaces,
  • generates all the boilerplate for you,
  • provides useful abstractions over binaries and state,
  • makes native code independent from erl_nif or ei library, so the same code is usable either with NIFs or CNodes.

API documentation is available at HexDocs.

Installation

To install, you need to configure Mix project as follows:

defmodule MyApp.Mixfile do
  use Mix.Project

  def project do
    [
      app: :my_app,
      compilers: [:unifex, :bundlex] ++ Mix.compilers, # add unifex and bundlex to compilers
      ...,
      deps: deps()
   ]
  end

  defp deps() do
    [
      {:unifex, "~> 0.3.2"} # add unifex to deps
    ]
  end
end

Usage

For detailed usage description see Creating Unifex Natives guide.

Supported types

For currently supported types see Supported Types section.

See also

Unifex depends on the following libraries:

Copyright and License

Copyright 2018, Software Mansion

Software Mansion

Licensed under the Apache License, Version 2.0

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].