Language Update
- MoonBit Beta Preview
MoonBit Beta Preview achieved major features of modern generic system, precise error handling, and efficient iterators, and AI-powered toolchain, offering real use cases in cloud and edge computing. Read our latest blog for details.
- Error Type Printing Improvement
Error type printing now allows error types that implement Show
to display more detailed information when used as Error
. For example:
type! MyErr String derive(Show)
fn f() -> Unit! { raise MyErr("err") }
fn main {
println(f?()) // Output: Err(MyErr("err"))
}
- Test Block Enhancement
Added support for parameters in test blocks. The parameter type must be @test.T
.
test "hello" (it: @test.T) {
inspect!(it.name, content="hello")
}
Build System Update
- Fixed an issue where
moon info
would write the wrong mbti file path when thesource
field was set inmoon.mod.json
.
Core Update
-
Added
last
function toarray
andfixedarray
. -
Frequently used functions in the
test
package have been moved tobuiltin
, and the old functions have been deprecated. -
Added
last
,head
, andintersperse
methods toiter
.
IDE Update
- MoonBit IDE now supports the VS Code Test Explorer.
- Online IDE Multi-Package Editing
The online IDE now supports multi-package editing. You can develop MoonBit modules with package dependencies just like in a local environment. In this example, the main
package depends on the lib
package.
Other Update
-
MoonBit docs domain is now: https://docs.moonbitlang.com.
-
As MoonBit’s language features stabilize and reaches the beta preview, update announcements will be adjusted to once every two weeks.