waasm compilatiion lib setup

This commit is contained in:
dongho
2024-09-01 17:01:51 +09:00
parent efbcdea403
commit 5cadfc22da
10 changed files with 1237 additions and 11 deletions

1173
yew-wasm/Cargo.lock generated Normal file

File diff suppressed because it is too large Load Diff

13
yew-wasm/Cargo.toml Normal file
View File

@ -0,0 +1,13 @@
[package]
name = "yew-wasm"
version = "0.1.0"
edition = "2021"
[lib]
crate-type = ["cdylib"]
[dependencies]
console_error_panic_hook = "0.1.7"
console_log = "1.0.0"
wasm-bindgen = "0.2.93"
yew = { git = "https://github.com/yewstack/yew/", features = ["csr"] }

6
yew-wasm/src/lib.rs Normal file
View File

@ -0,0 +1,6 @@
use wasm_bindgen::prelude::*;
#[wasm_bindgen(start)]
fn start() {
std::panic::set_hook(Box::new(console_error_panic_hook::hook));
}