Files
dioxus/packages/playwright-tests/windows-hotpatch-fullstack/src/main.rs
T
Jonathan Kelley b2d01e6779 rip out tauri bundle (v2), swc -> esbuild, blacksmith -> warpbuild, FAST CI 🚀 (#5328)
- inline mac, windows, linux bundling in the cli
- remove tauri bundle from our dep tree
- trim down the rpm crate for fewer dependencies in tree
- migrate from blacksmith to warpbuild
- move off swc and instead use esbuild via tool
- use dev drives in windows CI
- use fork of nix action for faster caching
- test bundling in CI
- fix asset handling in linux 
- add default APPDATA location for webview2 installs for dioxus apps on windows
2026-03-20 12:27:13 -07:00

39 lines
856 B
Rust

use dioxus::prelude::*;
const CSS: Asset = asset!("/assets/style.css");
fn app() -> Element {
let mut num = use_signal(|| 0);
rsx! {
document::Link {
href: CSS,
rel: "stylesheet",
}
button {
id: "increment-button",
onclick: move |_| async move {
let increment_amount = get_count().await.unwrap();
*num.write() += increment_amount;
},
"Click me! Count: {num}"
}
}
}
#[post("/api/get_count")]
async fn get_count() -> Result<i32> {
Ok(1)
}
fn main() {
let builder = dioxus::LaunchBuilder::new();
#[cfg(feature = "desktop")]
let builder = builder.with_cfg(
dioxus::desktop::Config::new().with_windows_browser_args("--remote-debugging-port=8788"),
);
builder.launch(app);
}