Pure MoonBit Hypermedia Driven Application (HDA) framework
可能な限り純粋なMoonBitコードで実装されています。外部の巨大なライブラリへの依存を避け、コンパイル時の型チェックを最大限に活用します。
クライアント側の依存関係を最小限に抑えることを目指しています。現在はMoonBit実装の htmx.mbt をローカル配布し、CDN依存を排除しています。詳細は spec/CLIENT_DEPENDENCY.md を参照してください。
HTML DSLを通じて型安全なハイパーメディアアプリケーションを構築できます。HTMXのような属性ベースの相互作用を、MoonBitの型システムの安全性と組み合わせて実現します。
- 型安全なHTML DSL - 文字列結合ではなく、型付きビルダーでHTMLを構築
- HDA属性 -
hx_get,hx_post,hx_swap_safeなどの型安全な属性 - HTTPサーバー - Pure MoonBit +
moonbitlang/asyncによる実装
let inc_link = @hda.LinkRel::new(
@hda.Rel::namespaced("counter", "inc"),
@router.Route::post("/counter/inc"),
)
.target("#counter")
.swap(@html.Swap::InnerHTML)
@html.button()
.attrs(inc_link.to_attrs())
.text("+")- Type-safe HTML DSL
- Type-safe HDA attributes
- HTTP server (Pure MoonBit + moonbitlang/async)
- MoonBit htmx runtime (js target, local asset)
- DOM非依存クライアントコア (far future)
# Client runtime JSを生成
make client-runtime
# Counter exampleを実行
./examples/counter/cmd/main/mainブラウザで http://127.0.0.1:8080 にアクセスしてください。
# Showcase demoを実行
moon run examples/showcase/cmd/mainブラウザで http://127.0.0.1:8082 にアクセスしてください。
- spec/AGENTS.md - 開発方針
- spec/CLIENT_DEPENDENCY.md - クライアント依存ポリシー
- spec/DEEPRESEARCH.md - HDAに関する研究ドキュメント