目录

luna_thread

MoonBit parallel FFI specification workspace.

Repository Layout

  • luna_thread/: MoonBit library module root
  • luna_thread/moon.mod.json: MoonBit module metadata
  • luna_thread/luna_thread.mbt: root MoonBit facade package
  • luna_thread/plan/, luna_thread/shared/, luna_thread/backend/: package split for shared types and backend FFI
  • native/: C runtime and wrapper scaffold
  • js/: N-API addon scaffold
  • docs/moonbit-parallel-spec-en.typ: authoritative English specification
  • docs/moonbit-parallel-spec-zh.typ: Chinese mirror translation
  • docs/template/: Typst paper templates
  • docs/spec-review-report-zh.md: Chinese review notes

Development Environment

The project stack follows the realization paths defined in the spec:

  • MoonBit facade -> MoonBit C FFI -> C wrapper -> C runtime
  • MoonBit facade -> MoonBit JS FFI -> JS wrapper -> N-API addon -> C runtime

So the practical development environment needs:

  • MoonBit toolchain: moon, moonc
  • Native toolchain: clang, cmake, make
  • JavaScript addon toolchain: node, npm, python3
  • Native parallel runtime support: OpenMP headers/runtime
  • Optional document toolchain: typst

On macOS with Apple clang, OpenMP usually requires libomp:

brew install libomp

Quick Start

Run the environment check:

./scripts/check-env.sh

Include document compilation only when needed:

CHECK_DOCS=1 ./scripts/check-env.sh

Check the MoonBit module:

make moon-check

Configure the native runtime scaffold:

make native-configure

Install and build the JS addon scaffold:

make js-install
make js-build

Build the documentation when needed:

make docs

Commit Strategy

The specification should be committed in part-sized history slices:

  1. English Part I, Part II, Part III
  2. Chinese Part I, Part II, Part III as translation commits

Application or proposal drafts are ignored by .gitignore.

关于
846.0 KB
邀请码
    Gitlink(确实开源)
  • 加入我们
  • 官网邮箱:gitlink@ccf.org.cn
  • QQ群
  • QQ群
  • 公众号
  • 公众号

版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9 京公网安备 11010802047560号