News for hackers. Stuff that matters.
Re:LLVM Back End for MoonBit by hongbo_zhang on Friday March 28, 2025 @09:00AM (#43504852)
MoonBit supports the LLVM backend. With this, it achieved 8× Java’s performance in FFT and introduced out-of-the-box debugging with DWARF symbol injection, enabling precise source mapping directly to compiled outputs.

MoonBit will soon compile directly to native binary files without relying on a C compiler. This eliminates various compatibility issues associated with C compilers.

Re:LLVM Back End for MoonBit by code_mary22 on Friday March 28, 2025 @09:05AM (#43504937)
Does this mean MoonBit will get JIT support soon?
Re:LLVM Back End for MoonBit by hongbo_zhang on Friday March 28, 2025 @09:26AM (#43505186)
we have a interpreter mode which takes advantage of tcc for fast interpretion
Re:LLVM Back End for MoonBit by techblaze3 on Friday March 28, 2025 @09:13AM (#43505025)
I assume there was a C backend before — some numbers comparing that and the wasm backend with LLVM would’ve been helpful."
Re:LLVM Back End for MoonBit by hongbo_zhang on Friday March 28, 2025 @09:27AM (#43505195)
The LLVM mode currently is not good as C backend, but we are working on it to bring it comparable to C backend
Re:LLVM Back End for MoonBit by lingying on Friday March 28, 2025 @09:14AM (#43505037)
yes
Re:LLVM Back End for MoonBit by kukiTsui on Friday March 28, 2025 @09:15AM (#43505052)
It's great to see MoonBit adopt llvm, but is it relying on a c compiler or independent?
Re:LLVM Back End for MoonBit by hongbo_zhang on Friday March 28, 2025 @09:27AM (#43505202)
we used to output C for native backend support
Re:LLVM Back End for MoonBit by TitanShift on Friday March 28, 2025 @09:18AM (#43505090)
"Once support for distributing precompiled runtime libraries is implemented, MoonBit programs will be completely independent of the C compiler, generating native executables using only a linker."
Re:LLVM Back End for MoonBit by k_8HjR2mN5 on Friday March 28, 2025 @09:26AM (#43505184)
Fun to see more languages taking advantage of LLVM. Opens up a lot of potential.
Re:LLVM Back End for MoonBit by 16603366004 on Friday March 28, 2025 @09:03AM (#43504916)
Really cool to see MoonBit adopting LLVM! This could boost performance a lot.
Re:LLVM Back End for MoonBit by tech_peter01 on Friday March 28, 2025 @09:08AM (#43504973)
Wonder how the LLVM backend affects compile times. Anyone tried it yet?
Re:LLVM Back End for MoonBit by hongbo_zhang on Friday March 28, 2025 @09:28AM (#43505208)
it is not the optimial, for fast native mode, we rely on tcc for fast interpretion
Re:LLVM Back End for MoonBit by yuzongen1234 on Friday March 28, 2025 @09:10AM (#43504989)
Does this make MoonBit more portable across platforms?
Re:LLVM Back End for MoonBit by chenhoey1211 on Friday March 28, 2025 @09:02AM (#43504899)
How does MoonBit’s LLVM backend compare to Zig or Rust?
Re:LLVM Back End for MoonBit by lingying on Friday March 28, 2025 @09:25AM (#43505173)
MoonBit has significant advantages
Re:LLVM Back End for MoonBit by ftbsqcfjm on Friday March 28, 2025 @09:01AM (#43504876)
"The LLVM backend seems like a natural fit for MoonBit, but I wonder how it handles complex optimizations like inlining and dead code elimination. Has anyone benchmarked it against other LLVM-based languages?"