on master help sign in
example: Add Sierpinski sieve
3fde219Steven Seguin
Cargo.lock+91−76
@@ -71,7 +71,7 @@ version = "0.1.6"
71source = "registry+https://github.com/rust-lang/crates.io-index"
71source = "registry+https://github.com/rust-lang/crates.io-index"
72dependencies = [
72dependencies = [
73 "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
73 "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
74− "wasm-bindgen 0.2.38 (registry+https://github.com/rust-lang/crates.io-index)",
74+ "wasm-bindgen 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
75]
75]
76
76
77[[package]]
77[[package]]
@@ -80,7 +80,7 @@ version = "0.1.2"
80source = "registry+https://github.com/rust-lang/crates.io-index"
80source = "registry+https://github.com/rust-lang/crates.io-index"
81dependencies = [
81dependencies = [
82 "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
82 "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
83− "web-sys 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)",
83+ "web-sys 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
84]
84]
85
85
86[[package]]
86[[package]]
@@ -93,12 +93,12 @@ dependencies = [
93 "dodrio-js-api 0.1.0",
93 "dodrio-js-api 0.1.0",
94 "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)",
94 "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)",
95 "fxhash 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
95 "fxhash 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
96− "js-sys 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)",
96+ "js-sys 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
97 "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
97 "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
98− "wasm-bindgen 0.2.38 (registry+https://github.com/rust-lang/crates.io-index)",
98+ "wasm-bindgen 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
99− "wasm-bindgen-futures 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)",
99+ "wasm-bindgen-futures 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
100− "wasm-bindgen-test 0.2.38 (registry+https://github.com/rust-lang/crates.io-index)",
100+ "wasm-bindgen-test 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
101− "web-sys 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)",
101+ "web-sys 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
102]
102]
103
103
104[[package]]
104[[package]]
@@ -109,9 +109,9 @@ dependencies = [
109 "console_log 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
109 "console_log 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
110 "dodrio 0.1.0",
110 "dodrio 0.1.0",
111 "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
111 "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
112− "wasm-bindgen 0.2.38 (registry+https://github.com/rust-lang/crates.io-index)",
112+ "wasm-bindgen 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
113− "wasm-bindgen-test 0.2.38 (registry+https://github.com/rust-lang/crates.io-index)",
113+ "wasm-bindgen-test 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
114− "web-sys 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)",
114+ "web-sys 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
115]
115]
116
116
117[[package]]
117[[package]]
@@ -121,11 +121,11 @@ dependencies = [
121 "console_error_panic_hook 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
121 "console_error_panic_hook 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
122 "dodrio 0.1.0",
122 "dodrio 0.1.0",
123 "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)",
123 "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)",
124− "js-sys 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)",
124+ "js-sys 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
125− "wasm-bindgen 0.2.38 (registry+https://github.com/rust-lang/crates.io-index)",
125+ "wasm-bindgen 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
126− "wasm-bindgen-futures 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)",
126+ "wasm-bindgen-futures 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
127− "wasm-bindgen-test 0.2.38 (registry+https://github.com/rust-lang/crates.io-index)",
127+ "wasm-bindgen-test 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
128− "web-sys 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)",
128+ "web-sys 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
129]
129]
130
130
131[[package]]
131[[package]]
@@ -134,9 +134,9 @@ version = "0.1.0"
134dependencies = [
134dependencies = [
135 "console_error_panic_hook 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
135 "console_error_panic_hook 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
136 "dodrio 0.1.0",
136 "dodrio 0.1.0",
137− "wasm-bindgen 0.2.38 (registry+https://github.com/rust-lang/crates.io-index)",
137+ "wasm-bindgen 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
138− "wasm-bindgen-test 0.2.38 (registry+https://github.com/rust-lang/crates.io-index)",
138+ "wasm-bindgen-test 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
139− "web-sys 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)",
139+ "web-sys 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
140]
140]
141
141
142[[package]]
142[[package]]
@@ -145,9 +145,9 @@ version = "0.1.0"
145dependencies = [
145dependencies = [
146 "console_error_panic_hook 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
146 "console_error_panic_hook 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
147 "dodrio 0.1.0",
147 "dodrio 0.1.0",
148− "wasm-bindgen 0.2.38 (registry+https://github.com/rust-lang/crates.io-index)",
148+ "wasm-bindgen 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
149− "wasm-bindgen-test 0.2.38 (registry+https://github.com/rust-lang/crates.io-index)",
149+ "wasm-bindgen-test 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
150− "web-sys 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)",
150+ "web-sys 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
151]
151]
152
152
153[[package]]
153[[package]]
@@ -156,10 +156,10 @@ version = "0.1.0"
156dependencies = [
156dependencies = [
157 "dodrio 0.1.0",
157 "dodrio 0.1.0",
158 "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)",
158 "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)",
159− "js-sys 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)",
159+ "js-sys 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
160− "wasm-bindgen 0.2.38 (registry+https://github.com/rust-lang/crates.io-index)",
160+ "wasm-bindgen 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
161− "wasm-bindgen-futures 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)",
161+ "wasm-bindgen-futures 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
162− "wasm-bindgen-test 0.2.38 (registry+https://github.com/rust-lang/crates.io-index)",
162+ "wasm-bindgen-test 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
163]
163]
164
164
165[[package]]
165[[package]]
@@ -169,9 +169,9 @@ dependencies = [
169 "console_error_panic_hook 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
169 "console_error_panic_hook 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
170 "dodrio 0.1.0",
170 "dodrio 0.1.0",
171 "dodrio-js-api 0.1.0",
171 "dodrio-js-api 0.1.0",
172− "js-sys 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)",
172+ "js-sys 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
173− "wasm-bindgen 0.2.38 (registry+https://github.com/rust-lang/crates.io-index)",
173+ "wasm-bindgen 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
174− "web-sys 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)",
174+ "web-sys 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
175]
175]
176
176
177[[package]]
177[[package]]
@@ -183,12 +183,26 @@ dependencies = [
183 "console_log 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
183 "console_log 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
184 "dodrio 0.1.0",
184 "dodrio 0.1.0",
185 "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)",
185 "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)",
186− "js-sys 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)",
186+ "js-sys 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
187 "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
187 "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
188− "wasm-bindgen 0.2.38 (registry+https://github.com/rust-lang/crates.io-index)",
188+ "wasm-bindgen 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
189− "wasm-bindgen-futures 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)",
189+ "wasm-bindgen-futures 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
190− "wasm-bindgen-test 0.2.38 (registry+https://github.com/rust-lang/crates.io-index)",
190+ "wasm-bindgen-test 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
191+ "web-sys 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
192+]
193+
194+[[package]]
195+name = "dodrio-sierpinski"
196+version = "0.1.0"
197+dependencies = [
198+ "console_error_panic_hook 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
199+ "dodrio 0.1.0",
200+ "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)",
201+ "js-sys 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
202+ "wasm-bindgen 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
203+ "wasm-bindgen-futures 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
204+ "wasm-bindgen-test 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
191− "web-sys 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)",
205+ "web-sys 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
192]
206]
193
207
194[[package]]
208[[package]]
@@ -200,14 +214,14 @@ dependencies = [
200 "console_log 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
214 "console_log 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
201 "dodrio 0.1.0",
215 "dodrio 0.1.0",
202 "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)",
216 "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)",
203− "js-sys 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)",
217+ "js-sys 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
204 "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
218 "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
205 "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)",
219 "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)",
206 "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)",
220 "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)",
207− "wasm-bindgen 0.2.38 (registry+https://github.com/rust-lang/crates.io-index)",
221+ "wasm-bindgen 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
208− "wasm-bindgen-futures 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)",
222+ "wasm-bindgen-futures 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
209− "wasm-bindgen-test 0.2.38 (registry+https://github.com/rust-lang/crates.io-index)",
223+ "wasm-bindgen-test 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
210− "web-sys 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)",
224+ "web-sys 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
211]
225]
212
226
213[[package]]
227[[package]]
@@ -278,10 +292,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
278
292
279[[package]]
293[[package]]
280name = "js-sys"
294name = "js-sys"
281−version = "0.3.15"
295+version = "0.3.16"
282source = "registry+https://github.com/rust-lang/crates.io-index"
296source = "registry+https://github.com/rust-lang/crates.io-index"
283dependencies = [
297dependencies = [
284− "wasm-bindgen 0.2.38 (registry+https://github.com/rust-lang/crates.io-index)",
298+ "wasm-bindgen 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
285]
299]
286
300
287[[package]]
301[[package]]
@@ -492,78 +506,79 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
492
506
493[[package]]
507[[package]]
494name = "wasm-bindgen"
508name = "wasm-bindgen"
495−version = "0.2.38"
509+version = "0.2.39"
496source = "registry+https://github.com/rust-lang/crates.io-index"
510source = "registry+https://github.com/rust-lang/crates.io-index"
497dependencies = [
511dependencies = [
498− "wasm-bindgen-macro 0.2.38 (registry+https://github.com/rust-lang/crates.io-index)",
512+ "wasm-bindgen-macro 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
499]
513]
500
514
501[[package]]
515[[package]]
502name = "wasm-bindgen-backend"
516name = "wasm-bindgen-backend"
503−version = "0.2.38"
517+version = "0.2.39"
504source = "registry+https://github.com/rust-lang/crates.io-index"
518source = "registry+https://github.com/rust-lang/crates.io-index"
505dependencies = [
519dependencies = [
520+ "bumpalo 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
506 "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
521 "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
507 "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
522 "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
508 "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)",
523 "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)",
509 "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)",
524 "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)",
510 "syn 0.15.29 (registry+https://github.com/rust-lang/crates.io-index)",
525 "syn 0.15.29 (registry+https://github.com/rust-lang/crates.io-index)",
511− "wasm-bindgen-shared 0.2.38 (registry+https://github.com/rust-lang/crates.io-index)",
526+ "wasm-bindgen-shared 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
512]
527]
513
528
514[[package]]
529[[package]]
515name = "wasm-bindgen-futures"
530name = "wasm-bindgen-futures"
516−version = "0.3.15"
531+version = "0.3.16"
517source = "registry+https://github.com/rust-lang/crates.io-index"
532source = "registry+https://github.com/rust-lang/crates.io-index"
518dependencies = [
533dependencies = [
519 "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)",
534 "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)",
520− "js-sys 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)",
535+ "js-sys 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
521− "wasm-bindgen 0.2.38 (registry+https://github.com/rust-lang/crates.io-index)",
536+ "wasm-bindgen 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
522]
537]
523
538
524[[package]]
539[[package]]
525name = "wasm-bindgen-macro"
540name = "wasm-bindgen-macro"
526−version = "0.2.38"
541+version = "0.2.39"
527source = "registry+https://github.com/rust-lang/crates.io-index"
542source = "registry+https://github.com/rust-lang/crates.io-index"
528dependencies = [
543dependencies = [
529 "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)",
544 "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)",
530− "wasm-bindgen-macro-support 0.2.38 (registry+https://github.com/rust-lang/crates.io-index)",
545+ "wasm-bindgen-macro-support 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
531]
546]
532
547
533[[package]]
548[[package]]
534name = "wasm-bindgen-macro-support"
549name = "wasm-bindgen-macro-support"
535−version = "0.2.38"
550+version = "0.2.39"
536source = "registry+https://github.com/rust-lang/crates.io-index"
551source = "registry+https://github.com/rust-lang/crates.io-index"
537dependencies = [
552dependencies = [
538 "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)",
553 "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)",
539 "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)",
554 "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)",
540 "syn 0.15.29 (registry+https://github.com/rust-lang/crates.io-index)",
555 "syn 0.15.29 (registry+https://github.com/rust-lang/crates.io-index)",
541− "wasm-bindgen-backend 0.2.38 (registry+https://github.com/rust-lang/crates.io-index)",
556+ "wasm-bindgen-backend 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
542− "wasm-bindgen-shared 0.2.38 (registry+https://github.com/rust-lang/crates.io-index)",
557+ "wasm-bindgen-shared 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
543]
558]
544
559
545[[package]]
560[[package]]
546name = "wasm-bindgen-shared"
561name = "wasm-bindgen-shared"
547−version = "0.2.38"
562+version = "0.2.39"
548source = "registry+https://github.com/rust-lang/crates.io-index"
563source = "registry+https://github.com/rust-lang/crates.io-index"
549
564
550[[package]]
565[[package]]
551name = "wasm-bindgen-test"
566name = "wasm-bindgen-test"
552−version = "0.2.38"
567+version = "0.2.39"
553source = "registry+https://github.com/rust-lang/crates.io-index"
568source = "registry+https://github.com/rust-lang/crates.io-index"
554dependencies = [
569dependencies = [
555 "console_error_panic_hook 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
570 "console_error_panic_hook 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
556 "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)",
571 "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)",
557− "js-sys 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)",
572+ "js-sys 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
558 "scoped-tls 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
573 "scoped-tls 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
559− "wasm-bindgen 0.2.38 (registry+https://github.com/rust-lang/crates.io-index)",
574+ "wasm-bindgen 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
560− "wasm-bindgen-futures 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)",
575+ "wasm-bindgen-futures 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
561− "wasm-bindgen-test-macro 0.2.38 (registry+https://github.com/rust-lang/crates.io-index)",
576+ "wasm-bindgen-test-macro 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
562]
577]
563
578
564[[package]]
579[[package]]
565name = "wasm-bindgen-test-macro"
580name = "wasm-bindgen-test-macro"
566−version = "0.2.38"
581+version = "0.2.39"
567source = "registry+https://github.com/rust-lang/crates.io-index"
582source = "registry+https://github.com/rust-lang/crates.io-index"
568dependencies = [
583dependencies = [
569 "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)",
584 "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -572,7 +587,7 @@ dependencies = [
572
587
573[[package]]
588[[package]]
574name = "wasm-bindgen-webidl"
589name = "wasm-bindgen-webidl"
575−version = "0.2.32"
590+version = "0.2.39"
576source = "registry+https://github.com/rust-lang/crates.io-index"
591source = "registry+https://github.com/rust-lang/crates.io-index"
577dependencies = [
592dependencies = [
578 "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
593 "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -581,21 +596,21 @@ dependencies = [
581 "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)",
596 "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)",
582 "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)",
597 "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)",
583 "syn 0.15.29 (registry+https://github.com/rust-lang/crates.io-index)",
598 "syn 0.15.29 (registry+https://github.com/rust-lang/crates.io-index)",
584− "wasm-bindgen-backend 0.2.38 (registry+https://github.com/rust-lang/crates.io-index)",
599+ "wasm-bindgen-backend 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
585 "weedle 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
600 "weedle 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
586]
601]
587
602
588[[package]]
603[[package]]
589name = "web-sys"
604name = "web-sys"
590−version = "0.3.15"
605+version = "0.3.16"
591source = "registry+https://github.com/rust-lang/crates.io-index"
606source = "registry+https://github.com/rust-lang/crates.io-index"
592dependencies = [
607dependencies = [
593 "env_logger 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
608 "env_logger 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
594 "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
609 "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
595− "js-sys 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)",
610+ "js-sys 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
596 "sourcefile 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
611 "sourcefile 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
597− "wasm-bindgen 0.2.38 (registry+https://github.com/rust-lang/crates.io-index)",
612+ "wasm-bindgen 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
598− "wasm-bindgen-webidl 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)",
613+ "wasm-bindgen-webidl 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
599]
614]
600
615
601[[package]]
616[[package]]
@@ -662,7 +677,7 @@ dependencies = [
662"checksum heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205"
677"checksum heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205"
663"checksum humantime 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3ca7e5f2e110db35f93b837c81797f3714500b81d517bf20c431b16d3ca4f114"
678"checksum humantime 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3ca7e5f2e110db35f93b837c81797f3714500b81d517bf20c431b16d3ca4f114"
664"checksum itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1306f3464951f30e30d12373d31c79fbd52d236e5e896fd92f96ec7babbbe60b"
679"checksum itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1306f3464951f30e30d12373d31c79fbd52d236e5e896fd92f96ec7babbbe60b"
665−"checksum js-sys 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)" = "09636f30233c2623a9b4bb05506e224733550e2a13b32ab560dc1744fd5103ca"
680+"checksum js-sys 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)" = "3970f67ef4a716efeba501dbedcc01b4686301b661798a42b24dc8a59d2c6b01"
666"checksum lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bc5729f27f159ddd61f4df6228e827e86643d4d3e7c32183cb30a1c08f604a14"
681"checksum lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bc5729f27f159ddd61f4df6228e827e86643d4d3e7c32183cb30a1c08f604a14"
667"checksum libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)" = "aab692d7759f5cd8c859e169db98ae5b52c924add2af5fbbca11d12fefb567c1"
682"checksum libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)" = "aab692d7759f5cd8c859e169db98ae5b52c924add2af5fbbca11d12fefb567c1"
668"checksum log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c84ec4b527950aa83a329754b01dbe3f58361d1c5efacd1f6d68c494d08a17c6"
683"checksum log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c84ec4b527950aa83a329754b01dbe3f58361d1c5efacd1f6d68c494d08a17c6"
@@ -692,16 +707,16 @@ dependencies = [
692"checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc"
707"checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc"
693"checksum utf8-ranges 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "796f7e48bef87609f7ade7e06495a87d5cd06c7866e6a5cbfceffc558a243737"
708"checksum utf8-ranges 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "796f7e48bef87609f7ade7e06495a87d5cd06c7866e6a5cbfceffc558a243737"
694"checksum version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd"
709"checksum version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd"
695−"checksum wasm-bindgen 0.2.38 (registry+https://github.com/rust-lang/crates.io-index)" = "f7148f7446b911dd8e8d490a4fd44bf7fcd6caa21ba2fed9aef7bf34b9a974d4"
710+"checksum wasm-bindgen 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)" = "06e36714cc3947a9c80ddc9715edb319e445e5ab0d0b083debec0dd52558580e"
696−"checksum wasm-bindgen-backend 0.2.38 (registry+https://github.com/rust-lang/crates.io-index)" = "07b7b7e0a5c244e02469d7ad0f071dca0a01a7be217db41e4de5e05d4a1ab2ac"
711+"checksum wasm-bindgen-backend 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)" = "6764493f6eeb3f8632ffd418bf7db6a7e7aca98417c115833e4663976cd60a5e"
697−"checksum wasm-bindgen-futures 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)" = "ad790bdb3818ba6fba63d3a3fd65ab52ca7f601cad1c6c1feda66199b4e9f161"
712+"checksum wasm-bindgen-futures 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)" = "4327c859969477dbc2033bbbe3a6cc045cf155ef283ad9f3c2d804ba27d3fd9b"
698−"checksum wasm-bindgen-macro 0.2.38 (registry+https://github.com/rust-lang/crates.io-index)" = "e51818f0ab6cdef85125d2c2f1a89096370286fe229d24de89504617918d76af"
713+"checksum wasm-bindgen-macro 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)" = "a473501c40a2a4da83ae7176fead61f10d003554b701071a704dd0667397027a"
699−"checksum wasm-bindgen-macro-support 0.2.38 (registry+https://github.com/rust-lang/crates.io-index)" = "4770fd638bed46ce4669cb59aba4657e264839c24c568cc03d772849bfaed7eb"
714+"checksum wasm-bindgen-macro-support 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)" = "72e5a249738c6315f65ce5527632e2a3a067cdf1765422d8ac1572dcee14f819"
700−"checksum wasm-bindgen-shared 0.2.38 (registry+https://github.com/rust-lang/crates.io-index)" = "6f52047198d1887ffd4e508264bffbf92382a97c8b09b74781dbb11ee055ccc5"
715+"checksum wasm-bindgen-shared 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)" = "70f57643dac7decc3b53f0e4ffd027e225b79281648842eb46015e58a2400870"
701−"checksum wasm-bindgen-test 0.2.38 (registry+https://github.com/rust-lang/crates.io-index)" = "3f551eb8ad779620e0bb424f6936c87aaea8d93db72fc6d6292c179306773b6f"
716+"checksum wasm-bindgen-test 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)" = "c864512cd0031acd354ba9252c27e426d95f8e7776e877104d54b2eb482999ac"
702−"checksum wasm-bindgen-test-macro 0.2.38 (registry+https://github.com/rust-lang/crates.io-index)" = "5d7bf67f27d40d702d1c85778abaa354142b77ef00528b72127bb392b8db39e2"
717+"checksum wasm-bindgen-test-macro 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)" = "c9ec739799351a564254f1f8a7b2b5fdb4117e11c5ee68082e47301722d8973e"
703−"checksum wasm-bindgen-webidl 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)" = "264e2ff77974c11640a2c6a91435f645843d2bd7e12e3ce58ac74209e6d5f76d"
718+"checksum wasm-bindgen-webidl 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)" = "ef834a1f96cdc811875c00f20680bf15e038e0d0d458a82772afec5fe31ec7c1"
704−"checksum web-sys 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)" = "7a9c8ff79e13b74f47f438cd48de2ed808c419cd52ec4780dfc6d1de4a37be19"
719+"checksum web-sys 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)" = "a8286eada98bf34db48fc89ca53428c529a906bf161c6bae4e022f826323eb38"
705"checksum weedle 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "26a4c67f132386d965390b8a734d5d10adbcd30eb5cc74bd9229af8b83f10044"
720"checksum weedle 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "26a4c67f132386d965390b8a734d5d10adbcd30eb5cc74bd9229af8b83f10044"
706"checksum winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "92c1eb33641e276cfa214a0522acad57be5c56b10cb348b3c5117db75f3ac4b0"
721"checksum winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "92c1eb33641e276cfa214a0522acad57be5c56b10cb348b3c5117db75f3ac4b0"
707"checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
722"checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
Cargo.toml+1
@@ -64,5 +64,6 @@ members = [
64 "./examples/input-form",
64 "./examples/input-form",
65 "./examples/js-component",
65 "./examples/js-component",
66 "./examples/moire",
66 "./examples/moire",
67+ "./examples/sierpinski-triangle",
67 "./examples/todomvc",
68 "./examples/todomvc",
68]
69]
examples/sierpinski-triangle/Cargo.tomlnew file+29
@@ -0,0 +1,29 @@
1+[package]
2+name = "dodrio-sierpinski"
3+version = "0.1.0"
4+authors = ["Steven Seguin <steven.seguin@gmail.com>"]
5+edition = "2018"
6+
7+[lib]
8+crate-type = ["cdylib"]
9+
10+[dependencies]
11+dodrio = { path = "../.." }
12+wasm-bindgen = "0.2.39"
13+console_error_panic_hook = "0.1.6"
14+js-sys = "0.3.16"
15+wasm-bindgen-futures = "0.3.16"
16+futures = "0.1.25"
17+
18+[dependencies.web-sys]
19+version = "0.3.16"
20+features = [
21+ "Document",
22+ "HtmlElement",
23+ "Node",
24+ "Performance",
25+ "Window",
26+]
27+
28+[dev-dependencies]
29+wasm-bindgen-test = "0.2.39"
examples/sierpinski-triangle/README.mdnew file+24
@@ -0,0 +1,24 @@
1+# Sierpinski Triangle
2+
3+A Sierpinkski triangle that constantly shrinks and grows, and whose nodes have
4+a value that increments by one every second.
5+
6+Ported from the React Fiber example [here](https://github.com/claudiopro/react-fiber-vs-stack-demo).
7+
8+## Source
9+
10+See `src/lib.rs`.
11+
12+## Build
13+
14+```
15+wasm-pack build --target no-modules
16+```
17+
18+## Serve
19+
20+Use any HTTP server, for example:
21+
22+```
23+python -m http.server
24+```
examples/sierpinski-triangle/ferris.pngnew file

Binary file not shown.

examples/sierpinski-triangle/index.htmlnew file+69
@@ -0,0 +1,69 @@
1+<!DOCTYPE html>
2+<html>
3+
4+<head>
5+ <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
6+ <title>Sierpinski Triangle</title>
7+ <style>
8+ .container {
9+ position: absolute;
10+ transform-origin: 0 0;
11+ left: 50%;
12+ top: 50%;
13+ width: 10px;
14+ height: 10px;
15+ background: #eee;
16+ }
17+
18+ .dot {
19+ position: absolute;
20+ background: #61dafb;
21+ font: normal 15px sans-serif;
22+ text-align: center;
23+ cursor: pointer;
24+ }
25+
26+ .dot:hover {
27+ background: url("ferris.png") no-repeat center center;
28+ z-index: 999;
29+ }
30+
31+ code {
32+ position: relative;
33+ font-size: 150%;
34+ }
35+ </style>
36+</head>
37+
38+<body>
39+ <code>FPS: <output id="fps">...</output></code>
40+ <div id="scene"></div>
41+
42+ <script src="pkg/dodrio_sierpinski.js"></script>
43+ <script>
44+ wasm_bindgen("pkg/dodrio_sierpinski_bg.wasm");
45+ </script>
46+
47+ <script>
48+ let lastTime = 0;
49+ let frameCount = 0;
50+ const fps = document.getElementById('fps');
51+
52+ function updateFPS(time) {
53+ frameCount++;
54+ if (lastTime + 1000.0 <= time) {
55+ fps.textContent = frameCount;
56+ lastTime = time;
57+ frameCount = 0;
58+ }
59+ }
60+
61+ requestAnimationFrame(function loop(now) {
62+ updateFPS(now);
63+ requestAnimationFrame(loop);
64+ })
65+
66+ </script>
67+</body>
68+
69+</html>
examples/sierpinski-triangle/src/lib.rsnew file+175
@@ -0,0 +1,175 @@
1+use std::cell::RefCell;
2+use std::rc::Rc;
3+
4+use dodrio::bumpalo::{self, Bump};
5+use dodrio::{Node, Render, Vdom};
6+use wasm_bindgen::prelude::*;
7+use wasm_bindgen::JsCast;
8+use web_sys::Window;
9+
10+// Triangle container defining target size
11+struct Container {
12+ size: f64,
13+}
14+
15+impl Container {
16+ // Construct a new container
17+ pub fn new() -> Container {
18+ Container { size: 25.0 }
19+ }
20+
21+ // Generate the container style to fluctuate triangle width
22+ fn container_transform<'a, 'bump>(&'a self, bump: &'bump Bump, elapsed: f64) -> &'bump str
23+ where
24+ 'a: 'bump,
25+ {
26+ let t = elapsed % 10.0;
27+ let scale = 0.45 + (if t > 5.0 { 10.0 - t } else { t }) / 40.0;
28+ let transform = bumpalo::format!(
29+ in bump,
30+ "transform: scaleX({}) scaleY(0.7) translateZ(0.1px)",
31+ scale
32+ );
33+ transform.into_bump_str()
34+ }
35+
36+ // Generate the dot's position on the grid
37+ fn dot_style<'a, 'bump>(&'a self, bump: &'bump Bump, x: f64, y: f64) -> &'bump str
38+ where
39+ 'a: 'bump,
40+ {
41+ let s = self.size * 1.3;
42+ let radius = s / 2.0;
43+ let styles = bumpalo::format!(
44+ in bump,
45+ r#"
46+ width: {}px;
47+ height: {}px;
48+ left: {}px;
49+ top: {}px;
50+ border-radius: {}px;
51+ line-height: {}px;
52+ "#,
53+ s, s, x, y, radius, s
54+ );
55+ styles.into_bump_str()
56+ }
57+
58+ // Create a dot node
59+ fn dot<'a, 'bump>(&'a self, bump: &'bump Bump, x: f64, y: f64, content: u32) -> Node<'bump>
60+ where
61+ 'a: 'bump,
62+ {
63+ use dodrio::builder::{div, text};
64+
65+ div(bump)
66+ .attr("class", "dot")
67+ .attr("style", self.dot_style(bump, x, y))
68+ .child(text(
69+ bumpalo::format!(in bump, "{}", content).into_bump_str(),
70+ ))
71+ .finish()
72+ }
73+
74+ // Create a flattened vector of dot nodes (arranged in recursive triangles)
75+ fn triangle<'a, 'bump>(
76+ &'a self,
77+ bump: &'bump Bump,
78+ x: f64,
79+ y: f64,
80+ s: f64,
81+ content: u32,
82+ ) -> Vec<Node<'bump>>
83+ where
84+ 'a: 'bump,
85+ {
86+ if s <= self.size {
87+ return vec![self.dot(bump, x, y, content)];
88+ }
89+
90+ let s = s / 2.0;
91+
92+ vec![
93+ // Top of triangle
94+ self.triangle(bump, x, y - (s / 2.0), s, content),
95+ // Bottom-left of triangle
96+ self.triangle(bump, x - s, y + (s / 2.0), s, content),
97+ // Bottom-right of triangle
98+ self.triangle(bump, x + s, y + (s / 2.0), s, content),
99+ ]
100+ .into_iter()
101+ .flatten()
102+ .collect()
103+ }
104+}
105+
106+impl Render for Container {
107+ fn render<'a, 'bump>(&'a self, bump: &'bump Bump) -> Node<'bump>
108+ where
109+ 'a: 'bump,
110+ {
111+ use dodrio::builder::div;
112+
113+ let elapsed = web_sys::window()
114+ .unwrap_throw()
115+ .performance()
116+ .unwrap_throw()
117+ .now()
118+ / 1000.0;
119+
120+ let modulus = elapsed as u32 % 10;
121+
122+ div(bump)
123+ .attr("class", "container")
124+ .attr("style", self.container_transform(bump, elapsed))
125+ .children(self.triangle(bump, 0.0, 0.0, 1000.0, modulus))
126+ .finish()
127+ }
128+}
129+
130+// Kick off a loop that keeps re-rendering on every animation frame.
131+fn animate(window: Window, vdom: Vdom) {
132+ let rc: Rc<RefCell<Option<Closure<FnMut()>>>> = Rc::new(RefCell::new(None));
133+ let rc2 = rc.clone();
134+ let window2 = window.clone();
135+ let weak = vdom.weak();
136+ let f = Closure::wrap(Box::new(move || {
137+ weak.schedule_render();
138+ window
139+ .request_animation_frame(
140+ rc.borrow()
141+ .as_ref()
142+ .unwrap_throw()
143+ .as_ref()
144+ .unchecked_ref::<js_sys::Function>(),
145+ )
146+ .unwrap_throw();
147+ }) as Box<FnMut()>);
148+ window2
149+ .request_animation_frame(f.as_ref().unchecked_ref::<js_sys::Function>())
150+ .unwrap_throw();
151+ *rc2.borrow_mut() = Some(f);
152+
153+ // Run the virtual DOM and its listeners forever.
154+ vdom.forget();
155+}
156+
157+#[wasm_bindgen(start)]
158+pub fn run() {
159+ // Set up the panic hook
160+ console_error_panic_hook::set_once();
161+
162+ // Get the scene element to render within
163+ let window = web_sys::window().unwrap();
164+ let document = window.document().unwrap();
165+ let scene = document.get_element_by_id("scene").unwrap();
166+
167+ // Construct a new Container component.
168+ let container = Container::new();
169+
170+ // Mount our container component to the scene div.
171+ let vdom = Vdom::new(&scene, container);
172+
173+ // Kick off animation loop
174+ animate(window, vdom);
175+}