| Crates.io | cargo-erlangapp |
| lib.rs | cargo-erlangapp |
| version | 0.1.4 |
| created_at | 2016-07-21 15:09:56.594318+00 |
| updated_at | 2016-10-06 14:26:18.569508+00 |
| description | Build Rust crates embedded in an Erlang application |
| homepage | |
| repository | https://github.com/goertzenator/cargo-erlangapp |
| max_upload_size | |
| id | 5740 |
| size | 21,452 |
A cargo subcommand for building Rust crates embedded in an Erlang application. All crates in the crates directory get compiled and placed into priv/crates. Below is an example of an Erlang application with the artifacts from two crates placed into priv/crates:
myapp/
Makefile
ebin/
src/
crates/
foo_nif/
Cargo.toml
...
bar_port/
Cargo.toml
...
priv/
crates/
foo_nif/
libfoo_nif.so
bar_port/
bar_port
cargo-erlangapp is intended to be installed and used automatically by Erlang build system like erlang.mk and rebar3, but may also be used manually.
The Erlang application find_crate assists in locating Rust artifacts in priv/crates.
cargo install cargo-erlangapp
Usage:
cargo-erlangapp build [cargo rustc args]
cargo-erlangapp clean [cargo clean args]
cargo-erlangapp test [cargo test args]
cargo-erlangapp takes care of a few wrinkles when compiling Rust code for Erlang:
cargo-erlangapp has to read the JSON manifest to identify all the targets and compile each individually and applying special flags to just dylibs.