Gleam Erlang Interop

Declare external Erlang functions and call them from Gleam with typed interfaces.

187|20|Updated Nov 20, 2025
One-click install
npx skills add https://github.com/TheBushidoCollective/han --skill gleam-erlang-interop
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Gleam Erlang Interop
Source: https://github.com/TheBushidoCollective/han/tree/main/jutsu/jutsu-gleam/skills/gleam-interop
Command: npx skills add https://github.com/TheBushidoCollective/han --skill gleam-erlang-interop

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Gleam-Erlang interoperability to call Erlang code, use OTP, and integrate with BEAM libraries safely.

Core Features & Use Cases

  • External function declarations and cross-language calls
  • Working with Erlang types, NIFs, and ports
  • Safe boundaries when integrating Gleam with Erlang code

Quick Start

Declare an external Erlang function and call it from Gleam, then handle results with typed aliases.

Frequently Asked Questions about Gleam Erlang Interop

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I call Erlang code from Gleam?

Call Erlang code from Gleam by declaring external functions with typed signatures using Gleam's external function syntax, then invoke them as normal Gleam functions. The Skill provides typed interfaces that maintain type safety across the language boundary while accessing Erlang modules and OTP behaviors.

Can I use Erlang NIFs and ports in Gleam applications?

Yes. Gleam-Erlang interop enables integration with NIFs (native implemented functions) and ports for low-level BEAM ecosystem access. Declare external functions that wrap NIF calls or port communication, maintaining type safety at the Gleam boundary.

What's the safe way to handle Erlang data types in Gleam?

Handle Erlang data types safely by mapping them to typed Gleam aliases at the interop boundary. This approach ensures type correctness when exchanging data between Gleam and Erlang code, preventing runtime errors from type mismatches.

How do I maintain type safety when integrating with Erlang libraries?

Maintain type safety by declaring external functions with explicit typed signatures for Erlang library calls. The Skill enforces boundary correctness through Gleam's type system, ensuring Erlang function inputs and outputs conform to declared types.

What BEAM ecosystem integrations does Gleam support?

Gleam supports BEAM ecosystem integrations including OTP behaviors, Erlang modules, NIFs, and ports. Declare external functions to access these components while keeping Gleam's type guarantees intact across the interop boundary.