├── .gitignore ├── Cargo.lock ├── Cargo.toml ├── README.md ├── app.rs ├── attribute_value.rs ├── client ├── element.rs ├── fragment.rs ├── mod.rs ├── node.rs ├── signal.rs ├── signal_vec.rs └── text.rs ├── component.rs ├── dehydrate.rs ├── elements ├── html.rs ├── macro │ ├── Cargo.toml │ ├── element.rs │ └── lib.rs ├── mathml.rs ├── mod.rs └── svg.rs ├── examples └── counter │ ├── .gitignore │ ├── Cargo.toml │ ├── README.md │ ├── index.html │ └── main.rs ├── hydrate.rs ├── lib.rs ├── macro ├── Cargo.toml ├── builder.rs ├── children.rs ├── lib.rs └── new.rs ├── option_string_value.rs ├── rustfmt.toml ├── server ├── element.rs ├── fragment.rs ├── mod.rs ├── node.rs ├── signal.rs ├── signal_vec.rs └── text.rs └── string_value.rs /.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "bumpalo" 7 | version = "3.9.1" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "a4a45a46ab1f2412e53d3a0ade76ffad2025804294569aae387231a0cd6e0899" 10 | 11 | [[package]] 12 | name = "cfg-if" 13 | version = "1.0.0" 14 | source = "registry+https://github.com/rust-lang/crates.io-index" 15 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 16 | 17 | [[package]] 18 | name = "discard" 19 | version = "1.0.4" 20 | source = "registry+https://github.com/rust-lang/crates.io-index" 21 | checksum = "212d0f5754cb6769937f4501cc0e67f4f4483c8d2c3e1e922ee9edbe4ab4c7c0" 22 | 23 | [[package]] 24 | name = "futures" 25 | version = "0.3.21" 26 | source = "registry+https://github.com/rust-lang/crates.io-index" 27 | checksum = "f73fe65f54d1e12b726f517d3e2135ca3125a437b6d998caf1962961f7172d9e" 28 | dependencies = [ 29 | "futures-channel", 30 | "futures-core", 31 | "futures-executor", 32 | "futures-io", 33 | "futures-sink", 34 | "futures-task", 35 | "futures-util", 36 | ] 37 | 38 | [[package]] 39 | name = "futures-channel" 40 | version = "0.3.21" 41 | source = "registry+https://github.com/rust-lang/crates.io-index" 42 | checksum = "c3083ce4b914124575708913bca19bfe887522d6e2e6d0952943f5eac4a74010" 43 | dependencies = [ 44 | "futures-core", 45 | "futures-sink", 46 | ] 47 | 48 | [[package]] 49 | name = "futures-core" 50 | version = "0.3.21" 51 | source = "registry+https://github.com/rust-lang/crates.io-index" 52 | checksum = "0c09fd04b7e4073ac7156a9539b57a484a8ea920f79c7c675d05d289ab6110d3" 53 | 54 | [[package]] 55 | name = "futures-executor" 56 | version = "0.3.21" 57 | source = "registry+https://github.com/rust-lang/crates.io-index" 58 | checksum = "9420b90cfa29e327d0429f19be13e7ddb68fa1cccb09d65e5706b8c7a749b8a6" 59 | dependencies = [ 60 | "futures-core", 61 | "futures-task", 62 | "futures-util", 63 | ] 64 | 65 | [[package]] 66 | name = "futures-io" 67 | version = "0.3.21" 68 | source = "registry+https://github.com/rust-lang/crates.io-index" 69 | checksum = "fc4045962a5a5e935ee2fdedaa4e08284547402885ab326734432bed5d12966b" 70 | 71 | [[package]] 72 | name = "futures-macro" 73 | version = "0.3.21" 74 | source = "registry+https://github.com/rust-lang/crates.io-index" 75 | checksum = "33c1e13800337f4d4d7a316bf45a567dbcb6ffe087f16424852d97e97a91f512" 76 | dependencies = [ 77 | "proc-macro2", 78 | "quote", 79 | "syn", 80 | ] 81 | 82 | [[package]] 83 | name = "futures-signals" 84 | version = "0.3.28" 85 | source = "registry+https://github.com/rust-lang/crates.io-index" 86 | checksum = "633f5e17d6fb8d3cfa0710087d0cbe708d07cc416ca6c4682ce876aa7839c09d" 87 | dependencies = [ 88 | "discard", 89 | "futures-channel", 90 | "futures-core", 91 | "futures-util", 92 | "log", 93 | "pin-project", 94 | "serde", 95 | ] 96 | 97 | [[package]] 98 | name = "futures-sink" 99 | version = "0.3.21" 100 | source = "registry+https://github.com/rust-lang/crates.io-index" 101 | checksum = "21163e139fa306126e6eedaf49ecdb4588f939600f0b1e770f4205ee4b7fa868" 102 | 103 | [[package]] 104 | name = "futures-task" 105 | version = "0.3.21" 106 | source = "registry+https://github.com/rust-lang/crates.io-index" 107 | checksum = "57c66a976bf5909d801bbef33416c41372779507e7a6b3a5e25e4749c58f776a" 108 | 109 | [[package]] 110 | name = "futures-util" 111 | version = "0.3.21" 112 | source = "registry+https://github.com/rust-lang/crates.io-index" 113 | checksum = "d8b7abd5d659d9b90c8cba917f6ec750a74e2dc23902ef9cd4cc8c8b22e6036a" 114 | dependencies = [ 115 | "futures-channel", 116 | "futures-core", 117 | "futures-io", 118 | "futures-macro", 119 | "futures-sink", 120 | "futures-task", 121 | "memchr", 122 | "pin-project-lite", 123 | "pin-utils", 124 | "slab", 125 | ] 126 | 127 | [[package]] 128 | name = "heck" 129 | version = "0.3.3" 130 | source = "registry+https://github.com/rust-lang/crates.io-index" 131 | checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" 132 | dependencies = [ 133 | "unicode-segmentation", 134 | ] 135 | 136 | [[package]] 137 | name = "itoa" 138 | version = "1.0.2" 139 | source = "registry+https://github.com/rust-lang/crates.io-index" 140 | checksum = "112c678d4050afce233f4f2852bb2eb519230b3cf12f33585275537d7e41578d" 141 | 142 | [[package]] 143 | name = "js-sys" 144 | version = "0.3.50" 145 | source = "registry+https://github.com/rust-lang/crates.io-index" 146 | checksum = "2d99f9e3e84b8f67f846ef5b4cbbc3b1c29f6c759fcbce6f01aa0e73d932a24c" 147 | dependencies = [ 148 | "wasm-bindgen", 149 | ] 150 | 151 | [[package]] 152 | name = "lazy_static" 153 | version = "1.4.0" 154 | source = "registry+https://github.com/rust-lang/crates.io-index" 155 | checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" 156 | 157 | [[package]] 158 | name = "log" 159 | version = "0.4.17" 160 | source = "registry+https://github.com/rust-lang/crates.io-index" 161 | checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" 162 | dependencies = [ 163 | "cfg-if", 164 | ] 165 | 166 | [[package]] 167 | name = "memchr" 168 | version = "2.5.0" 169 | source = "registry+https://github.com/rust-lang/crates.io-index" 170 | checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" 171 | 172 | [[package]] 173 | name = "pin-project" 174 | version = "1.0.10" 175 | source = "registry+https://github.com/rust-lang/crates.io-index" 176 | checksum = "58ad3879ad3baf4e44784bc6a718a8698867bb991f8ce24d1bcbe2cfb4c3a75e" 177 | dependencies = [ 178 | "pin-project-internal", 179 | ] 180 | 181 | [[package]] 182 | name = "pin-project-internal" 183 | version = "1.0.10" 184 | source = "registry+https://github.com/rust-lang/crates.io-index" 185 | checksum = "744b6f092ba29c3650faf274db506afd39944f48420f6c86b17cfe0ee1cb36bb" 186 | dependencies = [ 187 | "proc-macro2", 188 | "quote", 189 | "syn", 190 | ] 191 | 192 | [[package]] 193 | name = "pin-project-lite" 194 | version = "0.2.9" 195 | source = "registry+https://github.com/rust-lang/crates.io-index" 196 | checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" 197 | 198 | [[package]] 199 | name = "pin-utils" 200 | version = "0.1.0" 201 | source = "registry+https://github.com/rust-lang/crates.io-index" 202 | checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" 203 | 204 | [[package]] 205 | name = "pinwheel" 206 | version = "0.2.0" 207 | dependencies = [ 208 | "futures", 209 | "futures-signals", 210 | "pin-project", 211 | "pinwheel_elements_macro", 212 | "pinwheel_macro", 213 | "serde", 214 | "serde_json", 215 | "tracing", 216 | "wasm-bindgen", 217 | "wasm-bindgen-futures", 218 | "web-sys", 219 | ] 220 | 221 | [[package]] 222 | name = "pinwheel_counter" 223 | version = "0.0.0" 224 | dependencies = [ 225 | "pinwheel", 226 | "wasm-bindgen", 227 | "web-sys", 228 | ] 229 | 230 | [[package]] 231 | name = "pinwheel_elements_macro" 232 | version = "0.2.0" 233 | dependencies = [ 234 | "heck", 235 | "proc-macro2", 236 | "quote", 237 | "syn", 238 | ] 239 | 240 | [[package]] 241 | name = "pinwheel_macro" 242 | version = "0.2.1" 243 | dependencies = [ 244 | "heck", 245 | "proc-macro2", 246 | "quote", 247 | "syn", 248 | ] 249 | 250 | [[package]] 251 | name = "proc-macro2" 252 | version = "1.0.38" 253 | source = "registry+https://github.com/rust-lang/crates.io-index" 254 | checksum = "9027b48e9d4c9175fa2218adf3557f91c1137021739951d4932f5f8268ac48aa" 255 | dependencies = [ 256 | "unicode-xid", 257 | ] 258 | 259 | [[package]] 260 | name = "quote" 261 | version = "1.0.18" 262 | source = "registry+https://github.com/rust-lang/crates.io-index" 263 | checksum = "a1feb54ed693b93a84e14094943b84b7c4eae204c512b7ccb95ab0c66d278ad1" 264 | dependencies = [ 265 | "proc-macro2", 266 | ] 267 | 268 | [[package]] 269 | name = "ryu" 270 | version = "1.0.10" 271 | source = "registry+https://github.com/rust-lang/crates.io-index" 272 | checksum = "f3f6f92acf49d1b98f7a81226834412ada05458b7364277387724a237f062695" 273 | 274 | [[package]] 275 | name = "serde" 276 | version = "1.0.137" 277 | source = "registry+https://github.com/rust-lang/crates.io-index" 278 | checksum = "61ea8d54c77f8315140a05f4c7237403bf38b72704d031543aa1d16abbf517d1" 279 | 280 | [[package]] 281 | name = "serde_json" 282 | version = "1.0.81" 283 | source = "registry+https://github.com/rust-lang/crates.io-index" 284 | checksum = "9b7ce2b32a1aed03c558dc61a5cd328f15aff2dbc17daad8fb8af04d2100e15c" 285 | dependencies = [ 286 | "itoa", 287 | "ryu", 288 | "serde", 289 | ] 290 | 291 | [[package]] 292 | name = "slab" 293 | version = "0.4.6" 294 | source = "registry+https://github.com/rust-lang/crates.io-index" 295 | checksum = "eb703cfe953bccee95685111adeedb76fabe4e97549a58d16f03ea7b9367bb32" 296 | 297 | [[package]] 298 | name = "syn" 299 | version = "1.0.94" 300 | source = "registry+https://github.com/rust-lang/crates.io-index" 301 | checksum = "a07e33e919ebcd69113d5be0e4d70c5707004ff45188910106854f38b960df4a" 302 | dependencies = [ 303 | "proc-macro2", 304 | "quote", 305 | "unicode-xid", 306 | ] 307 | 308 | [[package]] 309 | name = "tracing" 310 | version = "0.1.34" 311 | source = "registry+https://github.com/rust-lang/crates.io-index" 312 | checksum = "5d0ecdcb44a79f0fe9844f0c4f33a342cbcbb5117de8001e6ba0dc2351327d09" 313 | dependencies = [ 314 | "cfg-if", 315 | "pin-project-lite", 316 | "tracing-attributes", 317 | "tracing-core", 318 | ] 319 | 320 | [[package]] 321 | name = "tracing-attributes" 322 | version = "0.1.21" 323 | source = "registry+https://github.com/rust-lang/crates.io-index" 324 | checksum = "cc6b8ad3567499f98a1db7a752b07a7c8c7c7c34c332ec00effb2b0027974b7c" 325 | dependencies = [ 326 | "proc-macro2", 327 | "quote", 328 | "syn", 329 | ] 330 | 331 | [[package]] 332 | name = "tracing-core" 333 | version = "0.1.26" 334 | source = "registry+https://github.com/rust-lang/crates.io-index" 335 | checksum = "f54c8ca710e81886d498c2fd3331b56c93aa248d49de2222ad2742247c60072f" 336 | dependencies = [ 337 | "lazy_static", 338 | ] 339 | 340 | [[package]] 341 | name = "unicode-segmentation" 342 | version = "1.9.0" 343 | source = "registry+https://github.com/rust-lang/crates.io-index" 344 | checksum = "7e8820f5d777f6224dc4be3632222971ac30164d4a258d595640799554ebfd99" 345 | 346 | [[package]] 347 | name = "unicode-xid" 348 | version = "0.2.3" 349 | source = "registry+https://github.com/rust-lang/crates.io-index" 350 | checksum = "957e51f3646910546462e67d5f7599b9e4fb8acdd304b087a6494730f9eebf04" 351 | 352 | [[package]] 353 | name = "wasm-bindgen" 354 | version = "0.2.73" 355 | source = "registry+https://github.com/rust-lang/crates.io-index" 356 | checksum = "83240549659d187488f91f33c0f8547cbfef0b2088bc470c116d1d260ef623d9" 357 | dependencies = [ 358 | "cfg-if", 359 | "wasm-bindgen-macro", 360 | ] 361 | 362 | [[package]] 363 | name = "wasm-bindgen-backend" 364 | version = "0.2.73" 365 | source = "registry+https://github.com/rust-lang/crates.io-index" 366 | checksum = "ae70622411ca953215ca6d06d3ebeb1e915f0f6613e3b495122878d7ebec7dae" 367 | dependencies = [ 368 | "bumpalo", 369 | "lazy_static", 370 | "log", 371 | "proc-macro2", 372 | "quote", 373 | "syn", 374 | "wasm-bindgen-shared", 375 | ] 376 | 377 | [[package]] 378 | name = "wasm-bindgen-futures" 379 | version = "0.4.23" 380 | source = "registry+https://github.com/rust-lang/crates.io-index" 381 | checksum = "81b8b767af23de6ac18bf2168b690bed2902743ddf0fb39252e36f9e2bfc63ea" 382 | dependencies = [ 383 | "cfg-if", 384 | "js-sys", 385 | "wasm-bindgen", 386 | "web-sys", 387 | ] 388 | 389 | [[package]] 390 | name = "wasm-bindgen-macro" 391 | version = "0.2.73" 392 | source = "registry+https://github.com/rust-lang/crates.io-index" 393 | checksum = "3e734d91443f177bfdb41969de821e15c516931c3c3db3d318fa1b68975d0f6f" 394 | dependencies = [ 395 | "quote", 396 | "wasm-bindgen-macro-support", 397 | ] 398 | 399 | [[package]] 400 | name = "wasm-bindgen-macro-support" 401 | version = "0.2.73" 402 | source = "registry+https://github.com/rust-lang/crates.io-index" 403 | checksum = "d53739ff08c8a68b0fdbcd54c372b8ab800b1449ab3c9d706503bc7dd1621b2c" 404 | dependencies = [ 405 | "proc-macro2", 406 | "quote", 407 | "syn", 408 | "wasm-bindgen-backend", 409 | "wasm-bindgen-shared", 410 | ] 411 | 412 | [[package]] 413 | name = "wasm-bindgen-shared" 414 | version = "0.2.73" 415 | source = "registry+https://github.com/rust-lang/crates.io-index" 416 | checksum = "d9a543ae66aa233d14bb765ed9af4a33e81b8b58d1584cf1b47ff8cd0b9e4489" 417 | 418 | [[package]] 419 | name = "web-sys" 420 | version = "0.3.50" 421 | source = "registry+https://github.com/rust-lang/crates.io-index" 422 | checksum = "a905d57e488fec8861446d3393670fb50d27a262344013181c2cdf9fff5481be" 423 | dependencies = [ 424 | "js-sys", 425 | "wasm-bindgen", 426 | ] 427 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [workspace] 2 | members = [ 3 | "macro", 4 | "elements/macro", 5 | "examples/counter", 6 | ] 7 | 8 | [package] 9 | authors = ["Tangram ` each time a `