Skip to content

monkeygroover/rebar3_rust

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rebar3_rust

Compile rust crates for erlang projects.

Use

Add the plugin and hooks to your rebar.config

{
  plugins,
  [
    {
      rebar3_rust,
      {
        git,
        "https://github.com/sdwolf/rebar3_rust.git",
        {branch, "master"}
      }
    }
  ]
}.

{
  provider_hooks,
  [
    {
      post,
      [
        {compile, {rust, compile}},
      ]
    }
  ]
}.

Add the following to your .gitignore

crates/*/target
priv/*
!priv/.keep

You can find an example usage here.

Upgrade

rebar3 plugins upgrade rebar3_rust

Development

Go inside the downloaded dependency folder:

cd _build/default/plugins/rebar3_rust

Start your erlang docker container:

docker-here erlang bash

# Or use the full command if you do not have the docker-here alias:
docker run --rm -it -u `id -u`:`id -g` -v "$PWD":/work -w /work erlang bash

Compile from a dependent project:

rebar3 compile && rm -rf ebin/ && mv _build/default/lib/rebar3_rust/ebin/ .

Resources

https://github.com/goertzenator/erlang_nif-sys

About

Compile rust NIFs for erlang projects.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Erlang 100.0%