Noob Question: Is it possible to enable user contributed 'extensions' to your compiled elixir application?

Maybe you don’t need to do the same thing as your Java application. I think your application needs jar files only because that’s required by JVM.

In Elixir, modules can be defined at run time so the admin can just upload valid .exs files and you can run them on the backend. As a side effect, the .exs files can define some modules.

I’ve created a small library called formular and in the latest development, I’m doing similar things. Compiling to Elixir modules has been supported by the master branch and version 0.3.0-pre.2. It may not fully fit your need because not everything is allowed to run by default, but I think that would be easy to change, and most importantly, it’s a demo of compiling modules on the fly.

The idea is that source files are easier to distribute and verify (since the awesome APIs on dealing with ASTs) than BEAM files.

2 Likes