Dane Sabo fb50885e7f M2 part 2: WASM build target for road_parceling_studio
Refactored Studio + impl App into lib.rs (was main.rs). Added a
#[wasm_bindgen] start_in_canvas entry plus index.html/Trunk.toml so
the same code runs in a browser tab via:

  rustup target add wasm32-unknown-unknown
  cargo install trunk
  cd road_parceling_studio && trunk serve

Native still builds with `cargo run -p road_parceling_studio`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-26 13:51:06 -04:00

31 lines
931 B
TOML

[package]
name = "road_parceling_studio"
version = "0.1.0"
edition = "2021"
authors = ["Dane Sabo"]
description = "Interactive test harness for road_parceling — place roads, drag nodes, watch parcels regenerate."
license = "MIT OR Apache-2.0"
[lib]
crate-type = ["cdylib", "rlib"]
[dependencies]
road_parceling = { path = "../road_parceling" }
glam = "0.29"
egui = "0.28"
log = "0.4"
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
eframe = { version = "0.28", default-features = false, features = ["default_fonts", "glow", "wayland", "x11"] }
env_logger = "0.11"
[target.'cfg(target_arch = "wasm32")'.dependencies]
eframe = { version = "0.28", default-features = false, features = ["default_fonts", "glow"] }
wasm-bindgen = "0.2"
wasm-bindgen-futures = "0.4"
web-sys = { version = "0.3", features = ["Document", "Window", "HtmlCanvasElement"] }
console_error_panic_hook = "0.1"
[lints.rust]
unsafe_code = "forbid"