From 70f86f998b6db102d5b77f756750414efd53aa9e Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Wed, 29 Apr 2020 08:25:42 +0200 Subject: Add `game_of_life` example RIP John Conway --- examples/game_of_life/Cargo.toml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 examples/game_of_life/Cargo.toml (limited to 'examples/game_of_life/Cargo.toml') diff --git a/examples/game_of_life/Cargo.toml b/examples/game_of_life/Cargo.toml new file mode 100644 index 00000000..8855b3e8 --- /dev/null +++ b/examples/game_of_life/Cargo.toml @@ -0,0 +1,12 @@ +[package] +name = "game_of_life" +version = "0.1.0" +authors = ["Héctor Ramón Jiménez "] +edition = "2018" +publish = false + +[dependencies] +iced = { path = "../..", features = ["async-std", "canvas", "debug"] } +iced_native = { path = "../../native" } +async-std = { version = "1.0", features = ["unstable"] } +itertools = "0.9" -- cgit From e2076612cb98d04a8a48add14d0068c2974d5653 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Thu, 30 Apr 2020 05:37:44 +0200 Subject: Implement `time::every` in `iced_futures` --- examples/game_of_life/Cargo.toml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'examples/game_of_life/Cargo.toml') diff --git a/examples/game_of_life/Cargo.toml b/examples/game_of_life/Cargo.toml index 8855b3e8..413493ae 100644 --- a/examples/game_of_life/Cargo.toml +++ b/examples/game_of_life/Cargo.toml @@ -6,7 +6,5 @@ edition = "2018" publish = false [dependencies] -iced = { path = "../..", features = ["async-std", "canvas", "debug"] } -iced_native = { path = "../../native" } -async-std = { version = "1.0", features = ["unstable"] } +iced = { path = "../..", features = ["canvas", "tokio"] } itertools = "0.9" -- cgit From ee97887409849395ecfd63e499c5d5372b121aa3 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Fri, 1 May 2020 00:50:40 +0200 Subject: Introduce `Cell` type in `game_of_life` --- examples/game_of_life/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples/game_of_life/Cargo.toml') diff --git a/examples/game_of_life/Cargo.toml b/examples/game_of_life/Cargo.toml index 413493ae..b1054537 100644 --- a/examples/game_of_life/Cargo.toml +++ b/examples/game_of_life/Cargo.toml @@ -6,5 +6,5 @@ edition = "2018" publish = false [dependencies] -iced = { path = "../..", features = ["canvas", "tokio"] } +iced = { path = "../..", features = ["canvas", "tokio", "debug"] } itertools = "0.9" -- cgit From 4fd8e47737e82817d652d86b306400da663f7a98 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Sat, 2 May 2020 03:31:31 +0200 Subject: Use `rustc_hash` for hashing in `game_of_life` This seems to produce a 2x speedup. --- examples/game_of_life/Cargo.toml | 1 + 1 file changed, 1 insertion(+) (limited to 'examples/game_of_life/Cargo.toml') diff --git a/examples/game_of_life/Cargo.toml b/examples/game_of_life/Cargo.toml index b1054537..2b945c4c 100644 --- a/examples/game_of_life/Cargo.toml +++ b/examples/game_of_life/Cargo.toml @@ -8,3 +8,4 @@ publish = false [dependencies] iced = { path = "../..", features = ["canvas", "tokio", "debug"] } itertools = "0.9" +rustc-hash = "1.1" -- cgit From 916a1bfc7049867669b81f446e711021d92a4132 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Sat, 2 May 2020 07:01:27 +0200 Subject: Run ticks in a background thread in `game_of_life` --- examples/game_of_life/Cargo.toml | 1 + 1 file changed, 1 insertion(+) (limited to 'examples/game_of_life/Cargo.toml') diff --git a/examples/game_of_life/Cargo.toml b/examples/game_of_life/Cargo.toml index 2b945c4c..b9bb7f2a 100644 --- a/examples/game_of_life/Cargo.toml +++ b/examples/game_of_life/Cargo.toml @@ -7,5 +7,6 @@ publish = false [dependencies] iced = { path = "../..", features = ["canvas", "tokio", "debug"] } +tokio = { version = "0.2", features = ["blocking"] } itertools = "0.9" rustc-hash = "1.1" -- cgit