# gleam-lang/gleam

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/gleam-lang-gleam).**

21,147 stars · 911 forks · Rust · apache-2.0

## Links

- GitHub: https://github.com/gleam-lang/gleam
- Homepage: https://gleam.run
- awesome-repositories: https://awesome-repositories.com/repository/gleam-lang-gleam.md

## Topics

`compiler` `erlang` `gleam` `programming-language` `statically-typed`

## Description

Gleam is a statically typed, functional programming language designed for building scalable and maintainable applications. It operates as a cross-platform development ecosystem that compiles source code to run on the Erlang virtual machine or within JavaScript environments. The language integrates a package manager and build system that automates dependency resolution, project compilation, and the generation of software bills of materials.

The language distinguishes itself through a focus on type-driven domain modeling and a robust foreign function interface framework. By encoding business rules into custom type definitions, it prevents the representation of invalid data states at compile time. The foreign function interface allows for the integration of external code from other languages while enforcing strict type safety and explicit interface declarations across boundaries, ensuring consistency even when interacting with foreign runtimes.

The project provides a comprehensive suite of tools for managing the software supply chain, including automated dependency analysis, metadata scanning for licensing information, and compliance reporting. It supports complex system design through result-based error handling, custom type state modeling, and the builder pattern. These features collectively facilitate the creation of reliable, multi-target applications that maintain transparency and security throughout the development lifecycle.

## Tags

### Programming Languages & Runtimes

- [Statically Typed Languages](https://awesome-repositories.com/f/programming-languages-runtimes/programming-language-varieties/programming-languages/type-systems/type-checking-disciplines/statically-typed-languages.md) — Provides a statically typed language for building scalable and maintainable applications across diverse runtime environments.
- [Erlang](https://awesome-repositories.com/f/programming-languages-runtimes/programming-language-varieties/programming-languages/functional-languages/erlang.md) — Functions as a programming language designed for high-concurrency systems leveraging the BEAM runtime.
- [Multi-Target Compilers](https://awesome-repositories.com/f/programming-languages-runtimes/source-code-compilers/multi-target-compilers.md) — Transforms source code into platform-specific bytecode or source code for execution across diverse virtual machines and browsers.
- [Foreign Function Interfaces](https://awesome-repositories.com/f/programming-languages-runtimes/language-interoperability/foreign-function-interfaces.md) — Enforces strict type safety when calling external code through explicit interface declarations.
- [Safe Interfaces](https://awesome-repositories.com/f/programming-languages-runtimes/language-interoperability/foreign-function-interfaces/safe-interfaces.md) — Defines explicit types for external code to prevent runtime errors when interacting with foreign runtimes. ([source](https://gleam.run/documentation/conventions-patterns-and-anti-patterns))
- [Type Definitions](https://awesome-repositories.com/f/programming-languages-runtimes/language-features-paradigms/type-system-tools/type-definitions.md) — Allows representing opaque data structures from other languages as types that pass through code without inspection. ([source](https://gleam.run/documentation/externals))

### Business & Productivity Software

- [Cross-Platform Applications](https://awesome-repositories.com/f/business-productivity-software/cross-platform-applications.md) — Compiles source code to run on both the Erlang virtual machine and JavaScript environments for cross-platform execution.

### Development Tools & Productivity

- [Cross-Platform Build Systems](https://awesome-repositories.com/f/development-tools-productivity/cross-platform-build-systems.md) — Integrates a package manager and build system that automates compilation and dependency resolution for multi-target projects.
- [Compilers](https://awesome-repositories.com/f/development-tools-productivity/compilers-toolchains/compilers.md) — Compiles source code into different target formats for execution across diverse virtual machines and browser environments. ([source](https://gleam.run/documentation))
- [Dependency Management](https://awesome-repositories.com/f/development-tools-productivity/dependency-management.md) — Automates the retrieval and integration of external packages to ensure consistent development environments. ([source](https://gleam.run/documentation))
- [Manifest-Driven Dependency Managers](https://awesome-repositories.com/f/development-tools-productivity/manifest-driven-dependency-managers.md) — Automates dependency retrieval and tracking using declarative manifest files for reproducible builds.

### Software Engineering & Architecture

- [Algebraic Data Types](https://awesome-repositories.com/f/software-engineering-architecture/abstract-data-types/algebraic-data-types.md) — Encodes business rules into custom type definitions to ensure invalid data states are impossible to construct.
- [Domain Type Definitions](https://awesome-repositories.com/f/software-engineering-architecture/data-structures/domain-type-definitions.md) — Encodes business rules into custom type definitions to ensure invalid data states cannot be represented. ([source](https://gleam.run/documentation/conventions-patterns-and-anti-patterns))
- [Error Handling Patterns](https://awesome-repositories.com/f/software-engineering-architecture/error-handling-patterns.md) — Uses dedicated result types for fallible operations to ensure consistency and eliminate unexpected runtime crashes. ([source](https://gleam.run/documentation/conventions-patterns-and-anti-patterns))
- [Type-Safe State Definitions](https://awesome-repositories.com/f/software-engineering-architecture/architectural-design-patterns/state-management/state-logic-and-utilities/type-safe-state-definitions.md) — Replaces boolean flags with descriptive types to improve code clarity and prevent state confusion. ([source](https://gleam.run/documentation/conventions-patterns-and-anti-patterns))
- [Dependency License Extractors](https://awesome-repositories.com/f/software-engineering-architecture/licensing-information/dependency-license-extractors.md) — Scans dependency metadata to collect licensing and copyright information for supply chain transparency. ([source](https://gleam.run/documentation/source-bill-of-materials))
- [Compliance Reporting](https://awesome-repositories.com/f/software-engineering-architecture/compliance-reporting.md) — Automates compliance reporting by orchestrating dependency analysis within continuous integration pipelines. ([source](https://gleam.run/documentation/source-bill-of-materials))

### DevOps & Infrastructure

- [Dependency Analysis](https://awesome-repositories.com/f/devops-infrastructure/dependency-management/analysis-visualization-tools/dependency-analysis.md) — Identifies direct and transitive components to create a complete record of project dependencies. ([source](https://gleam.run/documentation/source-bill-of-materials))

### Security & Cryptography

- [Software Supply Chain Security](https://awesome-repositories.com/f/security-cryptography/software-supply-chain-security.md) — Generates comprehensive inventories and compliance reports for project dependencies to ensure supply chain transparency.

### Web Development

- [API Client SDKs](https://awesome-repositories.com/f/web-development/api-client-sdks.md) — Provides type-safe client libraries for interacting with backend APIs across different platforms. ([source](https://gleam.run/documentation/conventions-patterns-and-anti-patterns))
