## prepare
created result directory /doc

## toolchain
$ moon version --all
moon 0.1.20260814 (a2de5b2 2026-08-14) ~/.moon/bin/moon
moonc v0.10.8+8606a5800 (2026-08-14) ~/.moon/bin/moonc
moonrun 0.1.20260814 (a2de5b2 2026-08-14) ~/.moon/bin/moonrun

Feature flags enabled: rr_moon_mod,rr_moon_pkg
Warning: `MOON_NO_WORKSPACE` is deprecated. Use `MOON_WORK=off` to disable workspace mode.

## download
$ curl --fail --location --silent --show-error --output /tmp/mooncakes-source.zip https://download.mooncakes.io/user/YumeXi/nanocake/0.4.2.zip

## archive
validated 165 archive entries

## extract
$ unzip -q /tmp/mooncakes-source.zip -d /tmp/mooncakes-source-extracted

## copy build source
$ cp -a /tmp/mooncakes-source-extracted/. /tmp/mooncakes-source-build/

## copy upload source
$ cp -a /tmp/mooncakes-source-extracted/. /source/

## moon.mod
generated moon.mod.json from moon.mod

## source
prepared 165 files with source_dir=None

## input
using project root /tmp/mooncakes-source-build

## update
$ moon update
Warning: `MOON_NO_WORKSPACE` is deprecated. Use `MOON_WORK=off` to disable workspace mode.
Registry index updated successfully
Symbols updated successfully

## target
preferred-target is empty, trying native wasm-gc wasm js

## target
trying target native

