MoUI Studio: visual + DSL IDE for building MoUI applications
git clone https://github.com/wzzc-dev/moui_studio.git
cd moui_studio
moon build web_wasm --target wasm-gc
# ES module 不能用 file:// 打开,需要起一个静态服务:
python3 -m http.server 8766 --directory web_wasm
# 浏览器打开 http://127.0.0.1:8766 即见 IDE┌─ 无边框顶带(仅 native 沉浸式)────────────────────────────────┐
│ [系统信号灯] 按住此条拖动窗口 │
├─ 顶栏 ─────────────────────────────────────────────────────────┤
│ 运行 · 单步 · 编译 MoonBit 撤销/重做 · 语言 · 搜索 · 设置 │
├────┬──────────┬────────────────────────────┬──────────────────┤
│图标│ 左栏 │ 中心工作区 │ 右栏 │
│栏 │ 程序结构 │ 实时应用 │ 设计态 │ 属性/状态/数据/ │
│ │ 本地数据 │ ──────────────────────── │ 动作/依赖 │
│ │ ──────── │ 积木(分类 · 选中描边) │ ──────────────── │
│ │ 最近修改 │ ──────────────────────── │ 编辑积木(选中时)│
│ │ │ 代码(行号 ┼ IR 映射竖条) │ 快速操作 │
│ │ │ │ 运行时监视 │
├────┴──────────┴────────────────────────────┴──────────────────┤
│ 运行审计 │ Console warn 0 · err 0 │
└───────────────────────────────────────────────────────────────┘| 样例 | 教什么 | 教案 |
|---|---|---|
| 问候小程序 | 三视图与运行闭环(最小起点) | samples/hello/README.md |
| 班级点名册 | 随机数、列表框取行 | samples/roll_call/README.md |
| 口算训练营 | 分支、变量、算术 | samples/drill/README.md |
| 班级小卖部 | 跨事件状态、外发闸门 | samples/store/README.md |
{ "provider": { "endpoint": "...", "model": "...", "api_key": "..." } } domain/ir/ 程序 IR + 不变量 + 预算(零依赖)
domain/studio_lang/ 双语 DSL:关键字表/词法/解析/打印/指令机解释器
domain/codec/ .studio.json 编解码 + 版本门
domain/proposals/ AI 提案契约 + 校验链 + diff + 内置模板样例
domain/blocks/ 语句 → 积木规格表
kernel/ 插件内核:服务容器 / 事件总线 / 贡献点
kernel/plugin_contract/ WASM 插件契约(清单 / 视图协议 / 宿主 API 面)
chrome/ 共享视觉原子(主题 + 尺寸常量 + ChipTone)
plugins/blocks/ 积木几何 + 绘制计划 + 洞/值命中(零 Model/Msg)
plugins/project/ 工程域:行模型 + ProjectState + ProjectMsg
plugins/run/ 预览数据层 + 运行态结构 + 预览视图贡献
plugins/ai/ AI 会话切片 + 几何/视图贡献
plugins/markdown/ plugins/terminal/
services/export/ 独立应用导出(内核快照 + bundle 生成)
services/model_provider/ OpenAI 兼容协议(纯)
services/provider_native/ native async worker + .config.json 读取
services/plugin_runtime/ WASM 插件运行时(native,wasmoon 宿主 + 配额)
services/plugin_runtime_web/ WASM 插件运行时(web,浏览器原生 wasm)
app/ TEA shell + 组合根 + 壳级组装视图 + 中英 catalog
web_wasm/ macos_skia/ 薄组合根
samples/plugin_fixture/ 最小 WASM 插件(参考实现 + E2E 用)
tools/sync_kernel/ tools/emit_bundle/moon check --target native # 0 错误 0 警告
moon fmt --check
# domain 是多个包(不是单包路径),一次传完
moon test domain/ir domain/studio_lang domain/codec domain/blocks \
domain/proposals --target native
moon test kernel chrome plugins/ai plugins/markdown plugins/project \
plugins/run plugins/terminal plugins/blocks --target native
moon test services/compiled_runtime services/diff services/compile_native \
services/export --target native
moon test app --target native # 474 个测试
moon test app --target wasm-gc
# WASM 插件系统:契约 + 运行时 + E2E(真实加载一个 .wasm 插件)
sh scripts/build_plugin.sh # 先造 fixture 的 wasm 产物
moon test kernel/plugin_contract services/plugin_runtime --target native
# 导出内核漂移门:改了 domain 忘了同步 → 红
moon run tools/sync_kernel --target native -- --check
moon build web_wasm --target wasm-gctools/sync_kernel 的路径表按母仓库根书写(带 moui_studio/ 前缀), 但工具会按当前根自动解析:在本仓库根跑 moon run tools/sync_kernel, 在母仓库根跑 moon run moui_studio/tools/sync_kernel,两者等价。
git clone https://github.com/wzzc-dev/moui_studio.git
cd moui_studio
moon build web_wasm --target wasm-gcmoon run macos_skia --target native{ "provider": { "endpoint": "...", "model": "...", "api_key": "..." } }Install
Download zipMoUI Studio: visual + DSL IDE for building MoUI applications