From d3650d2a50bfa852b8ec8ef41cdd679fb0749d66 Mon Sep 17 00:00:00 2001 From: epatrizio Date: Thu, 7 Mar 2024 14:49:22 +0100 Subject: [PATCH] Bug fix Conway's Game of life example --- example/define_host_function/life_game/life_console.ml | 4 ++-- example/define_host_function/life_game/life_graphics.ml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/example/define_host_function/life_game/life_console.ml b/example/define_host_function/life_game/life_console.ml index d2ca2a488..c12429b43 100644 --- a/example/define_host_function/life_game/life_console.ml +++ b/example/define_host_function/life_game/life_console.ml @@ -83,13 +83,13 @@ let pure_wasm_module_2 = | Ok modul -> modul (* our second pure wasm module, linked with `life_ext` and `life` interpreted before *) -let module_to_run = +let module_to_run, link_state = match Compile.until_link link_state ~unsafe:false ~optimize:true ~name:None pure_wasm_module_2 with | Error e -> Result.failwith e - | Ok (m, _state) -> m + | Ok (m, state) -> (m, state) (* let's run it ! it will animate the game of life in console *) let () = diff --git a/example/define_host_function/life_game/life_graphics.ml b/example/define_host_function/life_game/life_graphics.ml index d77c31f38..e8c6e2fa5 100644 --- a/example/define_host_function/life_game/life_graphics.ml +++ b/example/define_host_function/life_game/life_graphics.ml @@ -95,13 +95,13 @@ let pure_wasm_module_2 = | Ok modul -> modul (* our second pure wasm module, linked with `life_ext` and `life` interpreted before *) -let module_to_run = +let module_to_run, link_state = match Compile.until_link link_state ~unsafe:false ~optimize:true ~name:None pure_wasm_module_2 with | Error e -> Result.failwith e - | Ok (m, _state) -> m + | Ok (m, state) -> (m, state) (* let's run it ! it will animate the game of life in a graphics window *) let () =