# Where is juliac developed

**URL:** <https://discourse.julialang.org/t/where-is-juliac-developed/113004>\
**Category:** Internals & Design\
**Tags:** question\
**Created:** [April 16, 2024, 11:27am UTC](https://discourse.julialang.org/t/where-is-juliac-developed/113004 "2024-04-16T11:27:55Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![The\_Mastermage](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/the_mastermage/32/49444_2.png) [@The\_Mastermage](https://discourse.julialang.org/u/The_Mastermage)\
**Post date:** [April 16, 2024, 11:27am UTC](https://discourse.julialang.org/t/where-is-juliac-developed/113004/1 "2024-04-16T11:27:55Z")

</div>

As i am quite interested in having julia create binaries, and I have been snippets here and there about the juliac development I wanted to ask where exactly (on which branch, or github) juliac is developed such that i could sneak a peak in.  
I have not been able to find it thus far, maybe I am also searching for the wrong keywords.

---

<div class="post-metadata">

**Author:** ![Olivier\_Merchiers](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/olivier_merchiers/32/4073_2.png) [@Olivier\_Merchiers](https://discourse.julialang.org/u/Olivier_Merchiers)\
**Post date:** [April 16, 2024, 12:25pm UTC](https://discourse.julialang.org/t/where-is-juliac-developed/113004/2 "2024-04-16T12:25:04Z")

</div>

Hi,

Others can add more information, but as far as I know, the term juliac appeared in this pr:

> <https://github.com/JuliaLang/julia/pull/51417#issue-1906792552>
>
> Following the discussion in #50974, it became clear that there is significant ob…jection to changes to the behavior of the julia CLI driver. Some commenters found changes to the behavior acceptable if they were unlikely to impact existing code (e.g. in the case of #50974 using \`\_\_main\_\_\` instead of \`main\`), while other were worried about the reputational risks of even changing behavior in the corner case. In subsequent discussion it became relatively clear that the only way forward that did not raise significant objection was to introduce a new CLI driver for the new behavior. This may seem a bit drastic just for the change in #50974, but I actually think there's a number of other quality-of-life improvements that this would enable us to do over time, for example:
> - Autoloading/caching of all packages in the manifest
> - auto-selection of julia versions (integrate juliaup?)
> 
> In addition, it doesn't seem so bad to have some CLI design flexibility to make sure that the \`juliac\` driver is aligned with what we need.
> 
> This PR is the minimal infrastructure to add the new drivers. In particular, it does the following:
> 
> 1. Adds two new cli drivers, \`juliax\` and \`juliac\`. At the moment, \`juliac\` is a placeholder and just errors, while \`juliax\` behaves the same as \`julia\` (except to error on the deprecated \`--math-mode=fast\`, just as an example of a behavior difference).
> 
> 2. Documents that the behavior of \`julia\` (but not \`juliax\` or \`juliac\`) is pat of the julia public API.
> 
> 3. Switches the cli mode based on the argv\[0\] of the binary. I.e. all three binaries are identical, except for their name, the same way that, e.g. \`clang\` and \`clang++\` are the same binary just with different names. On Unix systems, these are symlinks. On windows, separate copies of the same (small) binary. There is a fallback cli option \`--cli-mode\` that can be used in case the argv\[0\] detection is not available (e.g. for some fringe embedded use cases).
> 
> 4. There is currently no separate \`-debug\` version of the new drivres. My intention is to make this dependent on the ordinary debug flags, rather than having a separate driver.
> 
> Once this is merged, I intend to resubmit #50974 (chaning \`juliax\` only), and then finish and hook up \`juliac\` shortly thereafter.

Then there was this pr:

> <https://github.com/JuliaLang/julia/pull/51435#issue-1909866055>
>
> As they say, if at first you don't succeed, try again, then try again, add an ex…tra layer of indirection and take a little bit of spice from every other idea and you've got yourself a wedding cake. Or something like that, I don't know - at times it felt like this cake was getting a bit burnt.
> 
> Where was I?
> 
> Ah yes.
> 
> This is the third edition of the main saga (#50974, #51417). In this version, the spelling that we'd expect for the main use case is:
> \`\`\`
> function (@main)(ARGS)
> println("Hello World")
> end
> \`\`\`
> 
> This syntax was originally proposed by \`@vtjnash\`. However, the semantics here are slightly different. \`@main\` simply expands to \`main\`, so the above is equivalent to:
> \`\`\`
> function main(ARGS)
> println("Hello World")
> end
> @main
> \`\`\`
> 
> So \`@main\` is simply a marker that the \`main\` binding has special behavior. This way, all the niceceties of import/export, etc. can still be used as in the original \`Main.main\` proposal, but there is an explicit opt-in and feature detect macro to avoid executing this when people do not expect.
> 
> Additionally, there is a smooth upgrade path if we decide to automatically enable \`Main.main\` in Julia 2.0.

which got merged as a different take on 51417

---

<div class="post-metadata">

**Author:** ![mbauman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mbauman/32/31082_2.png) [@mbauman](https://discourse.julialang.org/u/mbauman)\
**Post date:** [April 16, 2024, 8:51pm UTC](https://discourse.julialang.org/t/where-is-juliac-developed/113004/3 "2024-04-16T20:51:01Z")

</div>

I think the better reference is [separate `julia-compile` from `julia` · Issue #15864 · JuliaLang/julia · GitHub](https://github.com/JuliaLang/julia/issues/15864). But the thing is… `juliac` isn’t really “one” feature. It’s a snowballing of core compiler features and behaviors (and performance). It’s stripping the IR and metadata. It’s improving the static compile-ability of Base and the stdlibs. It’s figuring out what’s needed for that and improving tooling for figuring out what’s not static.

---

<div class="post-metadata">

**Author:** ![sylvaticus](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sylvaticus/32/203883_2.png) [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Post date:** [April 16, 2024, 9:17pm UTC](https://discourse.julialang.org/t/where-is-juliac-developed/113004/4 "2024-04-16T21:17:56Z")

</div>

I consider interesting that a word named a couple of times deep down into PR discussions is generating so much interest and questions in this forum… 🙂

---

<div class="post-metadata">

**Author:** ![jar1](https://avatars.discourse-cdn.com/v4/letter/j/c0e974/32.png) [@jar1](https://discourse.julialang.org/u/jar1)\
**Post date:** [April 16, 2024, 9:22pm UTC](https://discourse.julialang.org/t/where-is-juliac-developed/113004/5 "2024-04-16T21:22:58Z")

</div>

I like that it sounds like [ENIAC](https://en.wikipedia.org/wiki/ENIAC).

---

<div class="post-metadata">

**Author:** ![abraemer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/abraemer/32/51403_2.png) [@abraemer](https://discourse.julialang.org/u/abraemer)\
**Post date:** [April 17, 2024, 7:52am UTC](https://discourse.julialang.org/t/where-is-juliac-developed/113004/6 "2024-04-17T07:52:13Z")

</div>

I think the recent wave of `juliac` discussion where triggered by overinterpreting the last sentence of this post

> [@Julia slower than Python for finding pangrams?](https://discourse.julialang.org/t/julia-slower-than-python-for-finding-pangrams/112481/8):
>
> Yeah, but this is ~100% startup/compilation time. It’s kinda like timing: hyperfine --shell=none --warmup 30 "cc pangram.c && ./a.out wjjqevffkkgbcehhiqpvqutmwxawzvjnbvukmlzxyhkgfddzfjhcujnlkjbdfgghjhujkiuytghjioplkjhgfdsaqwertyujioplkjhgfdsaqwertzuioplkjhgfdsazxcvbnmlkjhgfdsaqwertyuioplkjhgfdsazxcvbnmlkjhgfdsaqwertyuioplkjhgfdsaqwertyuioplkjhgfdsazxcvbnmlkjhgfdsaqwertyuioplkjhgfdsaqwertyuioplkjhgfdsazxcvbnmlkjhgfdsaqwertyuioplkjhgfdsaqwertyuioplkjhgfdsazxcvbnmlkjhgfdsaqwertyuioplkjhgfdsaqwert…

Edit: This preview looks very odd if you don’t expand it 😃  
For convenience, the sentence was:

> [@Julia slower than Python for finding pangrams?](https://discourse.julialang.org/t/julia-slower-than-python-for-finding-pangrams/112481/8):
>
> The good news is that we’re getting closer to having a real `juliac` that can output compiled stand-alone executables with significantly lower startup times like `cc` does.

---

<div class="post-metadata">

**Author:** ![The\_Mastermage](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/the_mastermage/32/49444_2.png) [@The\_Mastermage](https://discourse.julialang.org/u/The_Mastermage)\
**Post date:** [April 17, 2024, 2:23pm UTC](https://discourse.julialang.org/t/where-is-juliac-developed/113004/7 "2024-04-17T14:23:03Z")

</div>

thats very intersting, I will admit that i only skim the discourse once or twice a month. The Juliac name just caught my eyes and I thought that it was something specific. Thank you for enlightening me more on this subject.

---

<div class="post-metadata">

**Author:** ![The\_Mastermage](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/the_mastermage/32/49444_2.png) [@The\_Mastermage](https://discourse.julialang.org/u/The_Mastermage)\
**Post date:** [April 17, 2024, 2:23pm UTC](https://discourse.julialang.org/t/where-is-juliac-developed/113004/8 "2024-04-17T14:23:40Z")

</div>

this is what prompted me to be interested as such you are correct.

---

<div class="post-metadata">

**Author:** ![jbytecode](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jbytecode/32/17719_2.png) [@jbytecode](https://discourse.julialang.org/u/jbytecode)\
**Post date:** [September 30, 2024, 12:30pm UTC](https://discourse.julialang.org/t/where-is-juliac-developed/113004/9 "2024-09-30T12:30:16Z")

</div>

just reminding:

> [@PackageCompiler bundled libraries](https://discourse.julialang.org/t/packagecompiler-bundled-libraries/119168/6):
>
> The legendary pull request of producing smaller binary executables has been merged to master today. The classical hello world program is about 1.5 mbs and takes nearly 30 msecs to run, whereas a numerical integration of normal distribution (extensive loops) is 1.7mbs and takes nearly 40 msecs. I prepared a thread about this on fosstodon, this thread is about my first tries. The generated output is currently depended on two Julia dynamic libraries. I think the next step will be producing sta…

---

<div class="post-metadata">

**Author:** ![jbytecode](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jbytecode/32/17719_2.png) [@jbytecode](https://discourse.julialang.org/u/jbytecode)\
**Post date:** [October 2, 2024, 5:59pm UTC](https://discourse.julialang.org/t/where-is-juliac-developed/113004/10 "2024-10-02T17:59:06Z")

</div>

I prepared a brief documentation for those who want to become more familiar with the `juliac` stuff.

[A brief step-by-step introduction to juliac](https://jbytecode.github.io/juliac/)

---

<div class="post-metadata">

**Author:** ![Benny](https://avatars.discourse-cdn.com/v4/letter/b/49beb7/32.png) [@Benny](https://discourse.julialang.org/u/Benny)\
**Post date:** [October 2, 2024, 11:07pm UTC](https://discourse.julialang.org/t/where-is-juliac-developed/113004/11 "2024-10-02T23:07:18Z")

</div>

Interesting, I had assumed that the hello world executable mentioned in the Github issue was relatively large because it was standalone, but you showed it uses a dozen or so shared libraries. “Hello world” executables do tend to be [larger](https://gist.github.com/whiteinge/662e8cd1d361003b34531d9ee3c94197) when standalone, but the size varies a lot whether or not shared libraries are used. Hopefully the upcoming documentation explains what users can expect to be in the executable.

---

<div class="post-metadata">

**Author:** ![StevenSiew](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevensiew/32/218393_2.png) [@StevenSiew](https://discourse.julialang.org/u/StevenSiew)\
**Post date:** [October 2, 2024, 11:57pm UTC](https://discourse.julialang.org/t/where-is-juliac-developed/113004/12 "2024-10-02T23:57:05Z")

</div>

" I prepared a brief documentation for those who want to become more familiar with the `juliac` stuff.

[A brief step-by-step introduction to juliac](https://jbytecode.github.io/juliac/)"

Is this thing production ready? Can I build a text-only tic-tac-toe game using it?

---

<div class="post-metadata">

**Author:** ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Post date:** [October 3, 2024, 1:53am UTC](https://discourse.julialang.org/t/where-is-juliac-developed/113004/13 "2024-10-03T01:53:36Z")

</div>

> [@StevenSiew](#):
>
> Is this thing production ready?

Definitely not. It will come with Julia 1.12 which might be released in a year or so (wild guess).

---

<div class="post-metadata">

**Author:** ![Oscar\_Smith](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oscar_smith/32/25343_2.png) [@Oscar\_Smith](https://discourse.julialang.org/u/Oscar_Smith)\
**Post date:** [October 3, 2024, 2:20am UTC](https://discourse.julialang.org/t/where-is-juliac-developed/113004/14 "2024-10-03T02:20:47Z")

</div>

It’s not production ready, but you totally could build a text-only tic-tac-toe game using it. The only tricky part likely would be that you need to use `Core.stdout` to write and I’m not actually sure if we have a Juliac compatible way to read from `stdin`. (I know this sounds crazy but for annoying reasons, julia’s stdin and stdout aren’t type stable because they are remappable).

---

<div class="post-metadata">

**Author:** ![stephenll](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stephenll/32/28751_2.png) [@stephenll](https://discourse.julialang.org/u/stephenll)\
**Post date:** [October 3, 2024, 3:26am UTC](https://discourse.julialang.org/t/where-is-juliac-developed/113004/15 "2024-10-03T03:26:37Z")

</div>

The combination of the Juliaup installer and jbytecode’s write up made this fairly straightforward to test. After getting the hello world example working, I jumped in feet first and decided to try a heavy linear algebra example we ultimately would like to have as an exe. The biggest hurdle was fixing some of the dynamic dispatch issues. In my example I needed to call the eigen function. That didn’t work at first, but realizing I should convert the matrix into a `Symmetric` matrix worked. My exe was 1.2MB. Runtime was 0.08 seconds.

Very nice!

---

<div class="post-metadata">

**Author:** ![StevenSiew](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevensiew/32/218393_2.png) [@StevenSiew](https://discourse.julialang.org/u/StevenSiew)\
**Post date:** [October 3, 2024, 3:53am UTC](https://discourse.julialang.org/t/where-is-juliac-developed/113004/16 "2024-10-03T03:53:48Z")

</div>

" The combination of the Juliaup installer and jbytecode’s write up made this fairly straightforward to test. After getting the hello world example working, I jumped in feet first and decided to try a heavy linear algebra example we ultimately would like to have as an exe. The biggest hurdle was fixing some of the dynamic dispatch issues. In my example I needed to call the eigen function. That didn’t work at first, but realizing I should convert the matrix into a `Symmetric` matrix worked. My exe was 1.2MB. Runtime was 0.08 seconds.

Very nice!"

Have you tried copying only the exe file to another machine and test if it would run?

What about copying the file to another machine that NEVER had Julia installed?

---

<div class="post-metadata">

**Author:** ![stephenll](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stephenll/32/28751_2.png) [@stephenll](https://discourse.julialang.org/u/stephenll)\
**Post date:** [October 3, 2024, 4:26am UTC](https://discourse.julialang.org/t/where-is-juliac-developed/113004/17 "2024-10-03T04:26:32Z")

</div>

I don’t have a second computer to test on but I’m sure your second scenario is not supported yet. See the section in jbytecode’s write up about the linked libraries.

---

<div class="post-metadata">

**Author:** ![Janis\_Erdmanis](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/janis_erdmanis/32/10869_2.png) [@Janis\_Erdmanis](https://discourse.julialang.org/u/Janis_Erdmanis)\
**Post date:** [October 3, 2024, 9:40am UTC](https://discourse.julialang.org/t/where-is-juliac-developed/113004/18 "2024-10-03T09:40:45Z")

</div>

Very exciting, indeed! Is the error you had because the `eigen` function dispatches on different specialised methods at runtime depending on the matrix structure? How easy was it to discover the solution?

---

<div class="post-metadata">

**Author:** ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)\
**Post date:** [October 3, 2024, 11:33am UTC](https://discourse.julialang.org/t/where-is-juliac-developed/113004/19 "2024-10-03T11:33:15Z")

</div>

> [@StevenSiew](#):
>
> Is this thing production ready? Can I build a text-only tic-tac-toe game using it?

Probably you can. I built a [code formatter compatible with it](https://discourse.julialang.org/t/runic-jl-a-code-formatter-with-rules-set-in-stone/117898/39).

> [@Oscar\_Smith](#):
>
> The only tricky part likely would be that you need to use `Core.stdout` to write and I’m not actually sure if we have a Juliac compatible way to read from `stdin`.

You can use [Runic.jl/src/main.jl at 78ee7fbe2691c7e7ea05c92d286dc643f83e3f4b · fredrikekre/Runic.jl · GitHub](https://github.com/fredrikekre/Runic.jl/blob/78ee7fbe2691c7e7ea05c92d286dc643f83e3f4b/src/main.jl#L15) + [Runic.jl/src/juliac.jl at 78ee7fbe2691c7e7ea05c92d286dc643f83e3f4b · fredrikekre/Runic.jl · GitHub](https://github.com/fredrikekre/Runic.jl/blob/78ee7fbe2691c7e7ea05c92d286dc643f83e3f4b/src/juliac.jl#L3-L6) + [Runic.jl/src/juliac.jl at 78ee7fbe2691c7e7ea05c92d286dc643f83e3f4b · fredrikekre/Runic.jl · GitHub](https://github.com/fredrikekre/Runic.jl/blob/78ee7fbe2691c7e7ea05c92d286dc643f83e3f4b/src/juliac.jl#L18-L32).

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://discourse.julialang.org/u/jules)\
**Post date:** [October 3, 2024, 2:09pm UTC](https://discourse.julialang.org/t/where-is-juliac-developed/113004/20 "2024-10-03T14:09:22Z")

</div>

I’ve seen in your juliac PR that you needed to change some occurrences of `all` or `map` to more verbose, explicit code in order to “help inference”. Do you know why juliac struggles with those higher order functions even if they’re type-stable?

[Next page](https://discourse.julialang.org/t/where-is-juliac-developed/113004.md?page=2)
