{"id":13394115,"url":"https://github.com/kofigumbs/codec-beam","last_synced_at":"2026-05-01T15:01:27.284Z","repository":{"id":43598021,"uuid":"89818265","full_name":"kofigumbs/codec-beam","owner":"kofigumbs","description":"Generate Erlang VM byte code from Haskell","archived":false,"fork":false,"pushed_at":"2024-11-19T16:49:23.000Z","size":258,"stargazers_count":170,"open_issues_count":2,"forks_count":6,"subscribers_count":7,"default_branch":"master","last_synced_at":"2026-02-23T21:39:19.576Z","etag":null,"topics":["assembly","beam","bytes","codegen","compiler","elixir","erlang"],"latest_commit_sha":null,"homepage":"https://hackage.haskell.org/package/codec-beam","language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kofigumbs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-04-29T23:20:33.000Z","updated_at":"2025-11-09T20:07:59.000Z","dependencies_parsed_at":"2024-12-15T19:47:29.840Z","dependency_job_id":null,"html_url":"https://github.com/kofigumbs/codec-beam","commit_stats":null,"previous_names":["hkgumbs/codec-beam"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kofigumbs/codec-beam","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kofigumbs%2Fcodec-beam","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kofigumbs%2Fcodec-beam/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kofigumbs%2Fcodec-beam/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kofigumbs%2Fcodec-beam/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kofigumbs","download_url":"https://codeload.github.com/kofigumbs/codec-beam/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kofigumbs%2Fcodec-beam/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32501403,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["assembly","beam","bytes","codegen","compiler","elixir","erlang"],"created_at":"2024-07-30T17:01:09.431Z","updated_at":"2026-05-01T15:01:27.205Z","avatar_url":"https://github.com/kofigumbs.png","language":"Haskell","funding_links":[],"categories":["Haskell"],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/hkgumbs/codec-beam.svg?branch=master)](https://travis-ci.org/hkgumbs/codec-beam)\n[![Erlant/OTP Release](https://img.shields.io/badge/Erlang-OTP--20.3-red.svg)](https://github.com/erlang/otp/releases/tag/OTP-20.3)\n\nErlang VM byte code assembler for implementing compile-to-beam languages.\nThe goal is to a provide delightful API for generating BEAM instructions from pure Haskell.\n\n### Usage\n\nThis example writes a simple module to a file:\n\n```haskell\n{-# LANGUAGE OverloadedStrings #-}\nmodule Main where\nimport qualified Data.ByteString.Lazy as LBS\n\nimport Codec.Beam.Instructions (func_info, label, move, return')\nimport qualified Codec.Beam as Beam\n\nmain :: IO ()\nmain =\n  LBS.writeFile \"test_module.beam\" $\n    Beam.encode \"test_module\"\n      [ Beam.export \"tuple_of_one\" 0\n      ]\n      [ label (Beam.Label 1)\n      , func_info \"tuple_of_one\" 0\n      , label (Beam.Label 2)\n      , move (Beam.Tuple [Beam.Integer 1]) (Beam.X 0)\n      , return'\n      ]\n```\n\nAfter you run that program, you can load the resulting module from the Erlang shell!\n\n```\n$ erl\n1\u003e l(test_module).\n2\u003e test_module:tuple_of_one().\n{1}\n```\n\nYou can find [a small example on GitHub](https://github.com/hkgumbs/codec-beam/tree/master/example) and a larger one in [my `elm-beam` project](https://github.com/kofigumbs/elm-beam).\n\n\n### Build\n\nUse [Stack](https://www.haskellstack.org):\n\n```bash\nstack build --test\n```\n\n\n### Acknowledgements\n\nThanks to the following projects, which helped me understand the BEAM file format:\n\n - https://github.com/happi/theBeamBook\n - https://github.com/jerlang/jerlang\n - https://github.com/kolmodin/herl\n - https://github.com/mbrock/HBEAM\n - https://github.com/erlang/otp\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkofigumbs%2Fcodec-beam","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkofigumbs%2Fcodec-beam","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkofigumbs%2Fcodec-beam/lists"}