Embed files into MoonBit source as String or Bytes bindings.
Dependencies
Usage: moon-embed <input> -o <output> [options]
Options:
-o, --output <path> Output .mbt file (required)
--name <ident> Binding name (default: derived from input)
--binary Embed as Bytes (default: text)
--pub Use pub binding
--const Use const binding (name default UpperCamel)
--help Show this helpmoon run . -- assets/logo.txt -o assets/logo_embed.mbtmoon run . -- assets/logo.png -o assets/logo_png.mbt --binary --pubmoon run . -- assets/config.json -o assets/config_embed.mbt --name ConfigJson --const///|
let my_file : String =
#|Hello
#|World///|
let data : Bytes =
[
0x00, 0x01, 0xff
]moon check
moon testEmbed files into MoonBit source as String or Bytes bindings.
Dependencies