summaryrefslogtreecommitdiffhomepage
path: root/.agents/rules/mruby-rebuild.md
blob: f00e8136a3626b84f70e207d6055e31ef92b2908 (plain)
1
2
3
4
5
6
7
8
9
10
11
# RULE: rebuilding mruby + the bindings

- Drive rake at the **specific lib path**, never plain `rake` (plain rake also
  builds mruby's CLI tools `mruby`/`mirb`/`mrdb`, which fail to link without
  raylib/rmlui/flecs):
  `rake "$JAMSTACK_ROOT/vendor/mruby/build/host/lib/libmruby.a"` — or just run
  `./rebuild.sh`.
- After **adding/removing a gem** in `build_config.rb`, or any change that flips
  the C/C++ ABI, `rm -rf vendor/mruby/build` first — otherwise stale objects
  cause "multiple definition" link errors. The rmlui gem is C++ and holds mruby
  in `MRB_USE_CXX_EXCEPTION` mode for the whole VM.