diff --git a/hosts/ocaml/bin/sx_server.ml b/hosts/ocaml/bin/sx_server.ml index 40de7b49..5ef5298b 100644 --- a/hosts/ocaml/bin/sx_server.ml +++ b/hosts/ocaml/bin/sx_server.ml @@ -18,6 +18,14 @@ open Sx_types +(* Force-link Sx_vm_extensions so its module-init runs: installs the + extension dispatch fallthrough and registers the `extension-opcode-id` + SX primitive. Without a reference here OCaml dead-code-eliminates the + module from sx_server.exe (it's only otherwise reached from run_tests), + leaving guest-language opcode extensions (Erlang Phase 9, etc.) + invisible to the runtime. The applied call is a harmless lookup. *) +let () = ignore (Sx_vm_extensions.id_of_name "") + (* ====================================================================== *) (* Font measurement via otfm — reads OpenType/TrueType font tables *) (* ====================================================================== *)