From c8bc34db7781eafe097974cc8241d708cf2ce893 Mon Sep 17 00:00:00 2001 From: Greg Shuflin Date: Thu, 27 Nov 2025 20:16:58 -0800 Subject: [PATCH] Some additional setup --- Cargo.lock | 11 +++++++++++ Cargo.toml | 1 + justfile | 5 +++++ src/main.rs | 1 + 4 files changed, 18 insertions(+) create mode 100644 justfile diff --git a/Cargo.lock b/Cargo.lock index 5de9698..df9bb5b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -176,6 +176,16 @@ dependencies = [ "winnow", ] +[[package]] +name = "console_error_panic_hook" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a06aeb73f470f66dcdbf7223caeebb85984942f22f1adb2a088cf9668146bbbc" +dependencies = [ + "cfg-if", + "wasm-bindgen", +] + [[package]] name = "const-str" version = "0.6.4" @@ -753,6 +763,7 @@ dependencies = [ name = "leptos-tutorial" version = "0.1.0" dependencies = [ + "console_error_panic_hook", "leptos", ] diff --git a/Cargo.toml b/Cargo.toml index 68977d8..3416638 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,4 +4,5 @@ version = "0.1.0" edition = "2024" [dependencies] +console_error_panic_hook = "0.1.7" leptos = { version = "0.8.14", features = ["csr"] } diff --git a/justfile b/justfile new file mode 100644 index 0000000..e33e0a0 --- /dev/null +++ b/justfile @@ -0,0 +1,5 @@ +_default: + @just --list + +trunk-run: + trunk serve --open diff --git a/src/main.rs b/src/main.rs index 3bfc6b4..c0cfc82 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,5 +1,6 @@ use leptos::prelude::*; fn main() { + console_error_panic_hook::set_once(); leptos::mount::mount_to_body(|| view! {

"Hello, world!"

}) }