A Haskell library for generating Erlang VM byte code from pure Haskell, enabling compile-to-BEAM languages.
Codec-beam is a Haskell library that generates Erlang VM (BEAM) byte code from pure Haskell, allowing developers to create languages or tools that compile to the BEAM format. It solves the problem of needing to write low-level BEAM instructions manually by providing a high-level, type-safe API. This enables the implementation of compile-to-beam languages, such as custom domain-specific languages or transpilers, directly within Haskell.
Haskell developers building languages, transpilers, or tools that target the Erlang VM, as well as those interested in compiler construction or cross-language interoperability between Haskell and Erlang.
Developers choose Codec-beam for its pure functional API that simplifies BEAM byte code generation, its type safety that reduces errors, and its ability to integrate seamlessly with Haskell projects, making it a unique tool for bridging Haskell and the Erlang ecosystem.
Generate Erlang VM byte code from Haskell
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Offers a purely functional interface for BEAM instruction generation, reducing side effects and making code more predictable and testable, as demonstrated in the example Haskell snippets.
Leverages Haskell's strong type system to catch errors at compile time, ensuring correct BEAM byte code construction and minimizing runtime issues.
Includes real-world examples, such as the elm-beam project, which show how to build compile-to-beam languages from scratch, aiding in adoption and learning.
Encodes Haskell-defined modules into valid .beam files that can be loaded and executed by the Erlang VM, bridging Haskell and Erlang seamlessly.
Limited to Haskell developers; the library has a smaller community and fewer resources compared to native Erlang tools, which can hinder support and collaboration.
Requires setup with Haskell build tools like Stack, adding complexity for teams not already embedded in the Haskell ecosystem, as noted in the build instructions.
Focuses on core instructions; the README acknowledges reliance on other projects for understanding the BEAM format, suggesting it may not support all advanced or niche BEAM features.