Packages

Bundle your Gleam-on-Erlang project into an escript, a single executable file!

Current section

Files

Jump to
gleescript src gleescript_main_shim.erl
Raw

src/gleescript_main_shim.erl

-module(gleescript_main_shim).
-export([main/1]).
main(_) ->
io:setopts(standard_io, [binary, {encoding, utf8}]),
io:setopts(standard_error, [{encoding, utf8}]),
ApplicationModule = list_to_atom(os:getenv("GLEESCRIPT_MAIN")),
{ok, _} = application:ensure_all_started(ApplicationModule),
ApplicationModule:main().