The official blog of the MoonBit programming language team, covering its compiler, WebAssembly support, back ends and AI toolchain.
Commenters describe MoonBit as a strong 'Rust with GC', praise its design, and bring it up in discussions of LLM-friendly languages.
To start with a bit of project history, we love Wasmtime and that’s our core runtime of choice! Before wasmCloud 1.0, e.g. from 2019-2023, we only used Wasm modules with our own custom ABI. Literally everyone was doing this at the time, to run Wasm you either needed to adopt a platform with a custom ABI or invent it yourself and re-solve all the same problems. The component model and its canonical ABI was a huge opportunity for us to stop maintaining our own and integrate into the ecosystem; now you see examples in projects like Moonbit which just work with wasmCloud out of the box, huge win for us https://www.moonbitlang.com/blog/component-model.
On the WASI side itself, I understand that moving WASI from p1 to p2 was a big but necessary leap. Everyone wanted sockets and HTTP and there was no easy way to rev the monolithic ABI of preview1 to add what was needed in small increments. That’s why you see adapters to move from p1 to p2, which wrap a Wasm module with component metadata, but a component actually just straight up contains the module (you can see it if you look at the textual representation.) We’ll have the same thing from p2 to p3. Not to mention, some systems that don’t support the component model like in Node.js actually “unbundle” the inner module from the component and that works just fine. So from what I understand, module support will never be dropped.
I was looking for a programming language that's being written with LLMs in mind, and used ChatGPT to give me some pointers so I can start some research https://chatgpt.com/share/6841d3b7-13a8-800f-9bcc-0f7859114c85
In my mind (I am a non-academic that never really designed a new programming language), I can imagine strong typing, terseness, and no optional syntax (you can do this multiple ways) would be really cool for LLMs.
I did come across a few languages / people trying to design programming languages to be used with LLMs / AI Agents, and I think the most promising thing I found is https://www.moonbitlang.com/blog/moonbit-ai - which takes the whole idea of working with LLMs to another level, with actual features designed to work with agents (not only syntax).
In most conversations, TypeScript generally seems to be considered a fairly "modern" language. TypeScript offers a variety of rather advanced type system features, and AssemblyScript is based on it, so by extension, AssemblyScript should be fairly "modern" too.
Based on the limited docs that are available[0], Moonbit appears to be using C++-style "generics" that are just simple template substitutions (no constraints), which is far less "modern" than what TypeScript offers.
Honestly, I don't think imprecise words like "modern" are particularly useful, helpful, or good for discussions like this. "Pattern matching" has been a feature of certain programming languages for decades, so is that truly a "modern" feature?
[0]: https://moonbitlang.com/docs/syntax/#generics
> I suspect that Rust will start taking over as a dominant LLM output language.
I doubt it. I think most people will become more entrenched in their favored ecosystem.
> I also suspect that in short order we'll have entirely new languages that are engineered to be ideal languages for LLMs to generate.
This is already happening. A couple months ago I came across this language that is engineered for AI and human consumption https://www.moonbitlang.com/
> is moonbit charging?
I assume GP refers to the license of MoonBit, SSPL + exceptions, which is not generally considered fully open source.
https://www.moonbitlang.com/blog/compiler-opensource#why-a-relaxed-sspl
Usually this type of license is used to keep more profit options open, but it will slow down adoption.
As to the training set's depth of APL, yes, it's an issue. However, it's worth seeing how well MoonBit[1, 2] works with LLMs, faced with exactly the same problem -- integrating the LLM directly into the parser pipeline.
1: https://www.youtube.com/watch?v=SnY0F9w1xdM 2: https://www.moonbitlang.com/blog/moonbit-ai