Rust trial: port interface to Sycamore

Now we have a reactive web app written entirely in Rust. The Trunk build
tool compiles it to WebAssembly and generates a little JavaScript glue.
This commit is contained in:
Aaron Fenyes 2024-07-29 05:30:16 -07:00
parent 12abef4076
commit 42bdfabd91
10 changed files with 178 additions and 220 deletions

View file

@ -1,19 +1,15 @@
[package]
name = "engine"
name = "sycamore-trial"
version = "0.1.0"
authors = ["Aaron"]
edition = "2021"
[lib]
crate-type = ["cdylib", "rlib"]
[features]
default = ["console_error_panic_hook"]
[dependencies]
nalgebra = "0.33.0"
js-sys = "0.3.69"
wasm-bindgen = "0.2.84"
sycamore = "0.9.0-beta.2"
# The `console_error_panic_hook` crate provides better debugging of panics by
# logging them with `console.error`. This is great for development, but requires
@ -21,6 +17,13 @@ wasm-bindgen = "0.2.84"
# code size when deploying.
console_error_panic_hook = { version = "0.1.7", optional = true }
[dependencies.web-sys]
version = "0.3.69"
features = [
'CanvasRenderingContext2d',
'HtmlCanvasElement',
]
[dev-dependencies]
wasm-bindgen-test = "0.3.34"