diff --git a/bachelorarbeit/Cargo.lock b/bachelorarbeit/Cargo.lock index d7359e4..fdbf0b3 100644 --- a/bachelorarbeit/Cargo.lock +++ b/bachelorarbeit/Cargo.lock @@ -460,9 +460,11 @@ dependencies = [ "egui_extras", "egui_plot", "gauss-quad", + "gloo-net", "indicatif", "nohash-hasher", "num", + "wasm-bindgen-futures", ] [[package]] @@ -1251,6 +1253,12 @@ dependencies = [ "miniz_oxide", ] +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + [[package]] name = "foreign-types" version = "0.5.0" @@ -1287,6 +1295,15 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "futures-channel" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" +dependencies = [ + "futures-core", +] + [[package]] name = "futures-core" version = "0.3.30" @@ -1406,6 +1423,40 @@ dependencies = [ "xml-rs", ] +[[package]] +name = "gloo-net" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43aaa242d1239a8822c15c645f02166398da4f8b5c4bae795c1f5b44e9eee173" +dependencies = [ + "futures-channel", + "futures-core", + "futures-sink", + "gloo-utils", + "http", + "js-sys", + "pin-project", + "serde", + "serde_json", + "thiserror", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "gloo-utils" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b5555354113b18c547c1d3a98fbf7fb32a9ff4f6fa112ce823a21641a0ba3aa" +dependencies = [ + "js-sys", + "serde", + "serde_json", + "wasm-bindgen", + "web-sys", +] + [[package]] name = "glow" version = "0.13.1" @@ -1587,6 +1638,17 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "http" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + [[package]] name = "icrate" version = "0.0.4" @@ -1664,6 +1726,12 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "itoa" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" + [[package]] name = "jni" version = "0.21.1" @@ -2280,6 +2348,26 @@ version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" +[[package]] +name = "pin-project" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.60", +] + [[package]] name = "pin-project-lite" version = "0.2.14" @@ -2566,6 +2654,12 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "ryu" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" + [[package]] name = "safe_arch" version = "0.7.1" @@ -2629,6 +2723,17 @@ dependencies = [ "syn 2.0.60", ] +[[package]] +name = "serde_json" +version = "1.0.117" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "455182ea6142b14f93f4bc5320a2b31c1f266b66a4a5c858b013302a5d8cbfc3" +dependencies = [ + "itoa", + "ryu", + "serde", +] + [[package]] name = "serde_repr" version = "0.1.19" diff --git a/bachelorarbeit/Cargo.toml b/bachelorarbeit/Cargo.toml index fc7a84e..c0910d2 100644 --- a/bachelorarbeit/Cargo.toml +++ b/bachelorarbeit/Cargo.toml @@ -15,8 +15,15 @@ egui_plot = "0.27.2" indicatif = "0.17.8" nohash-hasher = "0.2.0" +[target.'cfg(target_arch = "wasm32")'.dependencies] +wasm-bindgen-futures = "0.4" +gloo-net = "0.5.0" [profile.release] debug = true # lto = "fat" -# codegen-units = 1 \ No newline at end of file +# codegen-units = 1 + +[profile.webrelease] +inherits = "release" +opt-level = "s" \ No newline at end of file diff --git a/bachelorarbeit/build.sh b/bachelorarbeit/build.sh new file mode 100644 index 0000000..27ce836 --- /dev/null +++ b/bachelorarbeit/build.sh @@ -0,0 +1,3 @@ +cargo build --target wasm32-unknown-unknown --profile webrelease +mkdir ./target/web-out +wasm-bindgen ./target/wasm32-unknown-unknown/webrelease/app_bg.wasm --out-name app --out-dir ./target/web-out/ --target web --no-typescript \ No newline at end of file diff --git a/bachelorarbeit/index.html b/bachelorarbeit/index.html new file mode 100644 index 0000000..0fdb7aa --- /dev/null +++ b/bachelorarbeit/index.html @@ -0,0 +1,127 @@ + + + + + + + +
+ +