vfox-erlang Logo

vfox-erlang Plugin

Manage multiple Erlang/OTP versions across platforms

github.com/version-fox/vfox-erlang

E2E tests on Linux E2E tests on Darwin MacOS E2E tests on Windows

Erlang/OTP vfox plugin. Use vfox to manage multiple Erlang/OTP versions in Linux/Darwin MacOS/Windows. All platforms supported!

Feature Highlights

Cross-Platform Support

Works seamlessly on Linux, macOS, and Windows

Source Compilation

Builds Erlang/OTP from source with customizable options

Prebuilt Versions

Support for prebuilt Erlang/OTP packages for faster installation

Documentation Integration

Builds EEP-48 documentation chunks for REPL documentation access

Mise Compatibility

Works with mise dev tools manager as a backend

Customizable Builds

Support for custom configuration through environment variables

Installation Guide

Getting started with vfox-erlang is simple:

vfox add --source https://github.com/version-fox/vfox-erlang/archive/refs/heads/main.zip erlang

# Install an available version
vfox search erlang
# or specific version 
vfox install erlang@25.3.2.10

Linux (Ubuntu) Prerequisites

Before installing Erlang/OTP on Linux, install required utilities:

# Ubuntu 20.04/22.04
sudo apt-get -y install build-essential autoconf m4 libncurses5-dev \
libwxgtk3.0-gtk3-dev libwxgtk-webview3.0-gtk3-dev libgl1-mesa-dev \
libglu1-mesa-dev libpng-dev libssh-dev unixodbc-dev xsltproc fop \
libxml2-utils libncurses-dev openjdk-11-jdk

macOS Prerequisites

Before installing Erlang/OTP on macOS:

# Install utilities with Homebrew
brew install autoconf libxslt fop wxwidgets openssl

Windows Installation

On Windows, the plugin downloads the official Erlang/OTP installer:

# PowerShell example
vfox install erlang@25.3.2.12
vfox use erlang@25.3.2.12
Invoke-Expression "$(vfox activate pwsh)"
# Test the installation
& erl.exe -eval 'erlang:display({otp_release, erlang:system_info(otp_release)}), halt().' -noshell

Usage Examples

Basic usage of the vfox-erlang plugin:

# Install plugin
vfox add --source https://github.com/version-fox/vfox-erlang/archive/refs/heads/main.zip erlang

# Search available versions
vfox search erlang

# Install specific version
vfox install erlang@25.3.2.10

Custom Configuration

Control installation behavior with environment variables:

# Enable JIT and kernel poll
export OTP_CONFIGURE_ARGS="--enable-jit --enable-kernel-poll"
vfox install erlang@25.3.2.10

# Speed up compilation with parallel make
export MAKEFLAGS=-j8
vfox install erlang@25.3.2.10

Documentation in REPL

vfox-erlang builds EEP-48 documentation chunks for REPL access:

Erlang REPL documentation

Advanced Features

Prebuilt Erlang/OTP Versions

After vfox-erlang v1.1.0, you can install prebuilt versions for faster setup:

# Disable vfox search cache first
# Then install prebuilt version for Linux
USE_PREBUILT_OTP="ubuntu-20.04" vfox search erlang
USE_PREBUILT_OTP="ubuntu-20.04" vfox install erlang@26.2.3

# For macOS
USE_PREBUILT_OTP=true vfox search erlang
USE_PREBUILT_OTP=true vfox install erlang@26.2.3

Using with mise

The vfox-erlang plugin works with mise dev tools manager:

# Install and activate erlang through mise using vfox backend
mise use -g vfox:version-fox/vfox-erlang@26.2.3

# Use mise exec to run erlang commands
mise exec -- erl -version
mise exec -- erlc hello.erl
mise exec -- erl -noshell -s hello hello_world -s init stop

Conclusion

vfox-erlang is a powerful plugin for managing multiple Erlang/OTP versions across all major platforms.

Contribution

Contributions welcome! Fork the repo and submit pull requests.

License

This project is licensed under the MIT License.

Thank you for using vfox-erlang!