From f3c23e801bf6556777d0f6853a3086a2425ba23b Mon Sep 17 00:00:00 2001 From: Vurv <56230599+Vurv78@users.noreply.github.com> Date: Tue, 25 Jan 2022 21:26:54 -0800 Subject: [PATCH] Add gui polyfill --- autorun-gui/Cargo.toml | 21 +++++++++++++++++++++ autorun-gui/src/main.rs | 18 ++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 autorun-gui/Cargo.toml create mode 100644 autorun-gui/src/main.rs diff --git a/autorun-gui/Cargo.toml b/autorun-gui/Cargo.toml new file mode 100644 index 0000000..56484af --- /dev/null +++ b/autorun-gui/Cargo.toml @@ -0,0 +1,21 @@ +[package] +name = "autorun-gui" +version = "0.1.0" +authors = ["Vurv78 "] +edition = "2021" +publish = false + +[dependencies] +dioxus = { version = "0.1.7", features = ["desktop"] } +tokio = { version = "1", features = ["full"] } + +atomic = "0.5.1" +message-io = "0.14.3" + +log = "0.4.14" +simplelog = "0.11.2" + +bincode = { version = "2.0.0-beta.0", features = ["derive"] } +autorun-shared = { path = "../autorun-shared", features = ["gui"] } + +thiserror = "1.0.30" \ No newline at end of file diff --git a/autorun-gui/src/main.rs b/autorun-gui/src/main.rs new file mode 100644 index 0000000..355ac37 --- /dev/null +++ b/autorun-gui/src/main.rs @@ -0,0 +1,18 @@ +/// Autorun-gui +/// This is a gui to run alongside the ``gui`` version of autorun. +/// It works by having a server (autorun) client (autorun-gui) connection as to not disrupt the main thread (gmod) +/// This is a workaround for Dioxus and every other rust library that doesn't support running outside main thread, which would freeze gmod. + +/* +mod logging; +mod app; +mod io; +*/ + +// Start app in current thread +pub fn main() { + // logging::init(); + + // app::launch(); + // App will launch io +} \ No newline at end of file