## check (native)
$ moon -C /tmp/mooncakes-source-build check --target native
Warning: `MOON_NO_WORKSPACE` is deprecated. Use `MOON_WORK=off` to disable workspace mode.
Downloading YumeXi/error@0.2.2
Downloading moonbit-community/prettyprinter@0.4.10
Downloading moonbitlang/async@0.20.3
Downloading moonbitlang/moon_config@0.3.12
Downloading moonbitlang/lexer@0.3.13
Downloading moonbitlang/parser@0.3.13
Downloading moonbitlang/x@0.4.49
Warning: Both moon.mod.json and moon.mod exist at module root '/tmp/mooncakes-source-build', using the new format moon.mod. Please remove the deprecated moon.mod.json.
Error: [4222]
     ╭─[ /tmp/mooncakes-source-build/.mooncakes/moonbitlang/lexer/lexer.mbt:102:13 ]
     │
 102 │     lexscan input with longest {
     │             ──┬──  
     │               ╰──── Invalid lexscan target: expected @lexbuf.Lexbuf, @lexbuf.AsyncLexbuf, or @lexbuf.StringScanner, but got StringView.
─────╯
Error: [4222]
      ╭─[ /tmp/mooncakes-source-build/.mooncakes/moonbitlang/lexer/lexer.mbt:1376:13 ]
      │
 1376 │     lexscan input with longest {
      │             ──┬──  
      │               ╰──── Invalid lexscan target: expected @lexbuf.Lexbuf, @lexbuf.AsyncLexbuf, or @lexbuf.StringScanner, but got StringView.
──────╯
Error: [4222]
      ╭─[ /tmp/mooncakes-source-build/.mooncakes/moonbitlang/lexer/lexer.mbt:1539:13 ]
      │
 1539 │     lexscan input with longest {
      │             ──┬──  
      │               ╰──── Invalid lexscan target: expected @lexbuf.Lexbuf, @lexbuf.AsyncLexbuf, or @lexbuf.StringScanner, but got StringView.
──────╯
Error: [4222]
      ╭─[ /tmp/mooncakes-source-build/.mooncakes/moonbitlang/lexer/lexer.mbt:1606:13 ]
      │
 1606 │     lexscan input with longest {
      │             ──┬──  
      │               ╰──── Invalid lexscan target: expected @lexbuf.Lexbuf, @lexbuf.AsyncLexbuf, or @lexbuf.StringScanner, but got StringView.
──────╯
Error: [4222]
      ╭─[ /tmp/mooncakes-source-build/.mooncakes/moonbitlang/lexer/lexer.mbt:1662:15 ]
      │
 1662 │       lexscan input with longest {
      │               ──┬──  
      │                 ╰──── Invalid lexscan target: expected @lexbuf.Lexbuf, @lexbuf.AsyncLexbuf, or @lexbuf.StringScanner, but got StringView.
──────╯
Error: [4222]
      ╭─[ /tmp/mooncakes-source-build/.mooncakes/moonbitlang/lexer/lexer.mbt:1708:15 ]
      │
 1708 │       lexscan input with longest {
      │               ──┬──  
      │                 ╰──── Invalid lexscan target: expected @lexbuf.Lexbuf, @lexbuf.AsyncLexbuf, or @lexbuf.StringScanner, but got StringView.
──────╯
Error: [4222]
     ╭─[ /tmp/mooncakes-source-build/.mooncakes/moonbitlang/x/path/win32/path.mbt:278:11 ]
     │
 278 │   lexscan path with longest {
     │           ──┬─  
     │             ╰─── Invalid lexscan target: expected @lexbuf.Lexbuf, @lexbuf.AsyncLexbuf, or @lexbuf.StringScanner, but got String.
─────╯
Error: [4222]
     ╭─[ /tmp/mooncakes-source-build/.mooncakes/moonbitlang/x/path/win32/path.mbt:321:11 ]
     │
 321 │   lexscan rhs with longest {
     │           ─┬─  
     │            ╰─── Invalid lexscan target: expected @lexbuf.Lexbuf, @lexbuf.AsyncLexbuf, or @lexbuf.StringScanner, but got StringView.
─────╯
Failed with 0 warnings, 8 errors.
Error: failed to run check for target Native

Caused by:
    failed when checking project

## target
target native failed: moon/test/single.BuildError.BuildError

## target
trying target wasm-gc

## check (wasm-gc)
$ moon -C /tmp/mooncakes-source-build check --target wasm-gc
Warning: `MOON_NO_WORKSPACE` is deprecated. Use `MOON_WORK=off` to disable workspace mode.
Warning: Both moon.mod.json and moon.mod exist at module root '/tmp/mooncakes-source-build', using the new format moon.mod. Please remove the deprecated moon.mod.json.
Error: [4222]
     ╭─[ /tmp/mooncakes-source-build/.mooncakes/moonbitlang/lexer/lexer.mbt:102:13 ]
     │
 102 │     lexscan input with longest {
     │             ──┬──  
     │               ╰──── Invalid lexscan target: expected @lexbuf.Lexbuf, @lexbuf.AsyncLexbuf, or @lexbuf.StringScanner, but got StringView.
─────╯
Error: [4222]
      ╭─[ /tmp/mooncakes-source-build/.mooncakes/moonbitlang/lexer/lexer.mbt:1376:13 ]
      │
 1376 │     lexscan input with longest {
      │             ──┬──  
      │               ╰──── Invalid lexscan target: expected @lexbuf.Lexbuf, @lexbuf.AsyncLexbuf, or @lexbuf.StringScanner, but got StringView.
──────╯
Error: [4222]
      ╭─[ /tmp/mooncakes-source-build/.mooncakes/moonbitlang/lexer/lexer.mbt:1539:13 ]
      │
 1539 │     lexscan input with longest {
      │             ──┬──  
      │               ╰──── Invalid lexscan target: expected @lexbuf.Lexbuf, @lexbuf.AsyncLexbuf, or @lexbuf.StringScanner, but got StringView.
──────╯
Error: [4222]
      ╭─[ /tmp/mooncakes-source-build/.mooncakes/moonbitlang/lexer/lexer.mbt:1606:13 ]
      │
 1606 │     lexscan input with longest {
      │             ──┬──  
      │               ╰──── Invalid lexscan target: expected @lexbuf.Lexbuf, @lexbuf.AsyncLexbuf, or @lexbuf.StringScanner, but got StringView.
──────╯
Error: [4222]
      ╭─[ /tmp/mooncakes-source-build/.mooncakes/moonbitlang/lexer/lexer.mbt:1662:15 ]
      │
 1662 │       lexscan input with longest {
      │               ──┬──  
      │                 ╰──── Invalid lexscan target: expected @lexbuf.Lexbuf, @lexbuf.AsyncLexbuf, or @lexbuf.StringScanner, but got StringView.
──────╯
Error: [4222]
      ╭─[ /tmp/mooncakes-source-build/.mooncakes/moonbitlang/lexer/lexer.mbt:1708:15 ]
      │
 1708 │       lexscan input with longest {
      │               ──┬──  
      │                 ╰──── Invalid lexscan target: expected @lexbuf.Lexbuf, @lexbuf.AsyncLexbuf, or @lexbuf.StringScanner, but got StringView.
──────╯
Error: [4222]
     ╭─[ /tmp/mooncakes-source-build/.mooncakes/moonbitlang/x/path/win32/path.mbt:278:11 ]
     │
 278 │   lexscan path with longest {
     │           ──┬─  
     │             ╰─── Invalid lexscan target: expected @lexbuf.Lexbuf, @lexbuf.AsyncLexbuf, or @lexbuf.StringScanner, but got String.
─────╯
Error: [4222]
     ╭─[ /tmp/mooncakes-source-build/.mooncakes/moonbitlang/x/path/win32/path.mbt:321:11 ]
     │
 321 │   lexscan rhs with longest {
     │           ─┬─  
     │            ╰─── Invalid lexscan target: expected @lexbuf.Lexbuf, @lexbuf.AsyncLexbuf, or @lexbuf.StringScanner, but got StringView.
─────╯
Failed with 0 warnings, 8 errors.
Error: failed to run check for target WasmGC

Caused by:
    failed when checking project

## target
target wasm-gc failed: moon/test/single.BuildError.BuildError

## target
trying target wasm

## check (wasm)
$ moon -C /tmp/mooncakes-source-build check --target wasm
Warning: `MOON_NO_WORKSPACE` is deprecated. Use `MOON_WORK=off` to disable workspace mode.
Warning: Both moon.mod.json and moon.mod exist at module root '/tmp/mooncakes-source-build', using the new format moon.mod. Please remove the deprecated moon.mod.json.
Error: [4222]
     ╭─[ /tmp/mooncakes-source-build/.mooncakes/moonbitlang/lexer/lexer.mbt:102:13 ]
     │
 102 │     lexscan input with longest {
     │             ──┬──  
     │               ╰──── Invalid lexscan target: expected @lexbuf.Lexbuf, @lexbuf.AsyncLexbuf, or @lexbuf.StringScanner, but got StringView.
─────╯
Error: [4222]
      ╭─[ /tmp/mooncakes-source-build/.mooncakes/moonbitlang/lexer/lexer.mbt:1376:13 ]
      │
 1376 │     lexscan input with longest {
      │             ──┬──  
      │               ╰──── Invalid lexscan target: expected @lexbuf.Lexbuf, @lexbuf.AsyncLexbuf, or @lexbuf.StringScanner, but got StringView.
──────╯
Error: [4222]
      ╭─[ /tmp/mooncakes-source-build/.mooncakes/moonbitlang/lexer/lexer.mbt:1539:13 ]
      │
 1539 │     lexscan input with longest {
      │             ──┬──  
      │               ╰──── Invalid lexscan target: expected @lexbuf.Lexbuf, @lexbuf.AsyncLexbuf, or @lexbuf.StringScanner, but got StringView.
──────╯
Error: [4222]
      ╭─[ /tmp/mooncakes-source-build/.mooncakes/moonbitlang/lexer/lexer.mbt:1606:13 ]
      │
 1606 │     lexscan input with longest {
      │             ──┬──  
      │               ╰──── Invalid lexscan target: expected @lexbuf.Lexbuf, @lexbuf.AsyncLexbuf, or @lexbuf.StringScanner, but got StringView.
──────╯
Error: [4222]
      ╭─[ /tmp/mooncakes-source-build/.mooncakes/moonbitlang/lexer/lexer.mbt:1662:15 ]
      │
 1662 │       lexscan input with longest {
      │               ──┬──  
      │                 ╰──── Invalid lexscan target: expected @lexbuf.Lexbuf, @lexbuf.AsyncLexbuf, or @lexbuf.StringScanner, but got StringView.
──────╯
Error: [4222]
      ╭─[ /tmp/mooncakes-source-build/.mooncakes/moonbitlang/lexer/lexer.mbt:1708:15 ]
      │
 1708 │       lexscan input with longest {
      │               ──┬──  
      │                 ╰──── Invalid lexscan target: expected @lexbuf.Lexbuf, @lexbuf.AsyncLexbuf, or @lexbuf.StringScanner, but got StringView.
──────╯
Error: [4222]
     ╭─[ /tmp/mooncakes-source-build/.mooncakes/moonbitlang/x/path/win32/path.mbt:278:11 ]
     │
 278 │   lexscan path with longest {
     │           ──┬─  
     │             ╰─── Invalid lexscan target: expected @lexbuf.Lexbuf, @lexbuf.AsyncLexbuf, or @lexbuf.StringScanner, but got String.
─────╯
Error: [4222]
     ╭─[ /tmp/mooncakes-source-build/.mooncakes/moonbitlang/x/path/win32/path.mbt:321:11 ]
     │
 321 │   lexscan rhs with longest {
     │           ─┬─  
     │            ╰─── Invalid lexscan target: expected @lexbuf.Lexbuf, @lexbuf.AsyncLexbuf, or @lexbuf.StringScanner, but got StringView.
─────╯
Failed with 0 warnings, 8 errors.
Error: failed to run check for target Wasm

Caused by:
    failed when checking project

## target
target wasm failed: moon/test/single.BuildError.BuildError

## target
trying target js

## check (js)
$ moon -C /tmp/mooncakes-source-build check --target js
Warning: `MOON_NO_WORKSPACE` is deprecated. Use `MOON_WORK=off` to disable workspace mode.
Warning: Both moon.mod.json and moon.mod exist at module root '/tmp/mooncakes-source-build', using the new format moon.mod. Please remove the deprecated moon.mod.json.
Error: [4222]
     ╭─[ /tmp/mooncakes-source-build/.mooncakes/moonbitlang/lexer/lexer.mbt:102:13 ]
     │
 102 │     lexscan input with longest {
     │             ──┬──  
     │               ╰──── Invalid lexscan target: expected @lexbuf.Lexbuf, @lexbuf.AsyncLexbuf, or @lexbuf.StringScanner, but got StringView.
─────╯
Error: [4222]
      ╭─[ /tmp/mooncakes-source-build/.mooncakes/moonbitlang/lexer/lexer.mbt:1376:13 ]
      │
 1376 │     lexscan input with longest {
      │             ──┬──  
      │               ╰──── Invalid lexscan target: expected @lexbuf.Lexbuf, @lexbuf.AsyncLexbuf, or @lexbuf.StringScanner, but got StringView.
──────╯
Error: [4222]
      ╭─[ /tmp/mooncakes-source-build/.mooncakes/moonbitlang/lexer/lexer.mbt:1539:13 ]
      │
 1539 │     lexscan input with longest {
      │             ──┬──  
      │               ╰──── Invalid lexscan target: expected @lexbuf.Lexbuf, @lexbuf.AsyncLexbuf, or @lexbuf.StringScanner, but got StringView.
──────╯
Error: [4222]
      ╭─[ /tmp/mooncakes-source-build/.mooncakes/moonbitlang/lexer/lexer.mbt:1606:13 ]
      │
 1606 │     lexscan input with longest {
      │             ──┬──  
      │               ╰──── Invalid lexscan target: expected @lexbuf.Lexbuf, @lexbuf.AsyncLexbuf, or @lexbuf.StringScanner, but got StringView.
──────╯
Error: [4222]
      ╭─[ /tmp/mooncakes-source-build/.mooncakes/moonbitlang/lexer/lexer.mbt:1662:15 ]
      │
 1662 │       lexscan input with longest {
      │               ──┬──  
      │                 ╰──── Invalid lexscan target: expected @lexbuf.Lexbuf, @lexbuf.AsyncLexbuf, or @lexbuf.StringScanner, but got StringView.
──────╯
Error: [4222]
      ╭─[ /tmp/mooncakes-source-build/.mooncakes/moonbitlang/lexer/lexer.mbt:1708:15 ]
      │
 1708 │       lexscan input with longest {
      │               ──┬──  
      │                 ╰──── Invalid lexscan target: expected @lexbuf.Lexbuf, @lexbuf.AsyncLexbuf, or @lexbuf.StringScanner, but got StringView.
──────╯
Error: [4222]
     ╭─[ /tmp/mooncakes-source-build/.mooncakes/moonbitlang/x/path/win32/path.mbt:278:11 ]
     │
 278 │   lexscan path with longest {
     │           ──┬─  
     │             ╰─── Invalid lexscan target: expected @lexbuf.Lexbuf, @lexbuf.AsyncLexbuf, or @lexbuf.StringScanner, but got String.
─────╯
Error: [4222]
     ╭─[ /tmp/mooncakes-source-build/.mooncakes/moonbitlang/x/path/win32/path.mbt:321:11 ]
     │
 321 │   lexscan rhs with longest {
     │           ─┬─  
     │            ╰─── Invalid lexscan target: expected @lexbuf.Lexbuf, @lexbuf.AsyncLexbuf, or @lexbuf.StringScanner, but got StringView.
─────╯
Failed with 0 warnings, 8 errors.
Error: failed to run check for target Js

Caused by:
    failed when checking project

## target
target js failed: moon/test/single.BuildError.BuildError

## error
Step `build` failed for all targets