[erlang-questions] [ANN] rebar_escript_plugin

Fred Hebert mononcqc@REDACTED
Wed Sep 3 15:04:24 CEST 2014


On 09/03, Tuncer Ayaz wrote:
> (3) provides a default main/1 function, starting all needed
> applications as a normal Erlang release would
> 
> We could do the same, but I'm not sure there is a single way to start
> an escript. Your runner seems to spin up all bundled apps and wait for
> termination, but is this generally applicable? Does it work with all
> all kinds of escripts, including interactive tools?
> 

For this kind of stuff, I'd rather have an eventual harness a bit like
this: https://github.com/ferd/start_wrap

This thing uses a supervisor bridge to supervise your `main/1` function
and then you're able to ship a release using it, giving you the simple
part about an escript, while having the ability to ship and boot OTP
applications along with it.

You can eventually move to a more proper release fairly easily as soon
as you OTP-ize all you've got.

It's still pretty damn unusable at this point, but this was a proof of
concept I quickly hacked together back in March and had forgotten to
share around.

Regards,
Fred.



More information about the erlang-questions mailing list