How is Gleam iterop with the other Beam language this days?

For example, it’s possible to use Gleam with Phoenix and Ecto? If yes, any docs that could help on this? I would like to give it a try.

1 Like

Gleam interops with any other beam language quite well.

Though you can not use macros or other compile time features from other beam languages.

This is why phoenix and ecto as macro heavy libraries will not work with gleam, and probably never will.

Looks like you can use Gleam code inside an Elixir Phoenix project: https://github.com/michaeljones/gleam-phoenix-mix

5 Likes

I would just to sit down and work out the right LFE macros for phoenix and we can use them together. :wink:

9 Likes

Hey all!

If you want to use Gleam from within a Phoenix project this library may be of use. It enables you to mount a Gleam HTTP app on a Plug app as if it were a regular Plug.

13 Likes

And now you have the official integration via mix with GitHub - gleam-lang/mix_gleam: ⚗️ Build Gleam code with mix

4 Likes