Installation
View SourceCommunity Edition (Hex.pm)
The Community Edition is available on hex.pm and uses pure Erlang fallbacks for all operations. No Rust toolchain required.
Rebar3 (Erlang Projects)
Add macula_tweann to your rebar.config:
{deps, [
{macula_tweann, "~> 0.17.0"}
]}.Then fetch dependencies:
rebar3 compile
Mix (Elixir Projects)
Add to your mix.exs:
def deps do
[
{:macula_tweann, "~> 0.16.0"}
]
endThen fetch dependencies:
mix deps.get
Enterprise Edition (10-15x Faster)
The Enterprise Edition includes high-performance Rust NIFs for compute-intensive operations. Add the private macula_nn_nifs package alongside macula-tweann:
{deps, [
{macula_tweann, "~> 0.17.0"},
{macula_nn_nifs, {git, "git@github.com:macula-io/macula-nn-nifs.git", {tag, "v0.2.0"}}}
]}.Enterprise Requirements
- Rust 1.70+ and Cargo installed
- SSH access to the private macula-nn-nifs repository
The NIFs are automatically detected and used. No code changes required.
See the Enterprise NIF Acceleration guide for details.
From Source
Clone the repository:
git clone https://github.com/macula-io/macula-tweann.git
cd macula-tweann
rebar3 compile
Requirements
- Erlang/OTP 24 or later
- Mnesia (included with Erlang)
- Rust 1.70+ (Enterprise Edition only)
Verify Installation
Start an Erlang shell and initialize the database:
rebar3 shell
% In the shell:
genotype:init_db().
% => okIf you see ok, the installation is successful!
Verify NIF Acceleration (Enterprise)
% Check if enterprise NIFs are loaded
macula_nn_nifs:is_loaded().
% => true (Enterprise) or error (Community)
% Check tweann_nif detection
tweann_nif:is_loaded().
% => true (NIFs available)Next Steps
See the Quick Start guide to create your first evolving neural network.