# Would it be possible to write LLVM in Julia?

**URL:** https://discourse.julialang.org/t/would-it-be-possible-to-write-llvm-in-julia/103925
**Category:** General Usage
**Created:** [September 16, 2023, 11:47am UTC](https://discourse.julialang.org/t/would-it-be-possible-to-write-llvm-in-julia/103925 "2023-09-16T11:47:47Z")
**Posts on this page:** 1
**Showing post:** 7

<div class="post-metadata">

### Author: ![Palli](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/palli/32/3380_2.png) [@Palli](https://discourse.julialang.org/u/Palli)
#### Post date: [September 3, 2025, 3:18pm UTC](https://discourse.julialang.org/t/would-it-be-possible-to-write-llvm-in-julia/103925/7 "2025-09-03T15:18:05Z")

</div>

> [@R.T.A.M](#):
>
> would be possible to write LLVM in Julia?

yes, but I believe better to _bypass_ LLVM (for non-default Julia [mode]) as Zig did:

> Debug compilation is 5 times faster with Zig’s x86 Backend selected by default

> **[0.15.1 Release Notes ⚡ The Zig Programming Language](https://ziglang.org/download/0.15.1/release-notes.html#x86-Backend)**

> Using the self-hosted x86 backend also means you are not subject to the effects of upstream LLVM bugs, of which we are currently tracking over 60. In fact, the self-hosted x86 backend already passes a larger subset of our “behavior test suite” than the LLVM backend does (1984/2008 vs 1977/2008). In other words, this backend provides a more complete and correct implementation of the Zig language.

Zig used to default to LLVM, and still does in some cases like on Windows.

Note LLVM is Julia’s default (huge) compiler backend. You can see lowered code, then LLVM bitcode with `@code_llvm`, and in the end native code with `@code_native`. In many cases you wouldn’t need to see or use the LLVM bitcode, if code is already precompiled you would get most of its befefits, but you still need to bundle the huge LLVM with Julia, though not if I recall when using juliac, but having a smaller compiler backend could then help. Some code used LLVM intrinsics, directly or indirectly, and you would still miss out on that.

> [@Is it time to make LLVM optional and how?](https://discourse.julialang.org/t/is-it-time-to-make-llvm-optional-and-how/112677/4):
>
> I personally doubt it will be worth the effort to support a second compiler in the next few years; it’s more likely that one could replace it with an interpreter under more circumstances (this has already been discussed as a way to reduce startup latency). I generally don’t find these speculative discussions to be too productive. Proposing huge undertakings (e.g. replacing the compiler) never amounts to much, because you aren’t proposing to do the work yourself, nor to fund it. No one is goi…

---

_[View the full topic](https://discourse.julialang.org/t/would-it-be-possible-to-write-llvm-in-julia/103925)._
