Skip to content

Commit

Permalink
Bug fix Conway's Game of life example
Browse files Browse the repository at this point in the history
  • Loading branch information
epatrizio authored and zapashcanon committed Mar 8, 2024
1 parent 8a9f5a0 commit d3650d2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions example/define_host_function/life_game/life_console.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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 () =
Expand Down
4 changes: 2 additions & 2 deletions example/define_host_function/life_game/life_graphics.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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 () =
Expand Down

0 comments on commit d3650d2

Please sign in to comment.