From 7b1b66d4bcc59a5cb33721921faa533e560352df Mon Sep 17 00:00:00 2001 From: arcadeperfect Date: Mon, 26 Aug 2024 21:38:35 -0400 Subject: [PATCH] wasm deploy attempt 2 --- Cargo.lock | 93 +++++++++---------------------------------------- Cargo.toml | 3 +- src/mesh_ops.rs | 9 +++-- 3 files changed, 26 insertions(+), 79 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 939af41..997d473 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -110,12 +110,13 @@ checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" [[package]] name = "alsa" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37fe60779335388a88c01ac6c3be40304d1e349de3ada3b15f7808bb90fa9dce" +checksum = "ed7572b7ba83a31e20d1b48970ee402d2e3e0537dcfe0a3ff4d6eb7508617d43" dependencies = [ "alsa-sys", "bitflags 2.6.0", + "cfg-if", "libc", ] @@ -1943,9 +1944,9 @@ dependencies = [ [[package]] name = "gilrs-core" -version = "0.5.13" +version = "0.5.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbb5e8d912059b33b463831c16b838d15c4772d584ce332e4a80f6dffdae2bc1" +checksum = "732dadc05170599ddec9a89653f10d7a2af54da9181b3fa6e2bd49907ec8f7e4" dependencies = [ "core-foundation", "inotify", @@ -1959,7 +1960,7 @@ dependencies = [ "vec_map", "wasm-bindgen", "web-sys", - "windows 0.58.0", + "windows 0.52.0", ] [[package]] @@ -3091,9 +3092,12 @@ dependencies = [ [[package]] name = "ppv-lite86" -version = "0.2.17" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" +dependencies = [ + "zerocopy", +] [[package]] name = "presser" @@ -3309,9 +3313,9 @@ dependencies = [ [[package]] name = "ruzstd" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5022b253619b1ba797f243056276bed8ed1a73b0f5a7ce7225d524067644bf8f" +checksum = "1c8b8f3d26bd9f945e5cbae77f7cdfbf37af9a66956f1115eb4516e45df519f4" dependencies = [ "byteorder", "twox-hash", @@ -4178,18 +4182,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9252e5725dbed82865af151df558e754e4a3c2c30818359eb17465f1346a1b49" dependencies = [ "windows-core 0.54.0", - "windows-implement 0.53.0", - "windows-interface 0.53.0", - "windows-targets 0.52.6", -] - -[[package]] -name = "windows" -version = "0.58.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd04d41d93c4992d421894c18c8b43496aa748dd4c081bac0dc93eb0489272b6" -dependencies = [ - "windows-core 0.58.0", + "windows-implement", + "windows-interface", "windows-targets 0.52.6", ] @@ -4208,20 +4202,7 @@ version = "0.54.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "12661b9c89351d684a50a8a643ce5f608e20243b9fb84687800163429f161d65" dependencies = [ - "windows-result 0.1.2", - "windows-targets 0.52.6", -] - -[[package]] -name = "windows-core" -version = "0.58.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ba6d44ec8c2591c134257ce647b7ea6b20335bf6379a27dac5f1641fcf59f99" -dependencies = [ - "windows-implement 0.58.0", - "windows-interface 0.58.0", - "windows-result 0.2.0", - "windows-strings", + "windows-result", "windows-targets 0.52.6", ] @@ -4236,17 +4217,6 @@ dependencies = [ "syn 2.0.74", ] -[[package]] -name = "windows-implement" -version = "0.58.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.74", -] - [[package]] name = "windows-interface" version = "0.53.0" @@ -4258,17 +4228,6 @@ dependencies = [ "syn 2.0.74", ] -[[package]] -name = "windows-interface" -version = "0.58.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.74", -] - [[package]] name = "windows-result" version = "0.1.2" @@ -4278,25 +4237,6 @@ dependencies = [ "windows-targets 0.52.6", ] -[[package]] -name = "windows-result" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" -dependencies = [ - "windows-targets 0.52.6", -] - -[[package]] -name = "windows-strings" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" -dependencies = [ - "windows-result 0.2.0", - "windows-targets 0.52.6", -] - [[package]] name = "windows-sys" version = "0.45.0" @@ -4647,6 +4587,7 @@ version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" dependencies = [ + "byteorder", "zerocopy-derive", ] diff --git a/Cargo.toml b/Cargo.toml index f67888f..ee2e9a2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,6 @@ serde_json = "1.0" tracing = "0.1" anyhow = "1.0.66" bevy_panorbit_camera = { version = "0.19", features = ["bevy_egui"] } - wasm-bindgen = "0.2.93" # bevy_egui = "0.29.0" # Use the version compatible with your Bevy version bevy_egui = { version = "0.28", default-features = false, features = [ @@ -19,6 +18,8 @@ bevy_egui = { version = "0.28", default-features = false, features = [ "default_fonts", ] } +[profile.release] +opt-level = 'z' [target.wasm32-unknown-unknown] runner = "wasm-server-runner" diff --git a/src/mesh_ops.rs b/src/mesh_ops.rs index 7a6fbf3..f0c12ff 100644 --- a/src/mesh_ops.rs +++ b/src/mesh_ops.rs @@ -1,4 +1,5 @@ -use anyhow::Result; +use anyhow::{anyhow, Result}; + use bevy::{ math::Vec3, prelude::Mesh, @@ -109,7 +110,11 @@ pub trait mesh_to_line_list { impl mesh_to_line_list for Mesh { fn mesh_to_line_list(&self) -> LineList { - mesh_to_line_list(self) + match mesh_to_line_list(self) { + Ok(line_list) => line_list, + Err(e) => panic!("Failed to convert mesh to line list: {}", e), + } + } }