Update packages, use serde_wasm_bindgen
This commit is contained in:
parent
62834ba668
commit
c1862733c8
@ -13,16 +13,17 @@ default = ["console_error_panic_hook"]
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
seahash = "4.1"
|
seahash = "4.1"
|
||||||
skyrim-cell-dump = "0.3"
|
skyrim-cell-dump = "0.3"
|
||||||
wasm-bindgen = { version = "0.2.63", features = ["serde-serialize"] }
|
wasm-bindgen = "0.2.83"
|
||||||
|
serde-wasm-bindgen = "0.4.3"
|
||||||
|
|
||||||
# The `console_error_panic_hook` crate provides better debugging of panics by
|
# The `console_error_panic_hook` crate provides better debugging of panics by
|
||||||
# logging them with `console.error`. This is great for development, but requires
|
# logging them with `console.error`. This is great for development, but requires
|
||||||
# all the `std::fmt` and `std::panicking` infrastructure, so isn't great for
|
# all the `std::fmt` and `std::panicking` infrastructure, so isn't great for
|
||||||
# code size when deploying.
|
# code size when deploying.
|
||||||
console_error_panic_hook = { version = "0.1.6", optional = true }
|
console_error_panic_hook = { version = "0.1.7", optional = true }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
wasm-bindgen-test = "0.3.13"
|
wasm-bindgen-test = "0.3.33"
|
||||||
|
|
||||||
[profile.release]
|
[profile.release]
|
||||||
# Tell `rustc` to optimize for small code size.
|
# Tell `rustc` to optimize for small code size.
|
||||||
|
@ -6,7 +6,7 @@ use wasm_bindgen::prelude::*;
|
|||||||
|
|
||||||
#[wasm_bindgen]
|
#[wasm_bindgen]
|
||||||
pub fn parse_plugin(input: &[u8]) -> JsValue {
|
pub fn parse_plugin(input: &[u8]) -> JsValue {
|
||||||
JsValue::from_serde(&skyrim_cell_dump::parse_plugin(input).unwrap()).unwrap()
|
serde_wasm_bindgen::to_value(&skyrim_cell_dump::parse_plugin(input).unwrap()).unwrap()
|
||||||
}
|
}
|
||||||
|
|
||||||
#[wasm_bindgen]
|
#[wasm_bindgen]
|
||||||
|
Loading…
Reference in New Issue
Block a user