From 4132183bd391467e4a572a8e2b8265fe9a87c9cb Mon Sep 17 00:00:00 2001 From: Guilherme Werner Date: Fri, 16 Feb 2024 19:56:32 -0300 Subject: [PATCH] Create wgpu surface --- Cargo.toml | 4 + examples/index.html | 7 +- src/lib.rs | 226 ++++++++++++++++++++++++++++++++++++++++---- src/main.rs | 7 +- 4 files changed, 221 insertions(+), 23 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 593721a..da64b5d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,12 +17,16 @@ name = "renderer" path = "src/main.rs" [dependencies] +anyhow = "1.0" cfg-if = "1" env_logger = "0.10" log = "0.4" wgpu = "0.18" winit = "0.28" +[target.'cfg(not(target_arch = "wasm32"))'.dependencies] +tokio = { version = "1.36.0", features = ["full"] } + [target.'cfg(target_arch = "wasm32")'.dependencies] console_error_panic_hook = "0.1.6" console_log = "1.0" diff --git a/examples/index.html b/examples/index.html index 091656c..c0d9484 100644 --- a/examples/index.html +++ b/examples/index.html @@ -7,13 +7,18 @@ - +