on master help sign in
port examples (need help)
commit119226cef7674b02040765a64510c6aaf0187740 authorldesgoui <ldesgoui@ldesgoui.xyz> dateSat 30 Nov 2019, 19:30 (7 years ago) parent5e28ad3
12 files changed+62−135
Cargo.lock+16−86 examples/counter/Cargo.toml+1−1 examples/game-of-life/Cargo.toml+2−3 examples/game-of-life/src/lib.rs+10−10 examples/hello-world/Cargo.toml+1−1 examples/input-form/Cargo.toml+1−1 examples/moire/Cargo.toml+2−3 examples/moire/src/lib.rs+2−2 examples/sierpinski-triangle/Cargo.toml+2−3 examples/sierpinski-triangle/src/lib.rs+2−2 examples/todomvc/Cargo.toml+3−4 examples/todomvc/src/router.rs+20−19
Cargo.lock+16−86
@@ -103,7 +103,7 @@ dependencies = [
103103 "rayon 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
104104 "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)",
105105 "serde_derive 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)",
106− "serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)",
106+ "serde_json 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)",
107107 "tinytemplate 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
108108 "walkdir 2.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
109109]
@@ -207,7 +207,7 @@ dependencies = [
207207 "dodrio 0.1.0",
208208 "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
209209 "wasm-bindgen 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)",
210− "wasm-bindgen-test 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
210+ "wasm-bindgen-test 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
211211 "web-sys 0.3.32 (registry+https://github.com/rust-lang/crates.io-index)",
212212]
213213
@@ -217,11 +217,10 @@ version = "0.1.0"
217217dependencies = [
218218 "console_error_panic_hook 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
219219 "dodrio 0.1.0",
220− "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)",
221220 "js-sys 0.3.32 (registry+https://github.com/rust-lang/crates.io-index)",
222221 "wasm-bindgen 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)",
223− "wasm-bindgen-futures 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
224− "wasm-bindgen-test 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
222+ "wasm-bindgen-futures 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
223+ "wasm-bindgen-test 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
225224 "web-sys 0.3.32 (registry+https://github.com/rust-lang/crates.io-index)",
226225]
227226
@@ -232,7 +231,7 @@ dependencies = [
232231 "console_error_panic_hook 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
233232 "dodrio 0.1.0",
234233 "wasm-bindgen 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)",
235− "wasm-bindgen-test 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
234+ "wasm-bindgen-test 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
236235 "web-sys 0.3.32 (registry+https://github.com/rust-lang/crates.io-index)",
237236]
238237
@@ -243,7 +242,7 @@ dependencies = [
243242 "console_error_panic_hook 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
244243 "dodrio 0.1.0",
245244 "wasm-bindgen 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)",
246− "wasm-bindgen-test 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
245+ "wasm-bindgen-test 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
247246 "web-sys 0.3.32 (registry+https://github.com/rust-lang/crates.io-index)",
248247]
249248
@@ -278,12 +277,11 @@ dependencies = [
278277 "console_error_panic_hook 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
279278 "console_log 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
280279 "dodrio 0.1.0",
281− "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)",
282280 "js-sys 0.3.32 (registry+https://github.com/rust-lang/crates.io-index)",
283281 "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
284282 "wasm-bindgen 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)",
285− "wasm-bindgen-futures 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
286− "wasm-bindgen-test 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
283+ "wasm-bindgen-futures 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
284+ "wasm-bindgen-test 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
287285 "web-sys 0.3.32 (registry+https://github.com/rust-lang/crates.io-index)",
288286]
289287
@@ -293,11 +291,10 @@ version = "0.1.0"
293291dependencies = [
294292 "console_error_panic_hook 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
295293 "dodrio 0.1.0",
296− "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)",
297294 "js-sys 0.3.32 (registry+https://github.com/rust-lang/crates.io-index)",
298295 "wasm-bindgen 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)",
299− "wasm-bindgen-futures 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
300− "wasm-bindgen-test 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
296+ "wasm-bindgen-futures 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
297+ "wasm-bindgen-test 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
301298 "web-sys 0.3.32 (registry+https://github.com/rust-lang/crates.io-index)",
302299]
303300
@@ -309,14 +306,13 @@ dependencies = [
309306 "console_error_panic_hook 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
310307 "console_log 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
311308 "dodrio 0.1.0",
312− "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)",
313309 "js-sys 0.3.32 (registry+https://github.com/rust-lang/crates.io-index)",
314310 "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
315311 "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)",
316− "serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)",
312+ "serde_json 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)",
317313 "wasm-bindgen 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)",
318− "wasm-bindgen-futures 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
319− "wasm-bindgen-test 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
314+ "wasm-bindgen-futures 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
315+ "wasm-bindgen-test 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
320316 "web-sys 0.3.32 (registry+https://github.com/rust-lang/crates.io-index)",
321317]
322318
@@ -325,11 +321,6 @@ name = "either"
325321version = "1.5.2"
326322source = "registry+https://github.com/rust-lang/crates.io-index"
327323
328−[[package]]
329−name = "futures"
330−version = "0.1.28"
331−source = "registry+https://github.com/rust-lang/crates.io-index"
332−
333324[[package]]
334325name = "futures"
335326version = "0.3.1"
@@ -540,14 +531,6 @@ name = "proc-macro-nested"
540531version = "0.1.3"
541532source = "registry+https://github.com/rust-lang/crates.io-index"
542533
543−[[package]]
544−name = "proc-macro2"
545−version = "0.4.27"
546−source = "registry+https://github.com/rust-lang/crates.io-index"
547−dependencies = [
548− "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
549−]
550−
551534[[package]]
552535name = "proc-macro2"
553536version = "1.0.6"
@@ -556,14 +539,6 @@ dependencies = [
556539 "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
557540]
558541
559−[[package]]
560−name = "quote"
561−version = "0.6.11"
562−source = "registry+https://github.com/rust-lang/crates.io-index"
563−dependencies = [
564− "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)",
565−]
566−
567542[[package]]
568543name = "quote"
569544version = "1.0.2"
@@ -704,7 +679,7 @@ dependencies = [
704679
705680[[package]]
706681name = "serde_json"
707−version = "1.0.40"
682+version = "1.0.42"
708683source = "registry+https://github.com/rust-lang/crates.io-index"
709684dependencies = [
710685 "itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -756,7 +731,7 @@ version = "1.0.1"
756731source = "registry+https://github.com/rust-lang/crates.io-index"
757732dependencies = [
758733 "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)",
759− "serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)",
734+ "serde_json 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)",
760735]
761736
762737[[package]]
@@ -769,11 +744,6 @@ name = "unicode-width"
769744version = "0.1.5"
770745source = "registry+https://github.com/rust-lang/crates.io-index"
771746
772−[[package]]
773−name = "unicode-xid"
774−version = "0.1.0"
775−source = "registry+https://github.com/rust-lang/crates.io-index"
776−
777747[[package]]
778748name = "unicode-xid"
779749version = "0.2.0"
@@ -822,16 +792,6 @@ dependencies = [
822792 "wasm-bindgen-shared 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)",
823793]
824794
825−[[package]]
826−name = "wasm-bindgen-futures"
827−version = "0.3.19"
828−source = "registry+https://github.com/rust-lang/crates.io-index"
829−dependencies = [
830− "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)",
831− "js-sys 0.3.32 (registry+https://github.com/rust-lang/crates.io-index)",
832− "wasm-bindgen 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)",
833−]
834−
835795[[package]]
836796name = "wasm-bindgen-futures"
837797version = "0.4.5"
@@ -869,20 +829,6 @@ name = "wasm-bindgen-shared"
869829version = "0.2.55"
870830source = "registry+https://github.com/rust-lang/crates.io-index"
871831
872−[[package]]
873−name = "wasm-bindgen-test"
874−version = "0.2.42"
875−source = "registry+https://github.com/rust-lang/crates.io-index"
876−dependencies = [
877− "console_error_panic_hook 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
878− "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)",
879− "js-sys 0.3.32 (registry+https://github.com/rust-lang/crates.io-index)",
880− "scoped-tls 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
881− "wasm-bindgen 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)",
882− "wasm-bindgen-futures 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
883− "wasm-bindgen-test-macro 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
884−]
885−
886832[[package]]
887833name = "wasm-bindgen-test"
888834version = "0.3.5"
@@ -896,15 +842,6 @@ dependencies = [
896842 "wasm-bindgen-test-macro 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
897843]
898844
899−[[package]]
900−name = "wasm-bindgen-test-macro"
901−version = "0.2.42"
902−source = "registry+https://github.com/rust-lang/crates.io-index"
903−dependencies = [
904− "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)",
905− "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)",
906−]
907−
908845[[package]]
909846name = "wasm-bindgen-test-macro"
910847version = "0.3.5"
@@ -998,7 +935,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
998935"checksum csv 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "37519ccdfd73a75821cac9319d4fce15a81b9fcf75f951df5b9988aa3a0af87d"
999936"checksum csv-core 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "9b5cadb6b25c77aeff80ba701712494213f4a8418fcda2ee11b6560c3ad0bf4c"
1000937"checksum either 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "5527cfe0d098f36e3f8839852688e63c8fff1c90b2b405aef730615f9a7bcf7b"
1001−"checksum futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)" = "45dc39533a6cae6da2b56da48edae506bb767ec07370f86f70fc062e9d435869"
1002938"checksum futures 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b6f16056ecbb57525ff698bb955162d0cd03bee84e6241c27ff75c08d8ca5987"
1003939"checksum futures-channel 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "fcae98ca17d102fd8a3603727b9259fcf7fa4239b603d2142926189bc8999b86"
1004940"checksum futures-core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "79564c427afefab1dfb3298535b21eda083ef7935b4f0ecbfcb121f0aec10866"
@@ -1026,9 +962,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
1026962"checksum pin-utils 0.1.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)" = "5894c618ce612a3fa23881b152b608bafb8c56cfc22f434a3ba3120b40f7b587"
1027963"checksum proc-macro-hack 0.5.11 (registry+https://github.com/rust-lang/crates.io-index)" = "ecd45702f76d6d3c75a80564378ae228a85f0b59d2f3ed43c91b4a69eb2ebfc5"
1028964"checksum proc-macro-nested 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "369a6ed065f249a159e06c45752c780bda2fb53c995718f9e484d08daa9eb42e"
1029−"checksum proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)" = "4d317f9caece796be1980837fd5cb3dfec5613ebdb04ad0956deea83ce168915"
1030965"checksum proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "9c9e470a8dc4aeae2dee2f335e8f533e2d4b347e1434e5671afc49b054592f27"
1031−"checksum quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)" = "cdd8e04bd9c52e0342b406469d494fcb033be4bdbe5c606016defbb1681411e1"
1032966"checksum quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "053a8c8bcc71fcce321828dc897a98ab9760bef03a4fc36693c231e5b3216cfe"
1033967"checksum rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19"
1034968"checksum rand_os 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a788ae3edb696cfcba1c19bfd388cc4b8c21f8a408432b199c072825084da58a"
@@ -1047,7 +981,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
1047981"checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3"
1048982"checksum serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)" = "1217f97ab8e8904b57dd22eb61cde455fa7446a9c1cf43966066da047c1f3702"
1049983"checksum serde_derive 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)" = "a8c6faef9a2e64b0064f48570289b4bf8823b7581f1d6157c1b52152306651d0"
1050−"checksum serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)" = "051c49229f282f7c6f3813f8286cc1e3323e8051823fce42c7ea80fe13521704"
984+"checksum serde_json 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)" = "1a3351dcbc1f067e2c92ab7c3c1f288ad1a4cffc470b5aaddb4c2e0a3ae80043"
1051985"checksum slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8"
1052986"checksum sourcefile 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "4bf77cb82ba8453b42b6ae1d692e4cdc92f9a47beaf89a847c8be83f4e328ad3"
1053987"checksum syn 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)" = "f89693ae015201f8de93fd96bde2d065f8bfc3f97ce006d5bc9f900b97c0c7c0"
@@ -1056,21 +990,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
1056990"checksum tinytemplate 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7655088894274afb52b807bd3c87072daa1fedd155068b8705cabfd628956115"
1057991"checksum unicode-segmentation 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "aa6024fc12ddfd1c6dbc14a80fa2324d4568849869b779f6bd37e5e4c03344d1"
1058992"checksum unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "882386231c45df4700b275c7ff55b6f3698780a650026380e72dabe76fa46526"
1059−"checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc"
1060993"checksum unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c"
1061994"checksum version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd"
1062995"checksum walkdir 2.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "9d9d7ed3431229a144296213105a390676cc49c9b6a72bd19f3176c98e129fa1"
1063996"checksum wasi 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b89c3ce4ce14bdc6fb6beaf9ec7928ca331de5df7e5ea278375642a2f478570d"
1064997"checksum wasm-bindgen 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)" = "29ae32af33bacd663a9a28241abecf01f2be64e6a185c6139b04f18b6385c5f2"
1065998"checksum wasm-bindgen-backend 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)" = "1845584bd3593442dc0de6e6d9f84454a59a057722f36f005e44665d6ab19d85"
1066−"checksum wasm-bindgen-futures 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)" = "0ad171fc1f6e43f97d155d27f4ee5657bd8aa5cce7c497ef3a0a0c5b44618b2d"
1067999"checksum wasm-bindgen-futures 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "1458706aa1b8fe6898d19433c9f110d93a05d1f22ae6adf55810409a94df34b4"
10681000"checksum wasm-bindgen-macro 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)" = "87fcc747e6b73c93d22c947a6334644d22cfec5abd8b66238484dc2b0aeb9fe4"
10691001"checksum wasm-bindgen-macro-support 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)" = "3dc4b3f2c4078c8c4a5f363b92fcf62604c5913cbd16c6ff5aaf0f74ec03f570"
10701002"checksum wasm-bindgen-shared 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)" = "ca0b78d6d3be8589b95d1d49cdc0794728ca734adf36d7c9f07e6459508bb53d"
1071−"checksum wasm-bindgen-test 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)" = "8aed4ef1aa56f2ef4aff593c516de6a3e48711c703b3f7415c9151a7c9babd17"
10721003"checksum wasm-bindgen-test 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "ed5833682054e941db0b7e2b4877b61bbaafd680608e40d268e070d34558b305"
1073−"checksum wasm-bindgen-test-macro 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)" = "eb477c50f3c9a9ecd99c78fb9bd3b6599d414b918d5f72165b12c53738011ae1"
10741004"checksum wasm-bindgen-test-macro 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "9c5dcf70d21d0ff0ea5cdb97dba9a9b56ddad4a9bd10c8912eedc55618be022f"
10751005"checksum wasm-bindgen-webidl 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)" = "3126356474ceb717c8fb5549ae387c9fbf4872818454f4d87708bee997214bb5"
10761006"checksum web-sys 0.3.32 (registry+https://github.com/rust-lang/crates.io-index)" = "98405c0a2e722ed3db341b4c5b70eb9fe0021621f7350bab76df93b09b649bbf"
examples/counter/Cargo.toml+1−1
@@ -30,4 +30,4 @@ features = [
3030]
3131
3232[dev-dependencies]
33−wasm-bindgen-test = "0.2.42"
33+wasm-bindgen-test = "0.3.5"
examples/game-of-life/Cargo.toml+2−3
@@ -14,8 +14,7 @@ dodrio = { path = "../.." }
1414wasm-bindgen = "0.2.42"
1515console_error_panic_hook = "0.1.6"
1616js-sys = "0.3.19"
17−wasm-bindgen-futures = "0.3.19"
18−futures = "0.1.28"
17+wasm-bindgen-futures = "0.4.5"
1918
2019[dependencies.web-sys]
2120version = "0.3.19"
@@ -27,4 +26,4 @@ features = [
2726]
2827
2928[dev-dependencies]
30−wasm-bindgen-test = "0.2.42"
29+wasm-bindgen-test = "0.3.5"
examples/game-of-life/src/lib.rs+10−10
@@ -1,5 +1,4 @@
11use dodrio::{bumpalo, Node, Render, RenderContext, Vdom};
2−use futures::prelude::*;
32use std::cell::RefCell;
43use std::rc::Rc;
54use wasm_bindgen::{prelude::*, JsCast};
@@ -178,20 +177,21 @@ pub fn run() {
178177
179178 // Kick off a loop that keeps computing a tick of the universe and then
180179 // re-rendering on every animation frame.
181− let rc: Rc<RefCell<Option<Closure<FnMut()>>>> = Rc::new(RefCell::new(None));
180+ let rc = <Rc<RefCell<Option<Closure<dyn FnMut()>>>>>::default();
182181 let rc2 = rc.clone();
183182 let window2 = window.clone();
184183 let weak = vdom.weak();
185184 let f = Closure::wrap(Box::new(move || {
186185 weak.schedule_render();
187186
188− wasm_bindgen_futures::spawn_local(
189− weak.with_component(|root| {
190− let universe = root.unwrap_mut::<Universe>();
191− universe.tick();
192− })
193− .map_err(|_| wasm_bindgen::throw_str("impossible, we always keep the vdom alive")),
194− );
187+ // // -- tricky bit --
188+ // wasm_bindgen_futures::spawn_local(
189+ // weak.with_component(|root| {
190+ // let universe = root.unwrap_mut::<Universe>();
191+ // universe.tick();
192+ // })
193+ // .map_err(|_| wasm_bindgen::throw_str("impossible, we always keep the vdom alive")),
194+ // );
195195
196196 window
197197 .request_animation_frame(
@@ -202,7 +202,7 @@ pub fn run() {
202202 .unchecked_ref::<js_sys::Function>(),
203203 )
204204 .unwrap_throw();
205− }) as Box<FnMut()>);
205+ }) as Box<dyn FnMut()>);
206206 window2
207207 .request_animation_frame(f.as_ref().unchecked_ref::<js_sys::Function>())
208208 .unwrap_throw();
examples/hello-world/Cargo.toml+1−1
@@ -24,4 +24,4 @@ features = [
2424]
2525
2626[dev-dependencies]
27−wasm-bindgen-test = "0.2.42"
27+wasm-bindgen-test = "0.3.5"
examples/input-form/Cargo.toml+1−1
@@ -29,4 +29,4 @@ features = [
2929]
3030
3131[dev-dependencies]
32−wasm-bindgen-test = "0.2.42"
32+wasm-bindgen-test = "0.3.5"
examples/moire/Cargo.toml+2−3
@@ -10,10 +10,9 @@ crate-type = ["cdylib"]
1010[dependencies]
1111cfg-if = "0.1.9"
1212dodrio = { path = "../.." }
13−futures = "0.1.28"
1413log = "0.4.8"
1514wasm-bindgen = "0.2.42"
16−wasm-bindgen-futures = "0.3.19"
15+wasm-bindgen-futures = "0.4.5"
1716
1817# Optional dependencies for logging.
1918console_error_panic_hook = { optional = true, version = "0.1.6" }
@@ -35,7 +34,7 @@ features = [
3534]
3635
3736[dev-dependencies]
38−wasm-bindgen-test = "0.2.42"
37+wasm-bindgen-test = "0.3.5"
3938
4039[features]
4140logging = [
examples/moire/src/lib.rs+2−2
@@ -27,7 +27,7 @@ pub fn run() {
2727 let vdom = Vdom::new(&scene, component);
2828
2929 // Kick off a loop that keeps re-rendering on every animation frame.
30− let rc: Rc<RefCell<Option<Closure<FnMut()>>>> = Rc::new(RefCell::new(None));
30+ let rc = <Rc<RefCell<Option<Closure<dyn FnMut()>>>>>::default();
3131 let rc2 = rc.clone();
3232 let window2 = window.clone();
3333 let weak = vdom.weak();
@@ -42,7 +42,7 @@ pub fn run() {
4242 .unchecked_ref::<js_sys::Function>(),
4343 )
4444 .unwrap_throw();
45− }) as Box<FnMut()>);
45+ }) as Box<dyn FnMut()>);
4646 window2
4747 .request_animation_frame(f.as_ref().unchecked_ref::<js_sys::Function>())
4848 .unwrap_throw();
examples/sierpinski-triangle/Cargo.toml+2−3
@@ -12,8 +12,7 @@ dodrio = { path = "../.." }
1212wasm-bindgen = "0.2.42"
1313console_error_panic_hook = "0.1.6"
1414js-sys = "0.3.19"
15−wasm-bindgen-futures = "0.3.19"
16−futures = "0.1.28"
15+wasm-bindgen-futures = "0.4.5"
1716
1817[dependencies.web-sys]
1918version = "0.3.19"
@@ -26,4 +25,4 @@ features = [
2625]
2726
2827[dev-dependencies]
29−wasm-bindgen-test = "0.2.42"
28+wasm-bindgen-test = "0.3.5"
examples/sierpinski-triangle/src/lib.rs+2−2
@@ -111,7 +111,7 @@ impl Render for Container {
111111
112112// Kick off a loop that keeps re-rendering on every animation frame.
113113fn animate(window: Window, vdom: Vdom) {
114− let rc: Rc<RefCell<Option<Closure<FnMut()>>>> = Rc::new(RefCell::new(None));
114+ let rc = <Rc<RefCell<Option<Closure<dyn FnMut()>>>>>::default();
115115 let rc2 = rc.clone();
116116 let window2 = window.clone();
117117 let weak = vdom.weak();
@@ -126,7 +126,7 @@ fn animate(window: Window, vdom: Vdom) {
126126 .unchecked_ref::<js_sys::Function>(),
127127 )
128128 .unwrap_throw();
129− }) as Box<FnMut()>);
129+ }) as Box<dyn FnMut()>);
130130 window2
131131 .request_animation_frame(f.as_ref().unchecked_ref::<js_sys::Function>())
132132 .unwrap_throw();
examples/todomvc/Cargo.toml+3−4
@@ -7,12 +7,11 @@ version = "0.1.0"
77[dependencies]
88cfg-if = "0.1.9"
99dodrio = { path = "../..", features = ["serde"] }
10−futures = "0.1.28"
1110js-sys = "0.3.19"
1211serde = { features = ["derive"], version = "1.0.98" }
13−serde_json = "1.0.40"
12+serde_json = "1.0.42"
1413wasm-bindgen = "0.2.42"
15−wasm-bindgen-futures = "0.3.19"
14+wasm-bindgen-futures = "0.4.5"
1615
1716# Optional dependencies for logging.
1817console_error_panic_hook = { optional = true, version = "0.1.6" }
@@ -35,7 +34,7 @@ features = [
3534]
3635
3736[dev-dependencies]
38−wasm-bindgen-test = "0.2.42"
37+wasm-bindgen-test = "0.3.5"
3938
4039[features]
4140logging = [
examples/todomvc/src/router.rs+20−19
@@ -4,7 +4,6 @@ use crate::todos::Todos;
44use crate::utils;
55use crate::visibility::Visibility;
66use dodrio::VdomWeak;
7−use futures::prelude::*;
87use std::str::FromStr;
98use wasm_bindgen::{prelude::*, JsCast};
109
@@ -29,23 +28,25 @@ pub fn start(vdom: VdomWeak) {
2928 v
3029 });
3130
32− wasm_bindgen_futures::spawn_local(
33− vdom.with_component({
34− let vdom = vdom.clone();
35− move |root| {
36− let todos = root.unwrap_mut::<Todos>();
37− // If the todos' visibility already matches the event's
38− // visibility, then there is nothing to do (ha). If they
39− // don't match, then we need to update the todos' visibility
40− // and re-render.
41− if todos.visibility() != new_vis {
42− todos.set_visibility(new_vis);
43− vdom.schedule_render();
44− }
45− }
46− })
47− .map_err(|_| ()),
48− );
31+ // // -- another tricky bit --
32+ // wasm_bindgen_futures::spawn_local(async move {
33+ // let _ = vdom
34+ // .with_component({
35+ // let vdom = vdom.clone();
36+ // move |root| {
37+ // let todos = root.unwrap_mut::<Todos>();
38+ // // If the todos' visibility already matches the event's
39+ // // visibility, then there is nothing to do (ha). If they
40+ // // don't match, then we need to update the todos' visibility
41+ // // and re-render.
42+ // if todos.visibility() != new_vis {
43+ // todos.set_visibility(new_vis);
44+ // vdom.schedule_render();
45+ // }
46+ // }
47+ // })
48+ // .await;
49+ // });
4950 };
5051
5152 // Call it once to handle the initial `#` fragment.
@@ -56,7 +57,7 @@ pub fn start(vdom: VdomWeak) {
5657 // Note that if we ever intended to unmount our todos app, we would want to
5758 // provide a method for removing this router's event listener and cleaning
5859 // up after ourselves.
59− let on_hash_change = Closure::wrap(Box::new(on_hash_change) as Box<FnMut()>);
60+ let on_hash_change = Closure::wrap(Box::new(on_hash_change) as Box<dyn FnMut()>);
6061 let window = utils::window();
6162 window
6263 .add_event_listener_with_callback("hashchange", on_hash_change.as_ref().unchecked_ref())