Not exactly what OP is asking about, but for any passerby who want to glance at something they could already use today, Distillery supports self-extracting archives including a variant that cleans up after itself. I don’t believe the latter reaches for a tmpfs like @wmnnd has above, though.
https://hexdocs.pm/distillery/Mix.Tasks.Release.html#module-examples
Build an executable release
mix release --executable
Build an executable release which will cleanup after itself after it runs
mix release --executable --transient






















