elixir_with_gleam
elixir_with_gleam copied to clipboard
Running Gleam in a mix project.
ElixirWithGleam
A example project with Gleam and Elixir playing nicely with Mix.
To use this repo you need to have both Elixir and Gleam installed.
Steps to add Gleam to an existing Mix Project.
Install gleam binary
https://gleam.run/getting-started/installing-gleam.html
Update mix.exs to compile .gleam files and include the Gleam standard library.
defmodule ElixirWithGleam.MixProject do
use Mix.Project
def project do
[
# ...
erlc_paths: ["src", "gen"],
compilers: [:gleam | Mix.compilers()],
# ...
]
end
defp deps do
[
# ...
{:mix_gleam, "~> 0.1.0"},
{:gleam_stdlib, "~> 0.8.0"}
# ...
]
end
# ...
end