├── .gitignore ├── Cargo.lock ├── Cargo.toml ├── README.md ├── examples └── lorenz.rs ├── shell.nix └── src ├── lib.rs └── line_shader.wgsl /.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 = "ab_glyph" 7 | version = "0.2.17" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "04a9283dace1c41c265496614998d5b9c4a97b3eb770e804f007c5144bf03f2b" 10 | dependencies = [ 11 | "ab_glyph_rasterizer", 12 | "owned_ttf_parser", 13 | ] 14 | 15 | [[package]] 16 | name = "ab_glyph_rasterizer" 17 | version = "0.1.7" 18 | source = "registry+https://github.com/rust-lang/crates.io-index" 19 | checksum = "330223a1aecc308757b9926e9391c9b47f8ef2dbd8aea9df88312aea18c5e8d6" 20 | 21 | [[package]] 22 | name = "adler" 23 | version = "1.0.2" 24 | source = "registry+https://github.com/rust-lang/crates.io-index" 25 | checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" 26 | 27 | [[package]] 28 | name = "ahash" 29 | version = "0.7.6" 30 | source = "registry+https://github.com/rust-lang/crates.io-index" 31 | checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" 32 | dependencies = [ 33 | "getrandom", 34 | "once_cell", 35 | "version_check", 36 | ] 37 | 38 | [[package]] 39 | name = "ahash" 40 | version = "0.8.0" 41 | source = "registry+https://github.com/rust-lang/crates.io-index" 42 | checksum = "57e6e951cfbb2db8de1828d49073a113a29fd7117b1596caa781a258c7e38d72" 43 | dependencies = [ 44 | "cfg-if", 45 | "getrandom", 46 | "once_cell", 47 | "version_check", 48 | ] 49 | 50 | [[package]] 51 | name = "android_system_properties" 52 | version = "0.1.5" 53 | source = "registry+https://github.com/rust-lang/crates.io-index" 54 | checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" 55 | dependencies = [ 56 | "libc", 57 | ] 58 | 59 | [[package]] 60 | name = "arboard" 61 | version = "3.1.0" 62 | source = "registry+https://github.com/rust-lang/crates.io-index" 63 | checksum = "79e8af4eff708b72e371acd4625ad3d01a88c946b9e8d6868cb5bb6e4d0d923c" 64 | dependencies = [ 65 | "clipboard-win", 66 | "log", 67 | "objc", 68 | "objc-foundation", 69 | "objc_id", 70 | "once_cell", 71 | "parking_lot", 72 | "thiserror", 73 | "winapi", 74 | "x11rb", 75 | ] 76 | 77 | [[package]] 78 | name = "arrayref" 79 | version = "0.3.6" 80 | source = "registry+https://github.com/rust-lang/crates.io-index" 81 | checksum = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544" 82 | 83 | [[package]] 84 | name = "arrayvec" 85 | version = "0.5.2" 86 | source = "registry+https://github.com/rust-lang/crates.io-index" 87 | checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" 88 | 89 | [[package]] 90 | name = "arrayvec" 91 | version = "0.7.2" 92 | source = "registry+https://github.com/rust-lang/crates.io-index" 93 | checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" 94 | 95 | [[package]] 96 | name = "ash" 97 | version = "0.37.0+1.3.209" 98 | source = "registry+https://github.com/rust-lang/crates.io-index" 99 | checksum = "006ca68e0f2b03f22d6fa9f2860f85aed430d257fec20f8879b2145e7c7ae1a6" 100 | dependencies = [ 101 | "libloading", 102 | ] 103 | 104 | [[package]] 105 | name = "atomic_refcell" 106 | version = "0.1.8" 107 | source = "registry+https://github.com/rust-lang/crates.io-index" 108 | checksum = "73b5e5f48b927f04e952dedc932f31995a65a0bf65ec971c74436e51bf6e970d" 109 | 110 | [[package]] 111 | name = "autocfg" 112 | version = "1.1.0" 113 | source = "registry+https://github.com/rust-lang/crates.io-index" 114 | checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" 115 | 116 | [[package]] 117 | name = "bit-set" 118 | version = "0.5.3" 119 | source = "registry+https://github.com/rust-lang/crates.io-index" 120 | checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" 121 | dependencies = [ 122 | "bit-vec", 123 | ] 124 | 125 | [[package]] 126 | name = "bit-vec" 127 | version = "0.6.3" 128 | source = "registry+https://github.com/rust-lang/crates.io-index" 129 | checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" 130 | 131 | [[package]] 132 | name = "bitflags" 133 | version = "1.3.2" 134 | source = "registry+https://github.com/rust-lang/crates.io-index" 135 | checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" 136 | 137 | [[package]] 138 | name = "block" 139 | version = "0.1.6" 140 | source = "registry+https://github.com/rust-lang/crates.io-index" 141 | checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" 142 | 143 | [[package]] 144 | name = "bumpalo" 145 | version = "3.11.0" 146 | source = "registry+https://github.com/rust-lang/crates.io-index" 147 | checksum = "c1ad822118d20d2c234f427000d5acc36eabe1e29a348c89b63dd60b13f28e5d" 148 | 149 | [[package]] 150 | name = "bytemuck" 151 | version = "1.12.1" 152 | source = "registry+https://github.com/rust-lang/crates.io-index" 153 | checksum = "2f5715e491b5a1598fc2bef5a606847b5dc1d48ea625bd3c02c00de8285591da" 154 | dependencies = [ 155 | "bytemuck_derive", 156 | ] 157 | 158 | [[package]] 159 | name = "bytemuck_derive" 160 | version = "1.2.1" 161 | source = "registry+https://github.com/rust-lang/crates.io-index" 162 | checksum = "1b9e1f5fa78f69496407a27ae9ed989e3c3b072310286f5ef385525e4cbc24a9" 163 | dependencies = [ 164 | "proc-macro2", 165 | "quote", 166 | "syn", 167 | ] 168 | 169 | [[package]] 170 | name = "byteorder" 171 | version = "1.4.3" 172 | source = "registry+https://github.com/rust-lang/crates.io-index" 173 | checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" 174 | 175 | [[package]] 176 | name = "bytes" 177 | version = "1.2.1" 178 | source = "registry+https://github.com/rust-lang/crates.io-index" 179 | checksum = "ec8a7b6a70fde80372154c65702f00a0f56f3e1c36abbc6c440484be248856db" 180 | 181 | [[package]] 182 | name = "calloop" 183 | version = "0.10.1" 184 | source = "registry+https://github.com/rust-lang/crates.io-index" 185 | checksum = "a22a6a8f622f797120d452c630b0ab12e1331a1a753e2039ce7868d4ac77b4ee" 186 | dependencies = [ 187 | "log", 188 | "nix", 189 | "slotmap", 190 | "thiserror", 191 | "vec_map", 192 | ] 193 | 194 | [[package]] 195 | name = "cc" 196 | version = "1.0.73" 197 | source = "registry+https://github.com/rust-lang/crates.io-index" 198 | checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11" 199 | 200 | [[package]] 201 | name = "cesu8" 202 | version = "1.1.0" 203 | source = "registry+https://github.com/rust-lang/crates.io-index" 204 | checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" 205 | 206 | [[package]] 207 | name = "cfg-if" 208 | version = "1.0.0" 209 | source = "registry+https://github.com/rust-lang/crates.io-index" 210 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 211 | 212 | [[package]] 213 | name = "cfg_aliases" 214 | version = "0.1.1" 215 | source = "registry+https://github.com/rust-lang/crates.io-index" 216 | checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" 217 | 218 | [[package]] 219 | name = "cgl" 220 | version = "0.3.2" 221 | source = "registry+https://github.com/rust-lang/crates.io-index" 222 | checksum = "0ced0551234e87afee12411d535648dd89d2e7f34c78b753395567aff3d447ff" 223 | dependencies = [ 224 | "libc", 225 | ] 226 | 227 | [[package]] 228 | name = "clipboard-win" 229 | version = "4.4.2" 230 | source = "registry+https://github.com/rust-lang/crates.io-index" 231 | checksum = "c4ab1b92798304eedc095b53942963240037c0516452cb11aeba709d420b2219" 232 | dependencies = [ 233 | "error-code", 234 | "str-buf", 235 | "winapi", 236 | ] 237 | 238 | [[package]] 239 | name = "cmake" 240 | version = "0.1.48" 241 | source = "registry+https://github.com/rust-lang/crates.io-index" 242 | checksum = "e8ad8cef104ac57b68b89df3208164d228503abbdce70f6880ffa3d970e7443a" 243 | dependencies = [ 244 | "cc", 245 | ] 246 | 247 | [[package]] 248 | name = "cocoa" 249 | version = "0.24.0" 250 | source = "registry+https://github.com/rust-lang/crates.io-index" 251 | checksum = "6f63902e9223530efb4e26ccd0cf55ec30d592d3b42e21a28defc42a9586e832" 252 | dependencies = [ 253 | "bitflags", 254 | "block", 255 | "cocoa-foundation", 256 | "core-foundation", 257 | "core-graphics", 258 | "foreign-types 0.3.2", 259 | "libc", 260 | "objc", 261 | ] 262 | 263 | [[package]] 264 | name = "cocoa-foundation" 265 | version = "0.1.0" 266 | source = "registry+https://github.com/rust-lang/crates.io-index" 267 | checksum = "7ade49b65d560ca58c403a479bb396592b155c0185eada742ee323d1d68d6318" 268 | dependencies = [ 269 | "bitflags", 270 | "block", 271 | "core-foundation", 272 | "core-graphics-types", 273 | "foreign-types 0.3.2", 274 | "libc", 275 | "objc", 276 | ] 277 | 278 | [[package]] 279 | name = "codespan-reporting" 280 | version = "0.11.1" 281 | source = "registry+https://github.com/rust-lang/crates.io-index" 282 | checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" 283 | dependencies = [ 284 | "termcolor", 285 | "unicode-width", 286 | ] 287 | 288 | [[package]] 289 | name = "combine" 290 | version = "4.6.6" 291 | source = "registry+https://github.com/rust-lang/crates.io-index" 292 | checksum = "35ed6e9d84f0b51a7f52daf1c7d71dd136fd7a3f41a8462b8cdb8c78d920fad4" 293 | dependencies = [ 294 | "bytes", 295 | "memchr", 296 | ] 297 | 298 | [[package]] 299 | name = "copyless" 300 | version = "0.1.5" 301 | source = "registry+https://github.com/rust-lang/crates.io-index" 302 | checksum = "a2df960f5d869b2dd8532793fde43eb5427cceb126c929747a26823ab0eeb536" 303 | 304 | [[package]] 305 | name = "core-foundation" 306 | version = "0.9.3" 307 | source = "registry+https://github.com/rust-lang/crates.io-index" 308 | checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" 309 | dependencies = [ 310 | "core-foundation-sys", 311 | "libc", 312 | ] 313 | 314 | [[package]] 315 | name = "core-foundation-sys" 316 | version = "0.8.3" 317 | source = "registry+https://github.com/rust-lang/crates.io-index" 318 | checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" 319 | 320 | [[package]] 321 | name = "core-graphics" 322 | version = "0.22.3" 323 | source = "registry+https://github.com/rust-lang/crates.io-index" 324 | checksum = "2581bbab3b8ffc6fcbd550bf46c355135d16e9ff2a6ea032ad6b9bf1d7efe4fb" 325 | dependencies = [ 326 | "bitflags", 327 | "core-foundation", 328 | "core-graphics-types", 329 | "foreign-types 0.3.2", 330 | "libc", 331 | ] 332 | 333 | [[package]] 334 | name = "core-graphics-types" 335 | version = "0.1.1" 336 | source = "registry+https://github.com/rust-lang/crates.io-index" 337 | checksum = "3a68b68b3446082644c91ac778bf50cd4104bfb002b5a6a7c44cca5a2c70788b" 338 | dependencies = [ 339 | "bitflags", 340 | "core-foundation", 341 | "foreign-types 0.3.2", 342 | "libc", 343 | ] 344 | 345 | [[package]] 346 | name = "core-text" 347 | version = "19.2.0" 348 | source = "registry+https://github.com/rust-lang/crates.io-index" 349 | checksum = "99d74ada66e07c1cefa18f8abfba765b486f250de2e4a999e5727fc0dd4b4a25" 350 | dependencies = [ 351 | "core-foundation", 352 | "core-graphics", 353 | "foreign-types 0.3.2", 354 | "libc", 355 | ] 356 | 357 | [[package]] 358 | name = "crc32fast" 359 | version = "1.3.2" 360 | source = "registry+https://github.com/rust-lang/crates.io-index" 361 | checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" 362 | dependencies = [ 363 | "cfg-if", 364 | ] 365 | 366 | [[package]] 367 | name = "crossfont" 368 | version = "0.5.0" 369 | source = "registry+https://github.com/rust-lang/crates.io-index" 370 | checksum = "f66b1c1979c4362323f03ab6bf7fb522902bfc418e0c37319ab347f9561d980f" 371 | dependencies = [ 372 | "cocoa", 373 | "core-foundation", 374 | "core-foundation-sys", 375 | "core-graphics", 376 | "core-text", 377 | "dwrote", 378 | "foreign-types 0.5.0", 379 | "freetype-rs", 380 | "libc", 381 | "log", 382 | "objc", 383 | "once_cell", 384 | "pkg-config", 385 | "servo-fontconfig", 386 | "winapi", 387 | ] 388 | 389 | [[package]] 390 | name = "cty" 391 | version = "0.2.2" 392 | source = "registry+https://github.com/rust-lang/crates.io-index" 393 | checksum = "b365fabc795046672053e29c954733ec3b05e4be654ab130fe8f1f94d7051f35" 394 | 395 | [[package]] 396 | name = "d3d12" 397 | version = "0.5.0" 398 | source = "registry+https://github.com/rust-lang/crates.io-index" 399 | checksum = "827914e1f53b1e0e025ecd3d967a7836b7bcb54520f90e21ef8df7b4d88a2759" 400 | dependencies = [ 401 | "bitflags", 402 | "libloading", 403 | "winapi", 404 | ] 405 | 406 | [[package]] 407 | name = "darling" 408 | version = "0.13.4" 409 | source = "registry+https://github.com/rust-lang/crates.io-index" 410 | checksum = "a01d95850c592940db9b8194bc39f4bc0e89dee5c4265e4b1807c34a9aba453c" 411 | dependencies = [ 412 | "darling_core", 413 | "darling_macro", 414 | ] 415 | 416 | [[package]] 417 | name = "darling_core" 418 | version = "0.13.4" 419 | source = "registry+https://github.com/rust-lang/crates.io-index" 420 | checksum = "859d65a907b6852c9361e3185c862aae7fafd2887876799fa55f5f99dc40d610" 421 | dependencies = [ 422 | "fnv", 423 | "ident_case", 424 | "proc-macro2", 425 | "quote", 426 | "strsim", 427 | "syn", 428 | ] 429 | 430 | [[package]] 431 | name = "darling_macro" 432 | version = "0.13.4" 433 | source = "registry+https://github.com/rust-lang/crates.io-index" 434 | checksum = "9c972679f83bdf9c42bd905396b6c3588a843a17f0f16dfcfa3e2c5d57441835" 435 | dependencies = [ 436 | "darling_core", 437 | "quote", 438 | "syn", 439 | ] 440 | 441 | [[package]] 442 | name = "dispatch" 443 | version = "0.2.0" 444 | source = "registry+https://github.com/rust-lang/crates.io-index" 445 | checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b" 446 | 447 | [[package]] 448 | name = "dlib" 449 | version = "0.5.0" 450 | source = "registry+https://github.com/rust-lang/crates.io-index" 451 | checksum = "ac1b7517328c04c2aa68422fc60a41b92208182142ed04a25879c26c8f878794" 452 | dependencies = [ 453 | "libloading", 454 | ] 455 | 456 | [[package]] 457 | name = "downcast-rs" 458 | version = "1.2.0" 459 | source = "registry+https://github.com/rust-lang/crates.io-index" 460 | checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" 461 | 462 | [[package]] 463 | name = "dwrote" 464 | version = "0.11.0" 465 | source = "registry+https://github.com/rust-lang/crates.io-index" 466 | checksum = "439a1c2ba5611ad3ed731280541d36d2e9c4ac5e7fb818a27b604bdc5a6aa65b" 467 | dependencies = [ 468 | "lazy_static", 469 | "libc", 470 | "serde", 471 | "serde_derive", 472 | "winapi", 473 | "wio", 474 | ] 475 | 476 | [[package]] 477 | name = "eframe" 478 | version = "0.19.0" 479 | source = "git+https://github.com/emilk/egui#29fa63317ea4f950a098be6240efc65c14b8c7a5" 480 | dependencies = [ 481 | "bytemuck", 482 | "egui", 483 | "egui-wgpu", 484 | "egui-winit", 485 | "egui_glow", 486 | "getrandom", 487 | "glow", 488 | "glutin", 489 | "js-sys", 490 | "percent-encoding", 491 | "tracing", 492 | "wasm-bindgen", 493 | "wasm-bindgen-futures", 494 | "web-sys", 495 | "wgpu", 496 | "winit", 497 | ] 498 | 499 | [[package]] 500 | name = "egui" 501 | version = "0.19.0" 502 | source = "git+https://github.com/emilk/egui#29fa63317ea4f950a098be6240efc65c14b8c7a5" 503 | dependencies = [ 504 | "ahash 0.8.0", 505 | "epaint", 506 | "nohash-hasher", 507 | "tracing", 508 | ] 509 | 510 | [[package]] 511 | name = "egui-wgpu" 512 | version = "0.19.0" 513 | source = "git+https://github.com/emilk/egui#29fa63317ea4f950a098be6240efc65c14b8c7a5" 514 | dependencies = [ 515 | "bytemuck", 516 | "egui", 517 | "pollster", 518 | "tracing", 519 | "type-map", 520 | "wgpu", 521 | "winit", 522 | ] 523 | 524 | [[package]] 525 | name = "egui-winit" 526 | version = "0.19.0" 527 | source = "git+https://github.com/emilk/egui#29fa63317ea4f950a098be6240efc65c14b8c7a5" 528 | dependencies = [ 529 | "arboard", 530 | "egui", 531 | "instant", 532 | "smithay-clipboard", 533 | "tracing", 534 | "webbrowser", 535 | "winit", 536 | ] 537 | 538 | [[package]] 539 | name = "egui_glow" 540 | version = "0.19.0" 541 | source = "git+https://github.com/emilk/egui#29fa63317ea4f950a098be6240efc65c14b8c7a5" 542 | dependencies = [ 543 | "bytemuck", 544 | "egui", 545 | "glow", 546 | "memoffset", 547 | "tracing", 548 | "wasm-bindgen", 549 | "web-sys", 550 | ] 551 | 552 | [[package]] 553 | name = "egui_gpu_plot" 554 | version = "0.1.0" 555 | dependencies = [ 556 | "bytemuck", 557 | "eframe", 558 | "egui", 559 | "egui-wgpu", 560 | "wgpu", 561 | ] 562 | 563 | [[package]] 564 | name = "emath" 565 | version = "0.19.0" 566 | source = "git+https://github.com/emilk/egui#29fa63317ea4f950a098be6240efc65c14b8c7a5" 567 | dependencies = [ 568 | "bytemuck", 569 | ] 570 | 571 | [[package]] 572 | name = "epaint" 573 | version = "0.19.0" 574 | source = "git+https://github.com/emilk/egui#29fa63317ea4f950a098be6240efc65c14b8c7a5" 575 | dependencies = [ 576 | "ab_glyph", 577 | "ahash 0.8.0", 578 | "atomic_refcell", 579 | "bytemuck", 580 | "emath", 581 | "nohash-hasher", 582 | "parking_lot", 583 | ] 584 | 585 | [[package]] 586 | name = "error-code" 587 | version = "2.3.1" 588 | source = "registry+https://github.com/rust-lang/crates.io-index" 589 | checksum = "64f18991e7bf11e7ffee451b5318b5c1a73c52d0d0ada6e5a3017c8c1ced6a21" 590 | dependencies = [ 591 | "libc", 592 | "str-buf", 593 | ] 594 | 595 | [[package]] 596 | name = "expat-sys" 597 | version = "2.1.6" 598 | source = "registry+https://github.com/rust-lang/crates.io-index" 599 | checksum = "658f19728920138342f68408b7cf7644d90d4784353d8ebc32e7e8663dbe45fa" 600 | dependencies = [ 601 | "cmake", 602 | "pkg-config", 603 | ] 604 | 605 | [[package]] 606 | name = "flate2" 607 | version = "1.0.24" 608 | source = "registry+https://github.com/rust-lang/crates.io-index" 609 | checksum = "f82b0f4c27ad9f8bfd1f3208d882da2b09c301bc1c828fd3a00d0216d2fbbff6" 610 | dependencies = [ 611 | "crc32fast", 612 | "miniz_oxide", 613 | ] 614 | 615 | [[package]] 616 | name = "fnv" 617 | version = "1.0.7" 618 | source = "registry+https://github.com/rust-lang/crates.io-index" 619 | checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" 620 | 621 | [[package]] 622 | name = "foreign-types" 623 | version = "0.3.2" 624 | source = "registry+https://github.com/rust-lang/crates.io-index" 625 | checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" 626 | dependencies = [ 627 | "foreign-types-shared 0.1.1", 628 | ] 629 | 630 | [[package]] 631 | name = "foreign-types" 632 | version = "0.5.0" 633 | source = "registry+https://github.com/rust-lang/crates.io-index" 634 | checksum = "d737d9aa519fb7b749cbc3b962edcf310a8dd1f4b67c91c4f83975dbdd17d965" 635 | dependencies = [ 636 | "foreign-types-macros", 637 | "foreign-types-shared 0.3.1", 638 | ] 639 | 640 | [[package]] 641 | name = "foreign-types-macros" 642 | version = "0.2.2" 643 | source = "registry+https://github.com/rust-lang/crates.io-index" 644 | checksum = "c8469d0d40519bc608ec6863f1cc88f3f1deee15913f2f3b3e573d81ed38cccc" 645 | dependencies = [ 646 | "proc-macro2", 647 | "quote", 648 | "syn", 649 | ] 650 | 651 | [[package]] 652 | name = "foreign-types-shared" 653 | version = "0.1.1" 654 | source = "registry+https://github.com/rust-lang/crates.io-index" 655 | checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" 656 | 657 | [[package]] 658 | name = "foreign-types-shared" 659 | version = "0.3.1" 660 | source = "registry+https://github.com/rust-lang/crates.io-index" 661 | checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" 662 | 663 | [[package]] 664 | name = "form_urlencoded" 665 | version = "1.1.0" 666 | source = "registry+https://github.com/rust-lang/crates.io-index" 667 | checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" 668 | dependencies = [ 669 | "percent-encoding", 670 | ] 671 | 672 | [[package]] 673 | name = "freetype-rs" 674 | version = "0.26.0" 675 | source = "registry+https://github.com/rust-lang/crates.io-index" 676 | checksum = "74eadec9d0a5c28c54bb9882e54787275152a4e36ce206b45d7451384e5bf5fb" 677 | dependencies = [ 678 | "bitflags", 679 | "freetype-sys", 680 | "libc", 681 | ] 682 | 683 | [[package]] 684 | name = "freetype-sys" 685 | version = "0.13.1" 686 | source = "registry+https://github.com/rust-lang/crates.io-index" 687 | checksum = "a37d4011c0cc628dfa766fcc195454f4b068d7afdc2adfd28861191d866e731a" 688 | dependencies = [ 689 | "cmake", 690 | "libc", 691 | "pkg-config", 692 | ] 693 | 694 | [[package]] 695 | name = "fxhash" 696 | version = "0.2.1" 697 | source = "registry+https://github.com/rust-lang/crates.io-index" 698 | checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" 699 | dependencies = [ 700 | "byteorder", 701 | ] 702 | 703 | [[package]] 704 | name = "gethostname" 705 | version = "0.2.3" 706 | source = "registry+https://github.com/rust-lang/crates.io-index" 707 | checksum = "c1ebd34e35c46e00bb73e81363248d627782724609fe1b6396f553f68fe3862e" 708 | dependencies = [ 709 | "libc", 710 | "winapi", 711 | ] 712 | 713 | [[package]] 714 | name = "getrandom" 715 | version = "0.2.7" 716 | source = "registry+https://github.com/rust-lang/crates.io-index" 717 | checksum = "4eb1a864a501629691edf6c15a593b7a51eebaa1e8468e9ddc623de7c9b58ec6" 718 | dependencies = [ 719 | "cfg-if", 720 | "js-sys", 721 | "libc", 722 | "wasi", 723 | "wasm-bindgen", 724 | ] 725 | 726 | [[package]] 727 | name = "gl_generator" 728 | version = "0.14.0" 729 | source = "registry+https://github.com/rust-lang/crates.io-index" 730 | checksum = "1a95dfc23a2b4a9a2f5ab41d194f8bfda3cabec42af4e39f08c339eb2a0c124d" 731 | dependencies = [ 732 | "khronos_api", 733 | "log", 734 | "xml-rs", 735 | ] 736 | 737 | [[package]] 738 | name = "glow" 739 | version = "0.11.2" 740 | source = "registry+https://github.com/rust-lang/crates.io-index" 741 | checksum = "d8bd5877156a19b8ac83a29b2306fe20537429d318f3ff0a1a2119f8d9c61919" 742 | dependencies = [ 743 | "js-sys", 744 | "slotmap", 745 | "wasm-bindgen", 746 | "web-sys", 747 | ] 748 | 749 | [[package]] 750 | name = "glutin" 751 | version = "0.29.1" 752 | source = "registry+https://github.com/rust-lang/crates.io-index" 753 | checksum = "444c9ad294fdcaf20ccf6726b78f380b5450275540c9b68ab62f49726ad1c713" 754 | dependencies = [ 755 | "cgl", 756 | "cocoa", 757 | "core-foundation", 758 | "glutin_egl_sys", 759 | "glutin_gles2_sys", 760 | "glutin_glx_sys", 761 | "glutin_wgl_sys", 762 | "libloading", 763 | "log", 764 | "objc", 765 | "once_cell", 766 | "osmesa-sys", 767 | "parking_lot", 768 | "raw-window-handle 0.5.0", 769 | "wayland-client", 770 | "wayland-egl", 771 | "winapi", 772 | "winit", 773 | ] 774 | 775 | [[package]] 776 | name = "glutin_egl_sys" 777 | version = "0.1.6" 778 | source = "registry+https://github.com/rust-lang/crates.io-index" 779 | checksum = "68900f84b471f31ea1d1355567eb865a2cf446294f06cef8d653ed7bcf5f013d" 780 | dependencies = [ 781 | "gl_generator", 782 | "winapi", 783 | ] 784 | 785 | [[package]] 786 | name = "glutin_gles2_sys" 787 | version = "0.1.5" 788 | source = "registry+https://github.com/rust-lang/crates.io-index" 789 | checksum = "e8094e708b730a7c8a1954f4f8a31880af00eb8a1c5b5bf85d28a0a3c6d69103" 790 | dependencies = [ 791 | "gl_generator", 792 | "objc", 793 | ] 794 | 795 | [[package]] 796 | name = "glutin_glx_sys" 797 | version = "0.1.8" 798 | source = "registry+https://github.com/rust-lang/crates.io-index" 799 | checksum = "d93d0575865098580c5b3a423188cd959419912ea60b1e48e8b3b526f6d02468" 800 | dependencies = [ 801 | "gl_generator", 802 | "x11-dl", 803 | ] 804 | 805 | [[package]] 806 | name = "glutin_wgl_sys" 807 | version = "0.1.5" 808 | source = "registry+https://github.com/rust-lang/crates.io-index" 809 | checksum = "3da5951a1569dbab865c6f2a863efafff193a93caf05538d193e9e3816d21696" 810 | dependencies = [ 811 | "gl_generator", 812 | ] 813 | 814 | [[package]] 815 | name = "gpu-alloc" 816 | version = "0.5.3" 817 | source = "registry+https://github.com/rust-lang/crates.io-index" 818 | checksum = "7fc59e5f710e310e76e6707f86c561dd646f69a8876da9131703b2f717de818d" 819 | dependencies = [ 820 | "bitflags", 821 | "gpu-alloc-types", 822 | ] 823 | 824 | [[package]] 825 | name = "gpu-alloc-types" 826 | version = "0.2.0" 827 | source = "registry+https://github.com/rust-lang/crates.io-index" 828 | checksum = "54804d0d6bc9d7f26db4eaec1ad10def69b599315f487d32c334a80d1efe67a5" 829 | dependencies = [ 830 | "bitflags", 831 | ] 832 | 833 | [[package]] 834 | name = "gpu-descriptor" 835 | version = "0.2.3" 836 | source = "registry+https://github.com/rust-lang/crates.io-index" 837 | checksum = "0b0c02e1ba0bdb14e965058ca34e09c020f8e507a760df1121728e0aef68d57a" 838 | dependencies = [ 839 | "bitflags", 840 | "gpu-descriptor-types", 841 | "hashbrown", 842 | ] 843 | 844 | [[package]] 845 | name = "gpu-descriptor-types" 846 | version = "0.1.1" 847 | source = "registry+https://github.com/rust-lang/crates.io-index" 848 | checksum = "363e3677e55ad168fef68cf9de3a4a310b53124c5e784c53a1d70e92d23f2126" 849 | dependencies = [ 850 | "bitflags", 851 | ] 852 | 853 | [[package]] 854 | name = "hashbrown" 855 | version = "0.12.3" 856 | source = "registry+https://github.com/rust-lang/crates.io-index" 857 | checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" 858 | dependencies = [ 859 | "ahash 0.7.6", 860 | ] 861 | 862 | [[package]] 863 | name = "hexf-parse" 864 | version = "0.2.1" 865 | source = "registry+https://github.com/rust-lang/crates.io-index" 866 | checksum = "dfa686283ad6dd069f105e5ab091b04c62850d3e4cf5d67debad1933f55023df" 867 | 868 | [[package]] 869 | name = "ident_case" 870 | version = "1.0.1" 871 | source = "registry+https://github.com/rust-lang/crates.io-index" 872 | checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" 873 | 874 | [[package]] 875 | name = "idna" 876 | version = "0.3.0" 877 | source = "registry+https://github.com/rust-lang/crates.io-index" 878 | checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" 879 | dependencies = [ 880 | "unicode-bidi", 881 | "unicode-normalization", 882 | ] 883 | 884 | [[package]] 885 | name = "indexmap" 886 | version = "1.9.1" 887 | source = "registry+https://github.com/rust-lang/crates.io-index" 888 | checksum = "10a35a97730320ffe8e2d410b5d3b69279b98d2c14bdb8b70ea89ecf7888d41e" 889 | dependencies = [ 890 | "autocfg", 891 | "hashbrown", 892 | ] 893 | 894 | [[package]] 895 | name = "inplace_it" 896 | version = "0.3.5" 897 | source = "registry+https://github.com/rust-lang/crates.io-index" 898 | checksum = "e567468c50f3d4bc7397702e09b380139f9b9288b4e909b070571007f8b5bf78" 899 | 900 | [[package]] 901 | name = "instant" 902 | version = "0.1.12" 903 | source = "registry+https://github.com/rust-lang/crates.io-index" 904 | checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" 905 | dependencies = [ 906 | "cfg-if", 907 | "js-sys", 908 | "wasm-bindgen", 909 | "web-sys", 910 | ] 911 | 912 | [[package]] 913 | name = "jni" 914 | version = "0.19.0" 915 | source = "registry+https://github.com/rust-lang/crates.io-index" 916 | checksum = "c6df18c2e3db7e453d3c6ac5b3e9d5182664d28788126d39b91f2d1e22b017ec" 917 | dependencies = [ 918 | "cesu8", 919 | "combine", 920 | "jni-sys", 921 | "log", 922 | "thiserror", 923 | "walkdir", 924 | ] 925 | 926 | [[package]] 927 | name = "jni-sys" 928 | version = "0.3.0" 929 | source = "registry+https://github.com/rust-lang/crates.io-index" 930 | checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" 931 | 932 | [[package]] 933 | name = "js-sys" 934 | version = "0.3.60" 935 | source = "registry+https://github.com/rust-lang/crates.io-index" 936 | checksum = "49409df3e3bf0856b916e2ceaca09ee28e6871cf7d9ce97a692cacfdb2a25a47" 937 | dependencies = [ 938 | "wasm-bindgen", 939 | ] 940 | 941 | [[package]] 942 | name = "khronos-egl" 943 | version = "4.1.0" 944 | source = "registry+https://github.com/rust-lang/crates.io-index" 945 | checksum = "8c2352bd1d0bceb871cb9d40f24360c8133c11d7486b68b5381c1dd1a32015e3" 946 | dependencies = [ 947 | "libc", 948 | "libloading", 949 | "pkg-config", 950 | ] 951 | 952 | [[package]] 953 | name = "khronos_api" 954 | version = "3.1.0" 955 | source = "registry+https://github.com/rust-lang/crates.io-index" 956 | checksum = "e2db585e1d738fc771bf08a151420d3ed193d9d895a36df7f6f8a9456b911ddc" 957 | 958 | [[package]] 959 | name = "lazy_static" 960 | version = "1.4.0" 961 | source = "registry+https://github.com/rust-lang/crates.io-index" 962 | checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" 963 | 964 | [[package]] 965 | name = "libc" 966 | version = "0.2.133" 967 | source = "registry+https://github.com/rust-lang/crates.io-index" 968 | checksum = "c0f80d65747a3e43d1596c7c5492d95d5edddaabd45a7fcdb02b95f644164966" 969 | 970 | [[package]] 971 | name = "libloading" 972 | version = "0.7.3" 973 | source = "registry+https://github.com/rust-lang/crates.io-index" 974 | checksum = "efbc0f03f9a775e9f6aed295c6a1ba2253c5757a9e03d55c6caa46a681abcddd" 975 | dependencies = [ 976 | "cfg-if", 977 | "winapi", 978 | ] 979 | 980 | [[package]] 981 | name = "lock_api" 982 | version = "0.4.8" 983 | source = "registry+https://github.com/rust-lang/crates.io-index" 984 | checksum = "9f80bf5aacaf25cbfc8210d1cfb718f2bf3b11c4c54e5afe36c236853a8ec390" 985 | dependencies = [ 986 | "autocfg", 987 | "scopeguard", 988 | ] 989 | 990 | [[package]] 991 | name = "log" 992 | version = "0.4.17" 993 | source = "registry+https://github.com/rust-lang/crates.io-index" 994 | checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" 995 | dependencies = [ 996 | "cfg-if", 997 | ] 998 | 999 | [[package]] 1000 | name = "malloc_buf" 1001 | version = "0.0.6" 1002 | source = "registry+https://github.com/rust-lang/crates.io-index" 1003 | checksum = "62bb907fe88d54d8d9ce32a3cceab4218ed2f6b7d35617cafe9adf84e43919cb" 1004 | dependencies = [ 1005 | "libc", 1006 | ] 1007 | 1008 | [[package]] 1009 | name = "memchr" 1010 | version = "2.5.0" 1011 | source = "registry+https://github.com/rust-lang/crates.io-index" 1012 | checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" 1013 | 1014 | [[package]] 1015 | name = "memmap2" 1016 | version = "0.5.7" 1017 | source = "registry+https://github.com/rust-lang/crates.io-index" 1018 | checksum = "95af15f345b17af2efc8ead6080fb8bc376f8cec1b35277b935637595fe77498" 1019 | dependencies = [ 1020 | "libc", 1021 | ] 1022 | 1023 | [[package]] 1024 | name = "memoffset" 1025 | version = "0.6.5" 1026 | source = "registry+https://github.com/rust-lang/crates.io-index" 1027 | checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" 1028 | dependencies = [ 1029 | "autocfg", 1030 | ] 1031 | 1032 | [[package]] 1033 | name = "metal" 1034 | version = "0.24.0" 1035 | source = "registry+https://github.com/rust-lang/crates.io-index" 1036 | checksum = "de11355d1f6781482d027a3b4d4de7825dcedb197bf573e0596d00008402d060" 1037 | dependencies = [ 1038 | "bitflags", 1039 | "block", 1040 | "core-graphics-types", 1041 | "foreign-types 0.3.2", 1042 | "log", 1043 | "objc", 1044 | ] 1045 | 1046 | [[package]] 1047 | name = "minimal-lexical" 1048 | version = "0.2.1" 1049 | source = "registry+https://github.com/rust-lang/crates.io-index" 1050 | checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" 1051 | 1052 | [[package]] 1053 | name = "miniz_oxide" 1054 | version = "0.5.4" 1055 | source = "registry+https://github.com/rust-lang/crates.io-index" 1056 | checksum = "96590ba8f175222643a85693f33d26e9c8a015f599c216509b1a6894af675d34" 1057 | dependencies = [ 1058 | "adler", 1059 | ] 1060 | 1061 | [[package]] 1062 | name = "mio" 1063 | version = "0.8.4" 1064 | source = "registry+https://github.com/rust-lang/crates.io-index" 1065 | checksum = "57ee1c23c7c63b0c9250c339ffdc69255f110b298b901b9f6c82547b7b87caaf" 1066 | dependencies = [ 1067 | "libc", 1068 | "log", 1069 | "wasi", 1070 | "windows-sys", 1071 | ] 1072 | 1073 | [[package]] 1074 | name = "naga" 1075 | version = "0.9.0" 1076 | source = "registry+https://github.com/rust-lang/crates.io-index" 1077 | checksum = "5f50357e1167a3ab92d6b3c7f4bf5f7fd13fde3f4b28bf0d5ea07b5100fdb6c0" 1078 | dependencies = [ 1079 | "bit-set", 1080 | "bitflags", 1081 | "codespan-reporting", 1082 | "hexf-parse", 1083 | "indexmap", 1084 | "log", 1085 | "num-traits", 1086 | "rustc-hash", 1087 | "spirv", 1088 | "termcolor", 1089 | "thiserror", 1090 | "unicode-xid", 1091 | ] 1092 | 1093 | [[package]] 1094 | name = "ndk" 1095 | version = "0.6.0" 1096 | source = "registry+https://github.com/rust-lang/crates.io-index" 1097 | checksum = "2032c77e030ddee34a6787a64166008da93f6a352b629261d0fee232b8742dd4" 1098 | dependencies = [ 1099 | "bitflags", 1100 | "jni-sys", 1101 | "ndk-sys 0.3.0", 1102 | "num_enum", 1103 | "thiserror", 1104 | ] 1105 | 1106 | [[package]] 1107 | name = "ndk" 1108 | version = "0.7.0" 1109 | source = "registry+https://github.com/rust-lang/crates.io-index" 1110 | checksum = "451422b7e4718271c8b5b3aadf5adedba43dc76312454b387e98fae0fc951aa0" 1111 | dependencies = [ 1112 | "bitflags", 1113 | "jni-sys", 1114 | "ndk-sys 0.4.0", 1115 | "num_enum", 1116 | "raw-window-handle 0.5.0", 1117 | "thiserror", 1118 | ] 1119 | 1120 | [[package]] 1121 | name = "ndk-context" 1122 | version = "0.1.1" 1123 | source = "registry+https://github.com/rust-lang/crates.io-index" 1124 | checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" 1125 | 1126 | [[package]] 1127 | name = "ndk-glue" 1128 | version = "0.6.2" 1129 | source = "registry+https://github.com/rust-lang/crates.io-index" 1130 | checksum = "0d0c4a7b83860226e6b4183edac21851f05d5a51756e97a1144b7f5a6b63e65f" 1131 | dependencies = [ 1132 | "lazy_static", 1133 | "libc", 1134 | "log", 1135 | "ndk 0.6.0", 1136 | "ndk-context", 1137 | "ndk-macro", 1138 | "ndk-sys 0.3.0", 1139 | ] 1140 | 1141 | [[package]] 1142 | name = "ndk-glue" 1143 | version = "0.7.0" 1144 | source = "registry+https://github.com/rust-lang/crates.io-index" 1145 | checksum = "0434fabdd2c15e0aab768ca31d5b7b333717f03cf02037d5a0a3ff3c278ed67f" 1146 | dependencies = [ 1147 | "libc", 1148 | "log", 1149 | "ndk 0.7.0", 1150 | "ndk-context", 1151 | "ndk-macro", 1152 | "ndk-sys 0.4.0", 1153 | "once_cell", 1154 | "parking_lot", 1155 | ] 1156 | 1157 | [[package]] 1158 | name = "ndk-macro" 1159 | version = "0.3.0" 1160 | source = "registry+https://github.com/rust-lang/crates.io-index" 1161 | checksum = "0df7ac00c4672f9d5aece54ee3347520b7e20f158656c7db2e6de01902eb7a6c" 1162 | dependencies = [ 1163 | "darling", 1164 | "proc-macro-crate", 1165 | "proc-macro2", 1166 | "quote", 1167 | "syn", 1168 | ] 1169 | 1170 | [[package]] 1171 | name = "ndk-sys" 1172 | version = "0.3.0" 1173 | source = "registry+https://github.com/rust-lang/crates.io-index" 1174 | checksum = "6e5a6ae77c8ee183dcbbba6150e2e6b9f3f4196a7666c02a715a95692ec1fa97" 1175 | dependencies = [ 1176 | "jni-sys", 1177 | ] 1178 | 1179 | [[package]] 1180 | name = "ndk-sys" 1181 | version = "0.4.0" 1182 | source = "registry+https://github.com/rust-lang/crates.io-index" 1183 | checksum = "21d83ec9c63ec5bf950200a8e508bdad6659972187b625469f58ef8c08e29046" 1184 | dependencies = [ 1185 | "jni-sys", 1186 | ] 1187 | 1188 | [[package]] 1189 | name = "nix" 1190 | version = "0.24.2" 1191 | source = "registry+https://github.com/rust-lang/crates.io-index" 1192 | checksum = "195cdbc1741b8134346d515b3a56a1c94b0912758009cfd53f99ea0f57b065fc" 1193 | dependencies = [ 1194 | "bitflags", 1195 | "cfg-if", 1196 | "libc", 1197 | "memoffset", 1198 | ] 1199 | 1200 | [[package]] 1201 | name = "nohash-hasher" 1202 | version = "0.2.0" 1203 | source = "registry+https://github.com/rust-lang/crates.io-index" 1204 | checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451" 1205 | 1206 | [[package]] 1207 | name = "nom" 1208 | version = "7.1.1" 1209 | source = "registry+https://github.com/rust-lang/crates.io-index" 1210 | checksum = "a8903e5a29a317527874d0402f867152a3d21c908bb0b933e416c65e301d4c36" 1211 | dependencies = [ 1212 | "memchr", 1213 | "minimal-lexical", 1214 | ] 1215 | 1216 | [[package]] 1217 | name = "num-traits" 1218 | version = "0.2.15" 1219 | source = "registry+https://github.com/rust-lang/crates.io-index" 1220 | checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" 1221 | dependencies = [ 1222 | "autocfg", 1223 | ] 1224 | 1225 | [[package]] 1226 | name = "num_enum" 1227 | version = "0.5.7" 1228 | source = "registry+https://github.com/rust-lang/crates.io-index" 1229 | checksum = "cf5395665662ef45796a4ff5486c5d41d29e0c09640af4c5f17fd94ee2c119c9" 1230 | dependencies = [ 1231 | "num_enum_derive", 1232 | ] 1233 | 1234 | [[package]] 1235 | name = "num_enum_derive" 1236 | version = "0.5.7" 1237 | source = "registry+https://github.com/rust-lang/crates.io-index" 1238 | checksum = "3b0498641e53dd6ac1a4f22547548caa6864cc4933784319cd1775271c5a46ce" 1239 | dependencies = [ 1240 | "proc-macro-crate", 1241 | "proc-macro2", 1242 | "quote", 1243 | "syn", 1244 | ] 1245 | 1246 | [[package]] 1247 | name = "objc" 1248 | version = "0.2.7" 1249 | source = "registry+https://github.com/rust-lang/crates.io-index" 1250 | checksum = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1" 1251 | dependencies = [ 1252 | "malloc_buf", 1253 | "objc_exception", 1254 | ] 1255 | 1256 | [[package]] 1257 | name = "objc-foundation" 1258 | version = "0.1.1" 1259 | source = "registry+https://github.com/rust-lang/crates.io-index" 1260 | checksum = "1add1b659e36c9607c7aab864a76c7a4c2760cd0cd2e120f3fb8b952c7e22bf9" 1261 | dependencies = [ 1262 | "block", 1263 | "objc", 1264 | "objc_id", 1265 | ] 1266 | 1267 | [[package]] 1268 | name = "objc_exception" 1269 | version = "0.1.2" 1270 | source = "registry+https://github.com/rust-lang/crates.io-index" 1271 | checksum = "ad970fb455818ad6cba4c122ad012fae53ae8b4795f86378bce65e4f6bab2ca4" 1272 | dependencies = [ 1273 | "cc", 1274 | ] 1275 | 1276 | [[package]] 1277 | name = "objc_id" 1278 | version = "0.1.1" 1279 | source = "registry+https://github.com/rust-lang/crates.io-index" 1280 | checksum = "c92d4ddb4bd7b50d730c215ff871754d0da6b2178849f8a2a2ab69712d0c073b" 1281 | dependencies = [ 1282 | "objc", 1283 | ] 1284 | 1285 | [[package]] 1286 | name = "once_cell" 1287 | version = "1.14.0" 1288 | source = "registry+https://github.com/rust-lang/crates.io-index" 1289 | checksum = "2f7254b99e31cad77da24b08ebf628882739a608578bb1bcdfc1f9c21260d7c0" 1290 | 1291 | [[package]] 1292 | name = "osmesa-sys" 1293 | version = "0.1.2" 1294 | source = "registry+https://github.com/rust-lang/crates.io-index" 1295 | checksum = "88cfece6e95d2e717e0872a7f53a8684712ad13822a7979bc760b9c77ec0013b" 1296 | dependencies = [ 1297 | "shared_library", 1298 | ] 1299 | 1300 | [[package]] 1301 | name = "owned_ttf_parser" 1302 | version = "0.15.2" 1303 | source = "registry+https://github.com/rust-lang/crates.io-index" 1304 | checksum = "05e6affeb1632d6ff6a23d2cd40ffed138e82f1532571a26f527c8a284bb2fbb" 1305 | dependencies = [ 1306 | "ttf-parser", 1307 | ] 1308 | 1309 | [[package]] 1310 | name = "parking_lot" 1311 | version = "0.12.1" 1312 | source = "registry+https://github.com/rust-lang/crates.io-index" 1313 | checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" 1314 | dependencies = [ 1315 | "lock_api", 1316 | "parking_lot_core", 1317 | ] 1318 | 1319 | [[package]] 1320 | name = "parking_lot_core" 1321 | version = "0.9.3" 1322 | source = "registry+https://github.com/rust-lang/crates.io-index" 1323 | checksum = "09a279cbf25cb0757810394fbc1e359949b59e348145c643a939a525692e6929" 1324 | dependencies = [ 1325 | "cfg-if", 1326 | "libc", 1327 | "redox_syscall", 1328 | "smallvec", 1329 | "windows-sys", 1330 | ] 1331 | 1332 | [[package]] 1333 | name = "percent-encoding" 1334 | version = "2.2.0" 1335 | source = "registry+https://github.com/rust-lang/crates.io-index" 1336 | checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" 1337 | 1338 | [[package]] 1339 | name = "pin-project-lite" 1340 | version = "0.2.9" 1341 | source = "registry+https://github.com/rust-lang/crates.io-index" 1342 | checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" 1343 | 1344 | [[package]] 1345 | name = "pkg-config" 1346 | version = "0.3.25" 1347 | source = "registry+https://github.com/rust-lang/crates.io-index" 1348 | checksum = "1df8c4ec4b0627e53bdf214615ad287367e482558cf84b109250b37464dc03ae" 1349 | 1350 | [[package]] 1351 | name = "png" 1352 | version = "0.17.6" 1353 | source = "registry+https://github.com/rust-lang/crates.io-index" 1354 | checksum = "8f0e7f4c94ec26ff209cee506314212639d6c91b80afb82984819fafce9df01c" 1355 | dependencies = [ 1356 | "bitflags", 1357 | "crc32fast", 1358 | "flate2", 1359 | "miniz_oxide", 1360 | ] 1361 | 1362 | [[package]] 1363 | name = "pollster" 1364 | version = "0.2.5" 1365 | source = "registry+https://github.com/rust-lang/crates.io-index" 1366 | checksum = "5da3b0203fd7ee5720aa0b5e790b591aa5d3f41c3ed2c34a3a393382198af2f7" 1367 | 1368 | [[package]] 1369 | name = "proc-macro-crate" 1370 | version = "1.2.1" 1371 | source = "registry+https://github.com/rust-lang/crates.io-index" 1372 | checksum = "eda0fc3b0fb7c975631757e14d9049da17374063edb6ebbcbc54d880d4fe94e9" 1373 | dependencies = [ 1374 | "once_cell", 1375 | "thiserror", 1376 | "toml", 1377 | ] 1378 | 1379 | [[package]] 1380 | name = "proc-macro2" 1381 | version = "1.0.43" 1382 | source = "registry+https://github.com/rust-lang/crates.io-index" 1383 | checksum = "0a2ca2c61bc9f3d74d2886294ab7b9853abd9c1ad903a3ac7815c58989bb7bab" 1384 | dependencies = [ 1385 | "unicode-ident", 1386 | ] 1387 | 1388 | [[package]] 1389 | name = "profiling" 1390 | version = "1.0.6" 1391 | source = "registry+https://github.com/rust-lang/crates.io-index" 1392 | checksum = "2f61dcf0b917cd75d4521d7343d1ffff3d1583054133c9b5cbea3375c703c40d" 1393 | 1394 | [[package]] 1395 | name = "quote" 1396 | version = "1.0.21" 1397 | source = "registry+https://github.com/rust-lang/crates.io-index" 1398 | checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179" 1399 | dependencies = [ 1400 | "proc-macro2", 1401 | ] 1402 | 1403 | [[package]] 1404 | name = "range-alloc" 1405 | version = "0.1.2" 1406 | source = "registry+https://github.com/rust-lang/crates.io-index" 1407 | checksum = "63e935c45e09cc6dcf00d2f0b2d630a58f4095320223d47fc68918722f0538b6" 1408 | 1409 | [[package]] 1410 | name = "raw-window-handle" 1411 | version = "0.4.3" 1412 | source = "registry+https://github.com/rust-lang/crates.io-index" 1413 | checksum = "b800beb9b6e7d2df1fe337c9e3d04e3af22a124460fb4c30fcc22c9117cefb41" 1414 | dependencies = [ 1415 | "cty", 1416 | ] 1417 | 1418 | [[package]] 1419 | name = "raw-window-handle" 1420 | version = "0.5.0" 1421 | source = "registry+https://github.com/rust-lang/crates.io-index" 1422 | checksum = "ed7e3d950b66e19e0c372f3fa3fbbcf85b1746b571f74e0c2af6042a5c93420a" 1423 | dependencies = [ 1424 | "cty", 1425 | ] 1426 | 1427 | [[package]] 1428 | name = "redox_syscall" 1429 | version = "0.2.16" 1430 | source = "registry+https://github.com/rust-lang/crates.io-index" 1431 | checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" 1432 | dependencies = [ 1433 | "bitflags", 1434 | ] 1435 | 1436 | [[package]] 1437 | name = "renderdoc-sys" 1438 | version = "0.7.1" 1439 | source = "registry+https://github.com/rust-lang/crates.io-index" 1440 | checksum = "f1382d1f0a252c4bf97dc20d979a2fdd05b024acd7c2ed0f7595d7817666a157" 1441 | 1442 | [[package]] 1443 | name = "rustc-hash" 1444 | version = "1.1.0" 1445 | source = "registry+https://github.com/rust-lang/crates.io-index" 1446 | checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" 1447 | 1448 | [[package]] 1449 | name = "safe_arch" 1450 | version = "0.5.2" 1451 | source = "registry+https://github.com/rust-lang/crates.io-index" 1452 | checksum = "c1ff3d6d9696af502cc3110dacce942840fb06ff4514cad92236ecc455f2ce05" 1453 | dependencies = [ 1454 | "bytemuck", 1455 | ] 1456 | 1457 | [[package]] 1458 | name = "same-file" 1459 | version = "1.0.6" 1460 | source = "registry+https://github.com/rust-lang/crates.io-index" 1461 | checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" 1462 | dependencies = [ 1463 | "winapi-util", 1464 | ] 1465 | 1466 | [[package]] 1467 | name = "scoped-tls" 1468 | version = "1.0.0" 1469 | source = "registry+https://github.com/rust-lang/crates.io-index" 1470 | checksum = "ea6a9290e3c9cf0f18145ef7ffa62d68ee0bf5fcd651017e586dc7fd5da448c2" 1471 | 1472 | [[package]] 1473 | name = "scopeguard" 1474 | version = "1.1.0" 1475 | source = "registry+https://github.com/rust-lang/crates.io-index" 1476 | checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" 1477 | 1478 | [[package]] 1479 | name = "sctk-adwaita" 1480 | version = "0.4.2" 1481 | source = "registry+https://github.com/rust-lang/crates.io-index" 1482 | checksum = "04b7c47a572f73de28bee5b5060d085b42b6ce1e4ee2b49c956ea7b25e94b6f0" 1483 | dependencies = [ 1484 | "crossfont", 1485 | "log", 1486 | "smithay-client-toolkit", 1487 | "tiny-skia", 1488 | ] 1489 | 1490 | [[package]] 1491 | name = "serde" 1492 | version = "1.0.144" 1493 | source = "registry+https://github.com/rust-lang/crates.io-index" 1494 | checksum = "0f747710de3dcd43b88c9168773254e809d8ddbdf9653b84e2554ab219f17860" 1495 | 1496 | [[package]] 1497 | name = "serde_derive" 1498 | version = "1.0.144" 1499 | source = "registry+https://github.com/rust-lang/crates.io-index" 1500 | checksum = "94ed3a816fb1d101812f83e789f888322c34e291f894f19590dc310963e87a00" 1501 | dependencies = [ 1502 | "proc-macro2", 1503 | "quote", 1504 | "syn", 1505 | ] 1506 | 1507 | [[package]] 1508 | name = "servo-fontconfig" 1509 | version = "0.5.1" 1510 | source = "registry+https://github.com/rust-lang/crates.io-index" 1511 | checksum = "c7e3e22fe5fd73d04ebf0daa049d3efe3eae55369ce38ab16d07ddd9ac5c217c" 1512 | dependencies = [ 1513 | "libc", 1514 | "servo-fontconfig-sys", 1515 | ] 1516 | 1517 | [[package]] 1518 | name = "servo-fontconfig-sys" 1519 | version = "5.1.0" 1520 | source = "registry+https://github.com/rust-lang/crates.io-index" 1521 | checksum = "e36b879db9892dfa40f95da1c38a835d41634b825fbd8c4c418093d53c24b388" 1522 | dependencies = [ 1523 | "expat-sys", 1524 | "freetype-sys", 1525 | "pkg-config", 1526 | ] 1527 | 1528 | [[package]] 1529 | name = "shared_library" 1530 | version = "0.1.9" 1531 | source = "registry+https://github.com/rust-lang/crates.io-index" 1532 | checksum = "5a9e7e0f2bfae24d8a5b5a66c5b257a83c7412304311512a0c054cd5e619da11" 1533 | dependencies = [ 1534 | "lazy_static", 1535 | "libc", 1536 | ] 1537 | 1538 | [[package]] 1539 | name = "slotmap" 1540 | version = "1.0.6" 1541 | source = "registry+https://github.com/rust-lang/crates.io-index" 1542 | checksum = "e1e08e261d0e8f5c43123b7adf3e4ca1690d655377ac93a03b2c9d3e98de1342" 1543 | dependencies = [ 1544 | "version_check", 1545 | ] 1546 | 1547 | [[package]] 1548 | name = "smallvec" 1549 | version = "1.9.0" 1550 | source = "registry+https://github.com/rust-lang/crates.io-index" 1551 | checksum = "2fd0db749597d91ff862fd1d55ea87f7855a744a8425a64695b6fca237d1dad1" 1552 | 1553 | [[package]] 1554 | name = "smithay-client-toolkit" 1555 | version = "0.16.0" 1556 | source = "registry+https://github.com/rust-lang/crates.io-index" 1557 | checksum = "f307c47d32d2715eb2e0ece5589057820e0e5e70d07c247d1063e844e107f454" 1558 | dependencies = [ 1559 | "bitflags", 1560 | "calloop", 1561 | "dlib", 1562 | "lazy_static", 1563 | "log", 1564 | "memmap2", 1565 | "nix", 1566 | "pkg-config", 1567 | "wayland-client", 1568 | "wayland-cursor", 1569 | "wayland-protocols", 1570 | ] 1571 | 1572 | [[package]] 1573 | name = "smithay-clipboard" 1574 | version = "0.6.6" 1575 | source = "registry+https://github.com/rust-lang/crates.io-index" 1576 | checksum = "0a345c870a1fae0b1b779085e81b51e614767c239e93503588e54c5b17f4b0e8" 1577 | dependencies = [ 1578 | "smithay-client-toolkit", 1579 | "wayland-client", 1580 | ] 1581 | 1582 | [[package]] 1583 | name = "spirv" 1584 | version = "0.2.0+1.5.4" 1585 | source = "registry+https://github.com/rust-lang/crates.io-index" 1586 | checksum = "246bfa38fe3db3f1dfc8ca5a2cdeb7348c78be2112740cc0ec8ef18b6d94f830" 1587 | dependencies = [ 1588 | "bitflags", 1589 | "num-traits", 1590 | ] 1591 | 1592 | [[package]] 1593 | name = "str-buf" 1594 | version = "1.0.6" 1595 | source = "registry+https://github.com/rust-lang/crates.io-index" 1596 | checksum = "9e08d8363704e6c71fc928674353e6b7c23dcea9d82d7012c8faf2a3a025f8d0" 1597 | 1598 | [[package]] 1599 | name = "strsim" 1600 | version = "0.10.0" 1601 | source = "registry+https://github.com/rust-lang/crates.io-index" 1602 | checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" 1603 | 1604 | [[package]] 1605 | name = "syn" 1606 | version = "1.0.100" 1607 | source = "registry+https://github.com/rust-lang/crates.io-index" 1608 | checksum = "52205623b1b0f064a4e71182c3b18ae902267282930c6d5462c91b859668426e" 1609 | dependencies = [ 1610 | "proc-macro2", 1611 | "quote", 1612 | "unicode-ident", 1613 | ] 1614 | 1615 | [[package]] 1616 | name = "termcolor" 1617 | version = "1.1.3" 1618 | source = "registry+https://github.com/rust-lang/crates.io-index" 1619 | checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755" 1620 | dependencies = [ 1621 | "winapi-util", 1622 | ] 1623 | 1624 | [[package]] 1625 | name = "thiserror" 1626 | version = "1.0.35" 1627 | source = "registry+https://github.com/rust-lang/crates.io-index" 1628 | checksum = "c53f98874615aea268107765aa1ed8f6116782501d18e53d08b471733bea6c85" 1629 | dependencies = [ 1630 | "thiserror-impl", 1631 | ] 1632 | 1633 | [[package]] 1634 | name = "thiserror-impl" 1635 | version = "1.0.35" 1636 | source = "registry+https://github.com/rust-lang/crates.io-index" 1637 | checksum = "f8b463991b4eab2d801e724172285ec4195c650e8ec79b149e6c2a8e6dd3f783" 1638 | dependencies = [ 1639 | "proc-macro2", 1640 | "quote", 1641 | "syn", 1642 | ] 1643 | 1644 | [[package]] 1645 | name = "tiny-skia" 1646 | version = "0.7.0" 1647 | source = "registry+https://github.com/rust-lang/crates.io-index" 1648 | checksum = "642680569bb895b16e4b9d181c60be1ed136fa0c9c7f11d004daf053ba89bf82" 1649 | dependencies = [ 1650 | "arrayref", 1651 | "arrayvec 0.5.2", 1652 | "bytemuck", 1653 | "cfg-if", 1654 | "png", 1655 | "safe_arch", 1656 | "tiny-skia-path", 1657 | ] 1658 | 1659 | [[package]] 1660 | name = "tiny-skia-path" 1661 | version = "0.7.0" 1662 | source = "registry+https://github.com/rust-lang/crates.io-index" 1663 | checksum = "c114d32f0c2ee43d585367cb013dfaba967ab9f62b90d9af0d696e955e70fa6c" 1664 | dependencies = [ 1665 | "arrayref", 1666 | "bytemuck", 1667 | ] 1668 | 1669 | [[package]] 1670 | name = "tinyvec" 1671 | version = "1.6.0" 1672 | source = "registry+https://github.com/rust-lang/crates.io-index" 1673 | checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" 1674 | dependencies = [ 1675 | "tinyvec_macros", 1676 | ] 1677 | 1678 | [[package]] 1679 | name = "tinyvec_macros" 1680 | version = "0.1.0" 1681 | source = "registry+https://github.com/rust-lang/crates.io-index" 1682 | checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" 1683 | 1684 | [[package]] 1685 | name = "toml" 1686 | version = "0.5.9" 1687 | source = "registry+https://github.com/rust-lang/crates.io-index" 1688 | checksum = "8d82e1a7758622a465f8cee077614c73484dac5b836c02ff6a40d5d1010324d7" 1689 | dependencies = [ 1690 | "serde", 1691 | ] 1692 | 1693 | [[package]] 1694 | name = "tracing" 1695 | version = "0.1.36" 1696 | source = "registry+https://github.com/rust-lang/crates.io-index" 1697 | checksum = "2fce9567bd60a67d08a16488756721ba392f24f29006402881e43b19aac64307" 1698 | dependencies = [ 1699 | "cfg-if", 1700 | "pin-project-lite", 1701 | "tracing-core", 1702 | ] 1703 | 1704 | [[package]] 1705 | name = "tracing-core" 1706 | version = "0.1.29" 1707 | source = "registry+https://github.com/rust-lang/crates.io-index" 1708 | checksum = "5aeea4303076558a00714b823f9ad67d58a3bbda1df83d8827d21193156e22f7" 1709 | dependencies = [ 1710 | "once_cell", 1711 | ] 1712 | 1713 | [[package]] 1714 | name = "ttf-parser" 1715 | version = "0.15.2" 1716 | source = "registry+https://github.com/rust-lang/crates.io-index" 1717 | checksum = "7b3e06c9b9d80ed6b745c7159c40b311ad2916abb34a49e9be2653b90db0d8dd" 1718 | 1719 | [[package]] 1720 | name = "type-map" 1721 | version = "0.5.0" 1722 | source = "registry+https://github.com/rust-lang/crates.io-index" 1723 | checksum = "deb68604048ff8fa93347f02441e4487594adc20bb8a084f9e564d2b827a0a9f" 1724 | dependencies = [ 1725 | "rustc-hash", 1726 | ] 1727 | 1728 | [[package]] 1729 | name = "unicode-bidi" 1730 | version = "0.3.8" 1731 | source = "registry+https://github.com/rust-lang/crates.io-index" 1732 | checksum = "099b7128301d285f79ddd55b9a83d5e6b9e97c92e0ea0daebee7263e932de992" 1733 | 1734 | [[package]] 1735 | name = "unicode-ident" 1736 | version = "1.0.4" 1737 | source = "registry+https://github.com/rust-lang/crates.io-index" 1738 | checksum = "dcc811dc4066ac62f84f11307873c4850cb653bfa9b1719cee2bd2204a4bc5dd" 1739 | 1740 | [[package]] 1741 | name = "unicode-normalization" 1742 | version = "0.1.22" 1743 | source = "registry+https://github.com/rust-lang/crates.io-index" 1744 | checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" 1745 | dependencies = [ 1746 | "tinyvec", 1747 | ] 1748 | 1749 | [[package]] 1750 | name = "unicode-width" 1751 | version = "0.1.10" 1752 | source = "registry+https://github.com/rust-lang/crates.io-index" 1753 | checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" 1754 | 1755 | [[package]] 1756 | name = "unicode-xid" 1757 | version = "0.2.4" 1758 | source = "registry+https://github.com/rust-lang/crates.io-index" 1759 | checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" 1760 | 1761 | [[package]] 1762 | name = "url" 1763 | version = "2.3.1" 1764 | source = "registry+https://github.com/rust-lang/crates.io-index" 1765 | checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" 1766 | dependencies = [ 1767 | "form_urlencoded", 1768 | "idna", 1769 | "percent-encoding", 1770 | ] 1771 | 1772 | [[package]] 1773 | name = "vec_map" 1774 | version = "0.8.2" 1775 | source = "registry+https://github.com/rust-lang/crates.io-index" 1776 | checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" 1777 | 1778 | [[package]] 1779 | name = "version_check" 1780 | version = "0.9.4" 1781 | source = "registry+https://github.com/rust-lang/crates.io-index" 1782 | checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" 1783 | 1784 | [[package]] 1785 | name = "walkdir" 1786 | version = "2.3.2" 1787 | source = "registry+https://github.com/rust-lang/crates.io-index" 1788 | checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56" 1789 | dependencies = [ 1790 | "same-file", 1791 | "winapi", 1792 | "winapi-util", 1793 | ] 1794 | 1795 | [[package]] 1796 | name = "wasi" 1797 | version = "0.11.0+wasi-snapshot-preview1" 1798 | source = "registry+https://github.com/rust-lang/crates.io-index" 1799 | checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" 1800 | 1801 | [[package]] 1802 | name = "wasm-bindgen" 1803 | version = "0.2.83" 1804 | source = "registry+https://github.com/rust-lang/crates.io-index" 1805 | checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268" 1806 | dependencies = [ 1807 | "cfg-if", 1808 | "wasm-bindgen-macro", 1809 | ] 1810 | 1811 | [[package]] 1812 | name = "wasm-bindgen-backend" 1813 | version = "0.2.83" 1814 | source = "registry+https://github.com/rust-lang/crates.io-index" 1815 | checksum = "4c8ffb332579b0557b52d268b91feab8df3615f265d5270fec2a8c95b17c1142" 1816 | dependencies = [ 1817 | "bumpalo", 1818 | "log", 1819 | "once_cell", 1820 | "proc-macro2", 1821 | "quote", 1822 | "syn", 1823 | "wasm-bindgen-shared", 1824 | ] 1825 | 1826 | [[package]] 1827 | name = "wasm-bindgen-futures" 1828 | version = "0.4.33" 1829 | source = "registry+https://github.com/rust-lang/crates.io-index" 1830 | checksum = "23639446165ca5a5de86ae1d8896b737ae80319560fbaa4c2887b7da6e7ebd7d" 1831 | dependencies = [ 1832 | "cfg-if", 1833 | "js-sys", 1834 | "wasm-bindgen", 1835 | "web-sys", 1836 | ] 1837 | 1838 | [[package]] 1839 | name = "wasm-bindgen-macro" 1840 | version = "0.2.83" 1841 | source = "registry+https://github.com/rust-lang/crates.io-index" 1842 | checksum = "052be0f94026e6cbc75cdefc9bae13fd6052cdcaf532fa6c45e7ae33a1e6c810" 1843 | dependencies = [ 1844 | "quote", 1845 | "wasm-bindgen-macro-support", 1846 | ] 1847 | 1848 | [[package]] 1849 | name = "wasm-bindgen-macro-support" 1850 | version = "0.2.83" 1851 | source = "registry+https://github.com/rust-lang/crates.io-index" 1852 | checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c" 1853 | dependencies = [ 1854 | "proc-macro2", 1855 | "quote", 1856 | "syn", 1857 | "wasm-bindgen-backend", 1858 | "wasm-bindgen-shared", 1859 | ] 1860 | 1861 | [[package]] 1862 | name = "wasm-bindgen-shared" 1863 | version = "0.2.83" 1864 | source = "registry+https://github.com/rust-lang/crates.io-index" 1865 | checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f" 1866 | 1867 | [[package]] 1868 | name = "wayland-client" 1869 | version = "0.29.5" 1870 | source = "registry+https://github.com/rust-lang/crates.io-index" 1871 | checksum = "3f3b068c05a039c9f755f881dc50f01732214f5685e379829759088967c46715" 1872 | dependencies = [ 1873 | "bitflags", 1874 | "downcast-rs", 1875 | "libc", 1876 | "nix", 1877 | "scoped-tls", 1878 | "wayland-commons", 1879 | "wayland-scanner", 1880 | "wayland-sys", 1881 | ] 1882 | 1883 | [[package]] 1884 | name = "wayland-commons" 1885 | version = "0.29.5" 1886 | source = "registry+https://github.com/rust-lang/crates.io-index" 1887 | checksum = "8691f134d584a33a6606d9d717b95c4fa20065605f798a3f350d78dced02a902" 1888 | dependencies = [ 1889 | "nix", 1890 | "once_cell", 1891 | "smallvec", 1892 | "wayland-sys", 1893 | ] 1894 | 1895 | [[package]] 1896 | name = "wayland-cursor" 1897 | version = "0.29.5" 1898 | source = "registry+https://github.com/rust-lang/crates.io-index" 1899 | checksum = "6865c6b66f13d6257bef1cd40cbfe8ef2f150fb8ebbdb1e8e873455931377661" 1900 | dependencies = [ 1901 | "nix", 1902 | "wayland-client", 1903 | "xcursor", 1904 | ] 1905 | 1906 | [[package]] 1907 | name = "wayland-egl" 1908 | version = "0.29.5" 1909 | source = "registry+https://github.com/rust-lang/crates.io-index" 1910 | checksum = "402de949f81a012926d821a2d659f930694257e76dd92b6e0042ceb27be4107d" 1911 | dependencies = [ 1912 | "wayland-client", 1913 | "wayland-sys", 1914 | ] 1915 | 1916 | [[package]] 1917 | name = "wayland-protocols" 1918 | version = "0.29.5" 1919 | source = "registry+https://github.com/rust-lang/crates.io-index" 1920 | checksum = "b950621f9354b322ee817a23474e479b34be96c2e909c14f7bc0100e9a970bc6" 1921 | dependencies = [ 1922 | "bitflags", 1923 | "wayland-client", 1924 | "wayland-commons", 1925 | "wayland-scanner", 1926 | ] 1927 | 1928 | [[package]] 1929 | name = "wayland-scanner" 1930 | version = "0.29.5" 1931 | source = "registry+https://github.com/rust-lang/crates.io-index" 1932 | checksum = "8f4303d8fa22ab852f789e75a967f0a2cdc430a607751c0499bada3e451cbd53" 1933 | dependencies = [ 1934 | "proc-macro2", 1935 | "quote", 1936 | "xml-rs", 1937 | ] 1938 | 1939 | [[package]] 1940 | name = "wayland-sys" 1941 | version = "0.29.5" 1942 | source = "registry+https://github.com/rust-lang/crates.io-index" 1943 | checksum = "be12ce1a3c39ec7dba25594b97b42cb3195d54953ddb9d3d95a7c3902bc6e9d4" 1944 | dependencies = [ 1945 | "dlib", 1946 | "lazy_static", 1947 | "pkg-config", 1948 | ] 1949 | 1950 | [[package]] 1951 | name = "web-sys" 1952 | version = "0.3.60" 1953 | source = "registry+https://github.com/rust-lang/crates.io-index" 1954 | checksum = "bcda906d8be16e728fd5adc5b729afad4e444e106ab28cd1c7256e54fa61510f" 1955 | dependencies = [ 1956 | "js-sys", 1957 | "wasm-bindgen", 1958 | ] 1959 | 1960 | [[package]] 1961 | name = "webbrowser" 1962 | version = "0.7.1" 1963 | source = "registry+https://github.com/rust-lang/crates.io-index" 1964 | checksum = "fc6a3cffdb686fbb24d9fb8f03a213803277ed2300f11026a3afe1f108dc021b" 1965 | dependencies = [ 1966 | "jni", 1967 | "ndk-glue 0.6.2", 1968 | "url", 1969 | "web-sys", 1970 | "widestring", 1971 | "winapi", 1972 | ] 1973 | 1974 | [[package]] 1975 | name = "wgpu" 1976 | version = "0.13.1" 1977 | source = "registry+https://github.com/rust-lang/crates.io-index" 1978 | checksum = "277e967bf8b7820a76852645a6bce8bbd31c32fda2042e82d8e3ea75fda8892d" 1979 | dependencies = [ 1980 | "arrayvec 0.7.2", 1981 | "js-sys", 1982 | "log", 1983 | "naga", 1984 | "parking_lot", 1985 | "raw-window-handle 0.4.3", 1986 | "smallvec", 1987 | "wasm-bindgen", 1988 | "wasm-bindgen-futures", 1989 | "web-sys", 1990 | "wgpu-core", 1991 | "wgpu-hal", 1992 | "wgpu-types", 1993 | ] 1994 | 1995 | [[package]] 1996 | name = "wgpu-core" 1997 | version = "0.13.2" 1998 | source = "registry+https://github.com/rust-lang/crates.io-index" 1999 | checksum = "89b92788dec9d0c1bed849a1b83f01b2ee12819bf04a79c90f68e4173f7b5ba2" 2000 | dependencies = [ 2001 | "arrayvec 0.7.2", 2002 | "bit-vec", 2003 | "bitflags", 2004 | "cfg_aliases", 2005 | "codespan-reporting", 2006 | "copyless", 2007 | "fxhash", 2008 | "log", 2009 | "naga", 2010 | "parking_lot", 2011 | "profiling", 2012 | "raw-window-handle 0.4.3", 2013 | "smallvec", 2014 | "thiserror", 2015 | "web-sys", 2016 | "wgpu-hal", 2017 | "wgpu-types", 2018 | ] 2019 | 2020 | [[package]] 2021 | name = "wgpu-hal" 2022 | version = "0.13.2" 2023 | source = "registry+https://github.com/rust-lang/crates.io-index" 2024 | checksum = "20cbdfc3d0637dba3d5536b93adef3d26023a0b96f0e1ee5ee9560a401d9f646" 2025 | dependencies = [ 2026 | "android_system_properties", 2027 | "arrayvec 0.7.2", 2028 | "ash", 2029 | "bit-set", 2030 | "bitflags", 2031 | "block", 2032 | "core-graphics-types", 2033 | "d3d12", 2034 | "foreign-types 0.3.2", 2035 | "fxhash", 2036 | "glow", 2037 | "gpu-alloc", 2038 | "gpu-descriptor", 2039 | "inplace_it", 2040 | "js-sys", 2041 | "khronos-egl", 2042 | "libloading", 2043 | "log", 2044 | "metal", 2045 | "naga", 2046 | "objc", 2047 | "parking_lot", 2048 | "profiling", 2049 | "range-alloc", 2050 | "raw-window-handle 0.4.3", 2051 | "renderdoc-sys", 2052 | "thiserror", 2053 | "wasm-bindgen", 2054 | "web-sys", 2055 | "wgpu-types", 2056 | "winapi", 2057 | ] 2058 | 2059 | [[package]] 2060 | name = "wgpu-types" 2061 | version = "0.13.2" 2062 | source = "registry+https://github.com/rust-lang/crates.io-index" 2063 | checksum = "1f762cbc08e1a51389859cf9c199c7aef544789cf3510889aab12c607f701604" 2064 | dependencies = [ 2065 | "bitflags", 2066 | ] 2067 | 2068 | [[package]] 2069 | name = "widestring" 2070 | version = "0.5.1" 2071 | source = "registry+https://github.com/rust-lang/crates.io-index" 2072 | checksum = "17882f045410753661207383517a6f62ec3dbeb6a4ed2acce01f0728238d1983" 2073 | 2074 | [[package]] 2075 | name = "winapi" 2076 | version = "0.3.9" 2077 | source = "registry+https://github.com/rust-lang/crates.io-index" 2078 | checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" 2079 | dependencies = [ 2080 | "winapi-i686-pc-windows-gnu", 2081 | "winapi-x86_64-pc-windows-gnu", 2082 | ] 2083 | 2084 | [[package]] 2085 | name = "winapi-i686-pc-windows-gnu" 2086 | version = "0.4.0" 2087 | source = "registry+https://github.com/rust-lang/crates.io-index" 2088 | checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 2089 | 2090 | [[package]] 2091 | name = "winapi-util" 2092 | version = "0.1.5" 2093 | source = "registry+https://github.com/rust-lang/crates.io-index" 2094 | checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" 2095 | dependencies = [ 2096 | "winapi", 2097 | ] 2098 | 2099 | [[package]] 2100 | name = "winapi-wsapoll" 2101 | version = "0.1.1" 2102 | source = "registry+https://github.com/rust-lang/crates.io-index" 2103 | checksum = "44c17110f57155602a80dca10be03852116403c9ff3cd25b079d666f2aa3df6e" 2104 | dependencies = [ 2105 | "winapi", 2106 | ] 2107 | 2108 | [[package]] 2109 | name = "winapi-x86_64-pc-windows-gnu" 2110 | version = "0.4.0" 2111 | source = "registry+https://github.com/rust-lang/crates.io-index" 2112 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 2113 | 2114 | [[package]] 2115 | name = "windows-sys" 2116 | version = "0.36.1" 2117 | source = "registry+https://github.com/rust-lang/crates.io-index" 2118 | checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" 2119 | dependencies = [ 2120 | "windows_aarch64_msvc", 2121 | "windows_i686_gnu", 2122 | "windows_i686_msvc", 2123 | "windows_x86_64_gnu", 2124 | "windows_x86_64_msvc", 2125 | ] 2126 | 2127 | [[package]] 2128 | name = "windows_aarch64_msvc" 2129 | version = "0.36.1" 2130 | source = "registry+https://github.com/rust-lang/crates.io-index" 2131 | checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" 2132 | 2133 | [[package]] 2134 | name = "windows_i686_gnu" 2135 | version = "0.36.1" 2136 | source = "registry+https://github.com/rust-lang/crates.io-index" 2137 | checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" 2138 | 2139 | [[package]] 2140 | name = "windows_i686_msvc" 2141 | version = "0.36.1" 2142 | source = "registry+https://github.com/rust-lang/crates.io-index" 2143 | checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" 2144 | 2145 | [[package]] 2146 | name = "windows_x86_64_gnu" 2147 | version = "0.36.1" 2148 | source = "registry+https://github.com/rust-lang/crates.io-index" 2149 | checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" 2150 | 2151 | [[package]] 2152 | name = "windows_x86_64_msvc" 2153 | version = "0.36.1" 2154 | source = "registry+https://github.com/rust-lang/crates.io-index" 2155 | checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" 2156 | 2157 | [[package]] 2158 | name = "winit" 2159 | version = "0.27.3" 2160 | source = "registry+https://github.com/rust-lang/crates.io-index" 2161 | checksum = "a22e94ba35ca3ff11820044bfa0dc48b95a3a15569c0068555566a12ef41c9e5" 2162 | dependencies = [ 2163 | "bitflags", 2164 | "cocoa", 2165 | "core-foundation", 2166 | "core-graphics", 2167 | "dispatch", 2168 | "instant", 2169 | "libc", 2170 | "log", 2171 | "mio", 2172 | "ndk 0.7.0", 2173 | "ndk-glue 0.7.0", 2174 | "objc", 2175 | "once_cell", 2176 | "parking_lot", 2177 | "percent-encoding", 2178 | "raw-window-handle 0.4.3", 2179 | "raw-window-handle 0.5.0", 2180 | "sctk-adwaita", 2181 | "smithay-client-toolkit", 2182 | "wasm-bindgen", 2183 | "wayland-client", 2184 | "wayland-protocols", 2185 | "web-sys", 2186 | "windows-sys", 2187 | "x11-dl", 2188 | ] 2189 | 2190 | [[package]] 2191 | name = "wio" 2192 | version = "0.2.2" 2193 | source = "registry+https://github.com/rust-lang/crates.io-index" 2194 | checksum = "5d129932f4644ac2396cb456385cbf9e63b5b30c6e8dc4820bdca4eb082037a5" 2195 | dependencies = [ 2196 | "winapi", 2197 | ] 2198 | 2199 | [[package]] 2200 | name = "x11-dl" 2201 | version = "2.20.0" 2202 | source = "registry+https://github.com/rust-lang/crates.io-index" 2203 | checksum = "0c83627bc137605acc00bb399c7b908ef460b621fc37c953db2b09f88c449ea6" 2204 | dependencies = [ 2205 | "lazy_static", 2206 | "libc", 2207 | "pkg-config", 2208 | ] 2209 | 2210 | [[package]] 2211 | name = "x11rb" 2212 | version = "0.10.1" 2213 | source = "registry+https://github.com/rust-lang/crates.io-index" 2214 | checksum = "592b4883219f345e712b3209c62654ebda0bb50887f330cbd018d0f654bfd507" 2215 | dependencies = [ 2216 | "gethostname", 2217 | "nix", 2218 | "winapi", 2219 | "winapi-wsapoll", 2220 | "x11rb-protocol", 2221 | ] 2222 | 2223 | [[package]] 2224 | name = "x11rb-protocol" 2225 | version = "0.10.0" 2226 | source = "registry+https://github.com/rust-lang/crates.io-index" 2227 | checksum = "56b245751c0ac9db0e006dc812031482784e434630205a93c73cfefcaabeac67" 2228 | dependencies = [ 2229 | "nix", 2230 | ] 2231 | 2232 | [[package]] 2233 | name = "xcursor" 2234 | version = "0.3.4" 2235 | source = "registry+https://github.com/rust-lang/crates.io-index" 2236 | checksum = "463705a63313cd4301184381c5e8042f0a7e9b4bb63653f216311d4ae74690b7" 2237 | dependencies = [ 2238 | "nom", 2239 | ] 2240 | 2241 | [[package]] 2242 | name = "xml-rs" 2243 | version = "0.8.4" 2244 | source = "registry+https://github.com/rust-lang/crates.io-index" 2245 | checksum = "d2d7d3948613f75c98fd9328cfdcc45acc4d360655289d0a7d4ec931392200a3" 2246 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "egui_gpu_plot" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [[example]] 7 | name = "lorenz" 8 | 9 | [dependencies] 10 | bytemuck = "1.12" 11 | 12 | egui = { git = "https://github.com/emilk/egui" } 13 | egui-wgpu = { git = "https://github.com/emilk/egui" } 14 | wgpu = "0.13" 15 | 16 | [dev-dependencies] 17 | eframe = { git = "https://github.com/emilk/egui", features = ["wgpu"] } 18 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # egui_wgpu_plot 2 | 3 | Experiments in rendering 2D line plots in egui directly on the GPU with minimal 4 | copying. 5 | 6 | ## Demo 7 | 8 | cargo run --release --example lorenz 9 | 10 | https://user-images.githubusercontent.com/233860/192120927-0761b56c-a50e-4ee9-a7ab-147b3b3c04e0.mp4 11 | 12 | ## Theory 13 | 14 | In order to achieve realtime rendering performance on large datasets (1M+ 15 | points), the transformation from data-space to screen-space is performed on the 16 | GPU. This means that GPU vertex buffers are only updated if the data changes, 17 | not when the view is panned or zoomed. 18 | 19 | In order to draw nice-looking lines, the approach described in [Drawing 20 | Antialiased Lines with OpenGL][1] is used. Duplicate vertices are provided to 21 | the GPU, one with each normal vector of the line at that point. This is provided 22 | to the shader as a triangle strip, which then offsets the vertices along their 23 | normals to add line width and feathers the edge for anti-aliasing. 24 | 25 | ![](https://miro.medium.com/max/640/0*8ZZJdx9kleLSsT_Z.png) 26 | 27 | [1]: https://blog.mapbox.com/drawing-antialiased-lines-with-opengl-8766f34192dc 28 | -------------------------------------------------------------------------------- /examples/lorenz.rs: -------------------------------------------------------------------------------- 1 | use std::sync::Arc; 2 | 3 | use eframe::egui::plot::{Legend, PlotImage}; 4 | use eframe::egui::{self, plot::PlotBounds}; 5 | use eframe::emath::Vec2; 6 | use wgpu; 7 | 8 | use egui_gpu_plot::*; 9 | 10 | const MAX_POINTS: usize = 1_000_000; 11 | 12 | pub struct GpuPlot { 13 | q: [f32; 3], 14 | 15 | show_cpu: bool, 16 | show_gpu: bool, 17 | 18 | dirty: bool, 19 | texture_id: egui::TextureId, 20 | points: Arc>, 21 | } 22 | 23 | impl GpuPlot { 24 | pub fn new<'a>(cc: &'a eframe::CreationContext<'a>) -> Option { 25 | let wgpu_render_state = cc.wgpu_render_state.as_ref()?; 26 | 27 | let device = &wgpu_render_state.device; 28 | let target_format = wgpu_render_state.target_format; 29 | 30 | let plot = GpuAcceleratedPlot::new(device, target_format); 31 | let texture_id = { 32 | let mut renderer = wgpu_render_state.renderer.write(); 33 | renderer.register_native_texture(device, &plot.create_view(), wgpu::FilterMode::Linear) 34 | }; 35 | 36 | wgpu_render_state 37 | .renderer 38 | .write() 39 | .paint_callback_resources 40 | .insert(plot); 41 | 42 | let q = [10.0, 28.0, 8.0 / 3.0]; 43 | Some(Self { 44 | q, 45 | show_cpu: false, 46 | show_gpu: true, 47 | dirty: true, 48 | texture_id, 49 | points: Arc::new(forward_euler(lorenz, q, MAX_POINTS)), 50 | }) 51 | } 52 | } 53 | 54 | fn lorenz(q: [f32; 3], s: [f32; 3]) -> [f32; 3] { 55 | let sigma = q[0]; 56 | let rho = q[1]; 57 | let beta = q[2]; 58 | 59 | [ 60 | sigma * (s[1] - s[0]), 61 | s[0] * (rho - s[2]) - s[1], 62 | s[0] * s[1] - beta * s[2], 63 | ] 64 | } 65 | 66 | fn forward_euler(df: F, q: [f32; 3], n: usize) -> Vec 67 | where 68 | F: Fn([f32; 3], [f32; 3]) -> [f32; 3], 69 | { 70 | let tf = 1000.0; 71 | let dt = tf / n as f32; 72 | 73 | let mut s = [1.0, 0.0, 0.0]; 74 | let mut vs = Vec::with_capacity(n); 75 | 76 | for i in 0..n { 77 | let pct = i as f32 / n as f32; 78 | 79 | let ds = df(q, s); 80 | for j in 0..s.len() { 81 | s[j] += ds[j] * dt; 82 | } 83 | 84 | let position = [s[0], s[2]]; 85 | let normal = egui::Vec2::new(ds[0], ds[2]).normalized().rot90(); 86 | let color = egui::color::Hsva::new(pct, 0.85, 0.5, 1.0).to_rgba_premultiplied(); 87 | 88 | vs.push(Vertex { 89 | position, 90 | normal: [normal.x, normal.y], 91 | color, 92 | }); 93 | // two vertices per 94 | vs.push(Vertex { 95 | position, 96 | normal: [-normal.x, -normal.y], 97 | color, 98 | }); 99 | } 100 | 101 | vs 102 | } 103 | 104 | impl eframe::App for GpuPlot { 105 | fn update(&mut self, ctx: &egui::Context, frame: &mut eframe::Frame) { 106 | egui::CentralPanel::default().show(ctx, |ui| { 107 | let mut new_sigma = self.q[0]; 108 | let mut new_rho = self.q[1]; 109 | let mut new_beta = self.q[2]; 110 | 111 | ui.horizontal(|ui| { 112 | for (l, v, range) in [ 113 | ("σ", &mut new_sigma, 0.0..=20.0), 114 | ("ρ", &mut new_rho, 0.0..=50.0), 115 | ("β", &mut new_beta, 0.0..=10.0), 116 | ] { 117 | ui.label(l); 118 | ui.add(egui::Slider::new(v, range).step_by(0.01)); 119 | } 120 | 121 | ui.toggle_value(&mut self.show_cpu, "CPU"); 122 | ui.toggle_value(&mut self.show_gpu, "GPU"); 123 | }); 124 | 125 | if self.q != [new_sigma, new_rho, new_beta] { 126 | self.q = [new_sigma, new_rho, new_beta]; 127 | 128 | self.points = Arc::new(forward_euler(lorenz, self.q, MAX_POINTS)); 129 | self.dirty = true; 130 | } 131 | 132 | let mut bounds = PlotBounds::NOTHING; 133 | let resp = egui::plot::Plot::new("my_plot") 134 | .legend(Legend::default()) 135 | // Must set margins to zero or the image and plot bounds will 136 | // constantly fight, expanding the plot to infinity. 137 | .set_margin_fraction(Vec2::new(0.0, 0.0)) 138 | .include_x(-25.0) 139 | .include_x(25.0) 140 | .include_y(0.0) 141 | .include_y(60.0) 142 | .show(ui, |ui| { 143 | bounds = ui.plot_bounds(); 144 | 145 | if self.show_gpu { 146 | // Render the plot texture filling the viewport. 147 | ui.image( 148 | PlotImage::new( 149 | self.texture_id, 150 | bounds.center(), 151 | [bounds.width() as f32, bounds.height() as f32], 152 | ) 153 | .name("Lorenz attractor (GPU)"), 154 | ); 155 | } 156 | 157 | if self.show_cpu { 158 | ui.line( 159 | egui::plot::Line::new(egui::plot::PlotPoints::from_iter( 160 | self.points 161 | .iter() 162 | .map(|p| [p.position[0] as f64, p.position[1] as f64]), 163 | )) 164 | .name("Lorenz attractor (CPU)"), 165 | ); 166 | } 167 | }); 168 | 169 | if self.show_gpu { 170 | // Add a callback to egui to render the plot contents to 171 | // texture. 172 | ui.painter().add(egui_wgpu_callback( 173 | bounds, 174 | Arc::clone(&self.points), 175 | resp.response.rect, 176 | self.dirty, 177 | )); 178 | 179 | // Update the texture handle in egui from the previously 180 | // rendered texture (from the last frame). 181 | let wgpu_render_state = frame.wgpu_render_state().unwrap(); 182 | let mut renderer = wgpu_render_state.renderer.write(); 183 | 184 | let plot: &GpuAcceleratedPlot = renderer.paint_callback_resources.get().unwrap(); 185 | let texture_view = plot.create_view(); 186 | 187 | renderer.update_egui_texture_from_wgpu_texture( 188 | &wgpu_render_state.device, 189 | &texture_view, 190 | wgpu::FilterMode::Linear, 191 | self.texture_id, 192 | ); 193 | 194 | self.dirty = false; 195 | } 196 | }); 197 | } 198 | } 199 | 200 | fn main() { 201 | let native_options = eframe::NativeOptions { 202 | renderer: eframe::Renderer::Wgpu, 203 | ..Default::default() 204 | }; 205 | 206 | eframe::run_native( 207 | "GPU Accelerated Plotter", 208 | native_options, 209 | Box::new(|cc| Box::new(GpuPlot::new(cc).unwrap())), 210 | ); 211 | } 212 | -------------------------------------------------------------------------------- /shell.nix: -------------------------------------------------------------------------------- 1 | { pkgs ? import {} }: 2 | 3 | with pkgs; 4 | 5 | mkShell { 6 | nativeBuildInputs = [ 7 | cmake pkg-config fontconfig 8 | xorg.libX11 xorg.libXcursor xorg.libXrandr xorg.libXi 9 | vulkan-tools vulkan-loader 10 | 11 | rust-analyzer 12 | ]; 13 | 14 | shellHook = '' 15 | LD_LIBRARY_PATH="${lib.strings.makeLibraryPath [ xorg.libX11 xorg.libXcursor xorg.libXrandr xorg.libXi vulkan-loader ]}" 16 | ''; 17 | } 18 | -------------------------------------------------------------------------------- /src/lib.rs: -------------------------------------------------------------------------------- 1 | use std::{iter, sync::Arc}; 2 | 3 | use egui::plot::PlotBounds; 4 | use wgpu::{util::DeviceExt, TextureViewDescriptor}; 5 | 6 | const MSAA_SAMPLE_COUNT: u32 = 1; 7 | const MAX_POINTS: usize = 5_000_000; 8 | 9 | const DEFAULT_WIDTH: u32 = 1; 10 | const DEFAULT_HEIGHT: u32 = 1; 11 | 12 | #[repr(C)] 13 | #[derive(Clone, Copy, Default, bytemuck::Pod, bytemuck::Zeroable)] 14 | pub struct Vertex { 15 | pub position: [f32; 2], 16 | pub normal: [f32; 2], 17 | pub color: [f32; 4], 18 | } 19 | 20 | #[repr(C)] 21 | #[derive(Clone, Copy, Default, bytemuck::Pod, bytemuck::Zeroable)] 22 | pub struct Uniform { 23 | pub x_bounds: [f32; 2], 24 | pub y_bounds: [f32; 2], 25 | } 26 | 27 | pub struct GpuAcceleratedPlot { 28 | pipeline: wgpu::RenderPipeline, 29 | target_format: wgpu::TextureFormat, 30 | bind_group: wgpu::BindGroup, 31 | 32 | uniform_buffer: wgpu::Buffer, 33 | vertex_buffer: wgpu::Buffer, 34 | vertex_count: u32, 35 | 36 | texture: (wgpu::Texture, wgpu::TextureView), 37 | multisampled_texture: (wgpu::Texture, wgpu::TextureView), 38 | width: u32, 39 | height: u32, 40 | } 41 | 42 | impl GpuAcceleratedPlot { 43 | pub fn new(device: &wgpu::Device, target_format: wgpu::TextureFormat) -> GpuAcceleratedPlot { 44 | let shader = device.create_shader_module(wgpu::ShaderModuleDescriptor { 45 | label: Some("egui_plot_line_shader"), 46 | source: wgpu::ShaderSource::Wgsl(include_str!("./line_shader.wgsl").into()), 47 | }); 48 | 49 | let bind_group_layout = device.create_bind_group_layout(&wgpu::BindGroupLayoutDescriptor { 50 | label: Some("egui_plot_bind_group_layout"), 51 | entries: &[wgpu::BindGroupLayoutEntry { 52 | binding: 0, 53 | visibility: wgpu::ShaderStages::VERTEX, 54 | ty: wgpu::BindingType::Buffer { 55 | ty: wgpu::BufferBindingType::Uniform, 56 | has_dynamic_offset: false, 57 | min_binding_size: None, 58 | }, 59 | count: None, 60 | }], 61 | }); 62 | 63 | let pipeline_layout = device.create_pipeline_layout(&wgpu::PipelineLayoutDescriptor { 64 | label: Some("egui_plot_pipeline_layout"), 65 | bind_group_layouts: &[&bind_group_layout], 66 | push_constant_ranges: &[], 67 | }); 68 | 69 | let pipeline = device.create_render_pipeline(&wgpu::RenderPipelineDescriptor { 70 | label: Some("egui_plot_pipeline"), 71 | layout: Some(&pipeline_layout), 72 | vertex: wgpu::VertexState { 73 | module: &shader, 74 | entry_point: "vs_main", 75 | buffers: &[wgpu::VertexBufferLayout { 76 | array_stride: std::mem::size_of::() as wgpu::BufferAddress, 77 | step_mode: wgpu::VertexStepMode::Vertex, 78 | attributes: &wgpu::vertex_attr_array![0 => Float32x2, 1 => Float32x2, 2 => Float32x4], 79 | }], 80 | }, 81 | fragment: Some(wgpu::FragmentState { 82 | module: &shader, 83 | entry_point: "fs_main", 84 | targets: &[Some(wgpu::ColorTargetState { 85 | format: target_format, 86 | blend: Some(wgpu::BlendState::ALPHA_BLENDING), 87 | write_mask: wgpu::ColorWrites::ALL, 88 | })], 89 | }), 90 | primitive: wgpu::PrimitiveState { 91 | topology: wgpu::PrimitiveTopology::TriangleStrip, 92 | ..Default::default() 93 | }, 94 | depth_stencil: None, 95 | multisample: wgpu::MultisampleState { 96 | count: MSAA_SAMPLE_COUNT, 97 | ..Default::default() 98 | }, 99 | multiview: None, 100 | }); 101 | 102 | let uniform_buffer = device.create_buffer_init(&wgpu::util::BufferInitDescriptor { 103 | label: Some("egui_plot_uniforms"), 104 | contents: bytemuck::cast_slice(&[Uniform { 105 | x_bounds: [-1.0, 1.0], 106 | y_bounds: [-1.0, 1.0], 107 | }]), 108 | usage: wgpu::BufferUsages::COPY_DST 109 | | wgpu::BufferUsages::MAP_WRITE 110 | | wgpu::BufferUsages::UNIFORM, 111 | }); 112 | 113 | let vertex_buffer = device.create_buffer_init(&wgpu::util::BufferInitDescriptor { 114 | label: Some("egui_plot_vertices"), 115 | contents: bytemuck::cast_slice(&vec![Vertex::default(); MAX_POINTS]), 116 | usage: wgpu::BufferUsages::COPY_DST 117 | | wgpu::BufferUsages::MAP_WRITE 118 | | wgpu::BufferUsages::VERTEX, 119 | }); 120 | 121 | let bind_group = device.create_bind_group(&wgpu::BindGroupDescriptor { 122 | label: Some("egui_plot_bind_group"), 123 | layout: &bind_group_layout, 124 | entries: &[wgpu::BindGroupEntry { 125 | binding: 0, 126 | resource: uniform_buffer.as_entire_binding(), 127 | }], 128 | }); 129 | 130 | // Allocate some stand-in textures since we don't know the final width 131 | // and height yet. 132 | let texture = Self::create_texture(device, target_format, 1, DEFAULT_WIDTH, DEFAULT_HEIGHT); 133 | let multisampled_texture = Self::create_texture( 134 | device, 135 | target_format, 136 | MSAA_SAMPLE_COUNT, 137 | DEFAULT_WIDTH, 138 | DEFAULT_HEIGHT, 139 | ); 140 | 141 | GpuAcceleratedPlot { 142 | pipeline, 143 | target_format, 144 | bind_group, 145 | uniform_buffer, 146 | vertex_buffer, 147 | vertex_count: 0, 148 | texture, 149 | multisampled_texture, 150 | width: DEFAULT_WIDTH, 151 | height: DEFAULT_HEIGHT, 152 | } 153 | } 154 | 155 | fn create_texture( 156 | device: &wgpu::Device, 157 | target_format: wgpu::TextureFormat, 158 | sample_count: u32, 159 | width: u32, 160 | height: u32, 161 | ) -> (wgpu::Texture, wgpu::TextureView) { 162 | let texture = device.create_texture(&wgpu::TextureDescriptor { 163 | label: Some("egui_plot_texture"), 164 | size: wgpu::Extent3d { 165 | width, 166 | height, 167 | depth_or_array_layers: 1, 168 | }, 169 | mip_level_count: 1, 170 | sample_count, 171 | dimension: wgpu::TextureDimension::D2, 172 | format: target_format, 173 | usage: wgpu::TextureUsages::TEXTURE_BINDING | wgpu::TextureUsages::RENDER_ATTACHMENT, 174 | }); 175 | 176 | let view = texture.create_view(&TextureViewDescriptor::default()); 177 | 178 | (texture, view) 179 | } 180 | 181 | pub fn create_view(&self) -> wgpu::TextureView { 182 | self.texture 183 | .0 184 | .create_view(&wgpu::TextureViewDescriptor::default()) 185 | } 186 | 187 | fn create_multisampled_view(&self) -> wgpu::TextureView { 188 | self.multisampled_texture 189 | .0 190 | .create_view(&wgpu::TextureViewDescriptor::default()) 191 | } 192 | 193 | pub fn prepare( 194 | &mut self, 195 | device: &wgpu::Device, 196 | queue: &wgpu::Queue, 197 | dimensions: [u32; 2], 198 | bounds: &PlotBounds, 199 | points: &[Vertex], 200 | dirty: bool, 201 | ) { 202 | // Re-allocate the render targets if the requested dimensions have changed. 203 | if dimensions[0] != self.width || dimensions[1] != self.height { 204 | self.width = dimensions[0]; 205 | self.height = dimensions[1]; 206 | 207 | self.texture = 208 | Self::create_texture(device, self.target_format, 1, self.width, self.height); 209 | self.multisampled_texture = Self::create_texture( 210 | device, 211 | self.target_format, 212 | MSAA_SAMPLE_COUNT, 213 | self.width, 214 | self.height, 215 | ); 216 | } 217 | 218 | queue.write_buffer( 219 | &self.uniform_buffer, 220 | 0, 221 | bytemuck::cast_slice(&[Uniform { 222 | x_bounds: [bounds.min()[0] as f32, bounds.max()[0] as f32], 223 | y_bounds: [bounds.min()[1] as f32, bounds.max()[1] as f32], 224 | }]), 225 | ); 226 | 227 | // Only re-upload the vertex buffer if it has changed. 228 | // TODO: for time-series charts where the buffer acts as a ring, we 229 | // could be smart about updating only the subset of added/removed 230 | // vertices. 231 | if dirty { 232 | self.vertex_count = points.len() as u32; 233 | queue.write_buffer(&self.vertex_buffer, 0, bytemuck::cast_slice(points)); 234 | } 235 | } 236 | 237 | pub fn render(&self, device: &wgpu::Device, queue: &wgpu::Queue) { 238 | let mut encoder = 239 | device.create_command_encoder(&wgpu::CommandEncoderDescriptor { label: None }); 240 | { 241 | let view = self.create_view(); 242 | let msaa_view = self.create_multisampled_view(); 243 | 244 | // Render directly to the texture if no MSAA, or use the 245 | // multisampled buffer and resolve to the texture if using MSAA. 246 | let rpass_color_attachment = if MSAA_SAMPLE_COUNT == 1 { 247 | wgpu::RenderPassColorAttachment { 248 | view: &view, 249 | resolve_target: None, 250 | ops: wgpu::Operations { 251 | load: wgpu::LoadOp::Clear(wgpu::Color::TRANSPARENT), 252 | store: true, 253 | }, 254 | } 255 | } else { 256 | wgpu::RenderPassColorAttachment { 257 | view: &msaa_view, 258 | resolve_target: Some(&view), 259 | ops: wgpu::Operations { 260 | load: wgpu::LoadOp::Clear(wgpu::Color::TRANSPARENT), 261 | store: false, 262 | }, 263 | } 264 | }; 265 | 266 | let mut rpass = encoder.begin_render_pass(&wgpu::RenderPassDescriptor { 267 | label: None, 268 | color_attachments: &[Some(rpass_color_attachment)], 269 | depth_stencil_attachment: None, 270 | }); 271 | 272 | self.render_onto_renderpass(&mut rpass); 273 | } 274 | 275 | queue.submit(iter::once(encoder.finish())); 276 | } 277 | 278 | pub fn render_onto_renderpass<'rp>(&'rp self, rpass: &mut wgpu::RenderPass<'rp>) { 279 | rpass.set_pipeline(&self.pipeline); 280 | rpass.set_vertex_buffer(0, self.vertex_buffer.slice(..)); 281 | rpass.set_bind_group(0, &self.bind_group, &[]); 282 | rpass.draw(0..self.vertex_count, 0..1); 283 | } 284 | } 285 | 286 | pub fn egui_wgpu_callback( 287 | bounds: PlotBounds, 288 | points: Arc>, 289 | rect: egui::Rect, 290 | dirty: bool, 291 | ) -> egui::PaintCallback { 292 | let cb = 293 | egui_wgpu::CallbackFn::new().prepare(move |device, queue, paint_callback_resources| { 294 | let plot: &mut GpuAcceleratedPlot = paint_callback_resources.get_mut().unwrap(); 295 | 296 | plot.prepare( 297 | device, 298 | queue, 299 | [rect.width() as u32, rect.height() as u32], 300 | &bounds, 301 | &points, 302 | dirty, 303 | ); 304 | 305 | plot.render(device, queue); 306 | }); 307 | 308 | egui::PaintCallback { 309 | rect, 310 | callback: Arc::new(cb), 311 | } 312 | } 313 | -------------------------------------------------------------------------------- /src/line_shader.wgsl: -------------------------------------------------------------------------------- 1 | struct VertexOut { 2 | @location(0) color: vec4, 3 | @location(1) norm: vec2, 4 | @builtin(position) position: vec4, 5 | }; 6 | 7 | struct Uniforms { 8 | x_range: vec2, 9 | y_range: vec2, 10 | }; 11 | 12 | @group(0) @binding(0) 13 | var uniforms: Uniforms; 14 | 15 | let LINE_WIDTH: f32 = 0.002; 16 | let FEATHER: f32 = 0.50; 17 | 18 | @vertex 19 | fn vs_main(@location(0) position: vec2, 20 | @location(1) norm: vec2, 21 | @location(2) color: vec4) -> VertexOut { 22 | var out: VertexOut; 23 | 24 | let width = (uniforms.x_range[1] - uniforms.x_range[0]); 25 | let height = (uniforms.y_range[1] - uniforms.y_range[0]); 26 | 27 | // Convert from data space (x0..x1, y0..y1) to view space (-1..1, -1..1). 28 | let x = mix(-1.0, 1.0, (position.x - uniforms.x_range[0]) / width); 29 | let y = mix(-1.0, 1.0, (position.y - uniforms.y_range[0]) / height); 30 | 31 | // Move the point along the normal by LINE_WIDTH. If the normals are 32 | // provided such that they are sequentially flipped, this forms a triangle 33 | // strip the width of the line. 34 | let delta = vec4(LINE_WIDTH * norm, 0.0, 0.0); 35 | 36 | out.color = color; 37 | out.norm = norm; 38 | out.position = vec4(x, y, 0.0, 1.0) + delta; 39 | 40 | return out; 41 | } 42 | 43 | @fragment 44 | fn fs_main(in: VertexOut) -> @location(0) vec4 { 45 | // At the edge of the line (final FEATHER % width) feather out the alpha 46 | // channel to zero. 47 | let alpha = smoothstep(0.0, 1.0, (1.0 - length(in.norm)) / FEATHER); 48 | 49 | return vec4(in.color.xyz, alpha * in.color.w); 50 | } 51 | --------------------------------------------------------------------------------