Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9265485
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T14:04:48+00:00 2026-06-18T14:04:48+00:00

I wanted to integrate Elixir into our project, and the good old codes don’t

  • 0

I wanted to integrate Elixir into our project, and the good old codes don’t use rebar, so I think writing the rules for building .ex files into Emakefile may be a good idea, yet the man page here didn’t mention anything relevant.

Edit:

Our team works mainly in Windows environment, but the deployment will be done on Linux servers, so I need a cross-platform solution. Since Erlang itself is cross-platform, I wanted to do it with erl -make command.

Of course I can write a Makefile, but then I’ll need a build.bat or something alike to build the code in our developing environments, since we don’t have make command on our dev’ machines.

Anyone have a better idea?

Update:

In case anyone wants to know, I’m doing it this way:

  1. Copy the lib/elixir directory in the Elixir source tree to our source dir, say some_project/src/tools/elixir.
  2. Add some_project/src/tools/elixir/src/elixir_transform.erl and some_project/src/tools/elixir/src/* to the Emakefile, in that order. Set the output dir to some_project/ebin (All the other .beam files are located there).
  3. Copy src/elixir.app.src in the Elixir source tree to some_project/ebin/elixir.app, and edit it to fix the version code.
  4. Build the Erlang code by running erl -pa ebin -make, in some_project dir.
  5. Build the Elixir compiler by running erl -pa ebin -s elixir_compiler core -s erlang halt
  6. Now we have a working Elixir environment in our code, and I use the following escript to build our custom .ex files:
%%! -pa ./ebin
main(_) ->
    ExList = [ 
        <<"source_1.ex">>,
        <<"source_2.ex">>,
        <<"source_3.ex">>],
    application:start(elixir),
    gen_server:call(elixir_code_server, {compiler_options, [{docs, true}, {debug_info, true}]}),
    [elixir_compiler:file_to_path(F, <<"./ebin">>) || F <- ExList],
    erlang:halt(0).
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T14:04:48+00:00Added an answer on June 18, 2026 at 2:04 pm

    If you want to explicitly compile Elixir, I would go with the Makefile approach since it will always be supported by Elixir. However, I would recommend the precompiled binaries or even assume Elixir is installed in each developer machine. You can even add a task to your Emakefile to guarantee everyone is using the proper Elixir version.

    Finally, about compiling your own Elixir code, I would recommend simply using mix. mix is a binary that ships with Elixir and you can simply do ./src/tools/elixir/bin/mix compile from your Emakefile.

    In case using mix is not possible, you should use the parallel compiler, since it will compile files using all cores available in your machine and it will automatically detect and solve dependency in between files. Here is an example of calling the parallel compiler from erlang:

    https://github.com/basho/rebar/pull/347/files#L1R62

    The API is very simple. It expects a list of file names to compile as binary and the directory to output files to as another binary.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I wanted to integrate advertising platform into my iPhone App and I was wondering
I just started a new Haskell project and wanted to set up a good
I wanted to integrate shopify into my software.It is a desktop application. I had
I wanted to Integrate WordPress Blogging to iphone App, so is there any good
I'm writing ActionScript game and wanted to integrate it with FB, so I used
Since Twitter Bootstrap 2 is out, I wanted to integrate that into my Node.js
I just wanted to integrate the opencv video stream from my web cam into
I wanted to use 6 different textures on a cube, one per side, but
Before I begin looking into this myself, I wanted to check if anyone had
I am facing a very annoying problem. I wanted to use sliding menu in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.