plum

#treesitter#compiler#wasm

git clone https://git.pyrossh.dev/plum

A statically typed, imperative programming language inspired by rust, python


63a5080 — Peter John 2026-11-02T14:08:35+05:30
T5: web bridge + `plum game` + README
Files changed (1) hide show
  1. plum-game/src/main.rs +2 -0
plum-game/src/main.rs CHANGED
@@ -75,6 +75,8 @@ async fn main() {
75
75
  /// instantiated `plum.wasm`, then runs the frame loop.
76
76
  #[cfg(target_arch = "wasm32")]
77
77
  async fn run_web() -> Result<(), String> {
78
+ // A wasm32 panic is otherwise silent; send it to the browser console.
79
+ std::panic::set_hook(Box::new(|info| macroquad::miniquad::error!("panic: {info}")));
78
80
  use macroquad::file::{load_file, load_string};
79
81
  use macroquad::window::next_frame;
80
82
  let list = load_string("preload.txt").await.map_err(|e| format!("preload.txt: {e}"))?;