Intentionally simple Raylib OCaml Template. Not using dune or any other build systems. Just calling ocamlc
and clang
directly to demonstrate how all of this works under the hood for educational purposes.
For more info on OCaml-C Interop, read this entire 73 pages documents (it's simple, you can do that in a couple of hours): https://v2.ocaml.org/manual/intfc.html
Hot Reloading mechanism is based upon Dynlink module from Stdlib. You can only Hot Reload game_plug.ml module. To hot reload the module press R during the execution.
Tested only on Linux
$ ./build.sh
$ ./game