Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/version-fox/vfox-erlang
Erlang/OTP vfox plugin. Use the vfox to manage multiple Erlang/OTP versions in Linux/Darwin MacOS, also Windows!!!
https://github.com/version-fox/vfox-erlang
erlang erlang-developement erlang-otp vfox vfox-plugin
Last synced: about 1 month ago
JSON representation
Erlang/OTP vfox plugin. Use the vfox to manage multiple Erlang/OTP versions in Linux/Darwin MacOS, also Windows!!!
- Host: GitHub
- URL: https://github.com/version-fox/vfox-erlang
- Owner: version-fox
- License: apache-2.0
- Created: 2024-04-01T12:43:14.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-12-17T16:23:50.000Z (about 2 months ago)
- Last Synced: 2024-12-23T23:16:43.411Z (about 1 month ago)
- Topics: erlang, erlang-developement, erlang-otp, vfox, vfox-plugin
- Language: Lua
- Homepage:
- Size: 415 KB
- Stars: 5
- Watchers: 3
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
![logo](./assets/vfox-erlang-logo.png)
[![E2E tests on Linux](https://github.com/version-fox/vfox-erlang/actions/workflows/e2e_test_linux.yaml/badge.svg)](https://github.com/version-fox/vfox-erlang/actions/workflows/e2e_test_linux.yaml) [![E2E tests on Darwin MacOS](https://github.com/version-fox/vfox-erlang/actions/workflows/e2e_test_darwin.yaml/badge.svg)](https://github.com/version-fox/vfox-erlang/actions/workflows/e2e_test_darwin.yaml) [![E2E tests on Windows](https://github.com/version-fox/vfox-erlang/actions/workflows/e2e_test_windows.yaml/badge.svg)](https://github.com/version-fox/vfox-erlang/actions/workflows/e2e_test_windows.yaml)
# vfox-erlang plugin
Erlang/OTP [vfox](https://github.com/version-fox) plugin. Use the vfox to manage multiple [Erlang/OTP](https://www.erlang.org/) versions in Linux/Darwin MacOS/Windows. all platform~
## Usage
```shell
# install plugin
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 [email protected]
```## Before install Erlang/OTP in Linux/Darwin MacOS
vfox-erlang plugin would install Erlang/OTP through the [Erlang/OTP](https://www.erlang.org/doc/installation_guide/install#how-to-build-and-install-erlang-otp) source code compilation. So you must have the utilities mentioned in the document -> [Building and Installing Erlang/OTP](https://www.erlang.org/doc/installation_guide/install#how-to-build-and-install-erlang-otp).
Here are examples of installing on Ubuntu 20.04 and MacOS 13.
### install in Linux (Ubuntu 20.04)
```shell
# install utilities
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
```You can reference the E2E test in Ubuntu 20.04: [.github/workflows/e2e_test_linux.yaml](.github/workflows/e2e_test_linux.yaml)
### install in Darwin (MacOS 13)
```shell
# install utilities
brew install autoconf libxslt fop wxwidgets openssl
```You can reference the E2E test in MacOS 13: [.github/workflows/e2e_test_darwin.yaml](.github/workflows/e2e_test_darwin.yaml)
### Note
By default, vfox-erlang plugin will Build [EEP-48 documentation chunks](https://www.erlang.org/doc/apps/kernel/eep48_chapter) for get doc in REPL (eg: h(list).) and [lsp docs hint](https://github.com/elixir-lsp/vscode-elixir-ls/issues/284).
![erl get docs](./assets/get_docs_in_repl.png)
You cal also use the `OTP_CONFIGURE_ARGS` environment variable to control install behavior. reference this documentation [https://github.com/erlang/otp/blob/master/HOWTO/INSTALL.md#configuring-1](https://github.com/erlang/otp/blob/master/HOWTO/INSTALL.md#configuring-1) for more configuration. eg:
```shell
# example
export OTP_CONFIGURE_ARGS="--enable-jit --enable-kernel-poll"
vfox install [email protected]
```Building Erlang/OTP on a relatively fast computer takes approximately 5 minutes. To speed it up, you can utilize [parallel make](https://github.com/erlang/otp/blob/master/HOWTO/INSTALL.md#building-3) with the `-j` option. for example:
```shell
export MAKEFLAGS=-j8
vfox install [email protected]
```## install Erlang/OTP in Windows platform
In windows, the vfox-erlang plugin downloads the Erlang/OTP version of the exe installer from the [Erlang/OTP releases](https://github.com/erlang/otp/releases) and executes it for you.
This is an installation example in PowerShell:
```pwsh
vfox install [email protected]
vfox use [email protected]
Invoke-Expression "$(vfox activate pwsh)"
# Test the installation results
& erl.exe -eval 'erlang:display({otp_release, erlang:system_info(otp_release)}), halt().' -noshell
```You can reference the E2E test in in windows-2022: [.github/workflows/e2e_test_windows.yaml](.github/workflows/e2e_test_windows.yaml)