I’m looking for ways to add Gleam code into a project that already uses Erlang/Rebar3, I’ve noticed that rebar_gleam kind does what I want but it is archived, also Gleam compiles to Erlang so it seems feasible.
My idea is creating another lib
that gets imported by the main application, to rewrite a couple sections that would benefit from the ML-like type system that Gleam boasts. This is my current project structure:
$ tree -I '_build|maps|*.dump' server
server
├── apps
│ └── server
│ └── src
│ ├── character.erl
│ ├── dispatcher.erl
│ ├── dispatcher_sup.erl
│ ├── map.erl
│ ├── map_generator.erl
│ ├── player.erl
│ ├── player_sup.erl
│ ├── registry.erl
│ ├── server.app.src
│ ├── server.erl
│ ├── server_sup.erl
│ ├── types.hrl
│ ├── world.erl
│ └── world_sup.erl
├── config
│ ├── sys.config
│ └── vm.args
├── database
│ ├── main.down.sql
│ ├── main.input.sql
│ ├── migrate_down.sh
│ ├── migrate_input.sh
│ ├── migrate_up.sh
│ └── migrations
│ ├── 000001_schema.sql
│ ├── 000002_player.sql
│ ├── 000003_map.sql
│ ├── 000004_character.sql
│ └── 000005_equipment.sql
├── lib
│ └── database
│ ├── rebar.config
│ └── src
│ ├── database.app.src
│ ├── database.erl
│ ├── database_utils.erl
│ └── postgres_m.erl
├── rebar.config
├── rebar-deps.nix
└── rebar.lock
Is this somehow supported? Or is there a better a way to pull this that wasn’t mentioned?