liamwarfield ff14f577fe Add Platform trait.
I did some more thinking about the whole trait/boundary stuff and reallized that we don't need the GUI to handle the generic-ness of a trait object since only 1 platform will ever be used in a binary. What do you think of the following:

1. Define a platform trait
2. Each platform defines a zero-sized struct implementing the trait (ex `WebPlatform`).
3. Create an ifdef'd type alias on those structs:

```
     // gui/src/platform/mod.rs
     #[cfg(feature = "web")]
     pub type CurrentPlatform = web::WebPlatform;
     #[cfg(feature = "desktop")]
     pub type CurrentPlatform = desktop::DesktopPlatform;
     #[cfg(feature = "mobile")]
     pub type CurrentPlatform = mobile::MobilePlatform;
```

4. Add a compile time assertion that `CurrentPlatform` implements `Platform`.

Pros:

- We don't end up working around async trait objects
- We define what functions are needed for a platform
- We save a little on binary size by avoiding a fully generic solution.

Cons:

- The trait does not really do much other than being a collection of functions.
- In some ways it seems like what we're currently doing but with extra steps.
2026-02-17 21:26:03 -07:00
2025-12-05 07:00:38 +00:00
2026-02-17 21:26:03 -07:00
2026-01-19 19:17:23 -07:00
2026-01-19 22:07:06 +00:00
2025-04-06 18:08:09 -06:00
2025-12-04 22:21:37 -07:00

GUI Development

Running Desktop

  1. cargo install dioxus-cli --version 0.7.1
  2. dx run -p mumble-web2-gui --platform desktop --release

Running Web (development)

  1. cargo install dioxus-cli --version 0.7.1
  2. dx serve -p mumble-web2-gui --platform web
  3. cd docker && docker compose up
  4. connect to https://localhost:64444
  5. fill in the proxy url as https://127.0.0.1:4433/proxy (this should autofill)

Running Web (with proxy only)

  1. cargo install dioxus-cli --version 0.7.1
  2. dx build -p mumble-web2-gui --platform web --release
  3. cp config.toml.example config.toml
  4. cargo run -p mumble-web2-proxy in the background
  5. connect to localhost:8080
S
Description
No description provided
Readme 987 KiB
Languages
Rust 87.7%
SCSS 5.4%
JavaScript 3.1%
Dockerfile 3%
Shell 0.8%