March Docs

Forge.BuildIslands

Forge.BuildIslands — forge bastion.build.islands

Compiles all @island modules to WASM, content-hashes the output files, and writes priv/static/islands/manifest.json.

Usage: forge bastion.build.islands forge bastion.build.islands --clean # delete stale .wasm before building

Scans lib/ recursively for .march files containing the @island annotation, compiles each to wasm32-unknown-unknown, renames the output to include an

  1. counter-a1b2c3d4.wasm), and writes a

fresh manifest mapping module names to hashed filenames.

Manifest format (priv/static/islands/manifest.json): { "Counter": { "file": "counter-a1b2c3d4.wasm", "hash": "a1b2c3d4", "source": "lib/islands/counter.march" }, "SearchBar": { "file": "search_bar-e5f6g7h8.wasm", "hash": "e5f6g7h8", "source": "lib/islands/search_bar.march" } }

Functions

fnextract_mod_nameextract_mod_name(line)#
fnmainmain(_cap_fileread : Cap(IO.FileRead), _cap_filewrite : Cap(IO.FileWrite), _cap_process : Cap(IO.Process), _cap_console : Cap(IO.Console))#
fnpascal_to_snakepascal_to_snake(s)#
fnrunrun(args)#