unicode

Branch: main

Switch branches or tags

Branch: main
Go to file t

413 files indexed

History
Code

docs/plans/2026-06-02-ucd-scripts-package.md

MoonBit Unicode Generators

Status: completed on 2026-07-15.

Final Design

  • Generator code lives in the separate tools/ MoonBit module, keeping its native async dependency out of the published library.
  • tools/gen is the single native CLI for UCD, IDNA, Bidi, and conformance generation.
  • Parsing and emission are separate packages. Pure generator functions return source strings or lazily produced Bidi parts so they can be tested directly.
  • tools/emitter owns generated-source writing. Other tool packages do not use StringBuilder directly.
  • Unicode downloads are cached in tools/.cache/.
  • Bidi conformance output is streamed by part, then formatted and followed by a targeted moon info run.

Packages

  • moonbit-community/unicode-tools/emitter
  • moonbit-community/unicode-tools/internal/parsing
  • moonbit-community/unicode-tools/ucd
  • moonbit-community/unicode-tools/idna_data
  • moonbit-community/unicode-tools/bidi_data
  • moonbit-community/unicode-tools/normalization_tests
  • moonbit-community/unicode-tools/idna_tests
  • moonbit-community/unicode-tools/bidi_tests
  • moonbit-community/unicode-tools/gen

Commands

moon run --target native tools/gen data
moon run --target native tools/gen tests
moon run --target native tools/gen all

The previous Python generators and publishing collector were removed. Package selection is handled by the root moon.mod exclusions and can be checked with moon publish --dry-run.

1# MoonBit Unicode Generators23Status: completed on 2026-07-15.45## Final Design67- Generator code lives in the separate `tools/` MoonBit module, keeping its8  native async dependency out of the published library.9- `tools/gen` is the single native CLI for UCD, IDNA, Bidi, and conformance10  generation.11- Parsing and emission are separate packages. Pure generator functions return12  source strings or lazily produced Bidi parts so they can be tested directly.13- `tools/emitter` owns generated-source writing. Other tool packages do not use14  `StringBuilder` directly.15- Unicode downloads are cached in `tools/.cache/`.16- Bidi conformance output is streamed by part, then formatted and followed by a17  targeted `moon info` run.1819## Packages2021- `moonbit-community/unicode-tools/emitter`22- `moonbit-community/unicode-tools/internal/parsing`23- `moonbit-community/unicode-tools/ucd`24- `moonbit-community/unicode-tools/idna_data`25- `moonbit-community/unicode-tools/bidi_data`26- `moonbit-community/unicode-tools/normalization_tests`27- `moonbit-community/unicode-tools/idna_tests`28- `moonbit-community/unicode-tools/bidi_tests`29- `moonbit-community/unicode-tools/gen`3031## Commands3233```bash34moon run --target native tools/gen data35moon run --target native tools/gen tests36moon run --target native tools/gen all37```3839The previous Python generators and publishing collector were removed. Package40selection is handled by the root `moon.mod` exclusions and can be checked with41`moon publish --dry-run`.42