Skip to content

masonforest/elixir_golang_compiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GolangCompiler

A golang compiler for Elixir's mix. Allows users to write elixir ports in golang. Building nifs is not currently supported. Most of the code for this project was copied from the excellent rustler crate. Thanks @hansihe and team!

Installation

If available in Hex, the package can be installed by adding golang_compiler to your list of dependencies in mix.exs:

def deps do
  [
    {:golang_compiler, "~> 0.1.0"}
  ]
end

Setup

Add the following to your mix.exs

def project do [ ... compilers: [:golang] ++ Mix.compilers(), golang_modules: golang_modules(), ... ] end

defp golang_modules do [ my_go_port: [ path: "native/my_go_port", ] ] end

This will build whatever is in native/my_go_port and copy the resulting binary to the priv directory

About

A [golang](https://golang.org/) compiler for Elixir's `mix`

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages