mirror of
https://github.com/aljazceru/turso.git
synced 2026-01-27 11:54:30 +01:00
wasm: Enable console.error() panic hook
Makes debugging a little bit easier...
This commit is contained in:
11
Cargo.lock
generated
11
Cargo.lock
generated
@@ -392,6 +392,16 @@ dependencies = [
|
||||
"crossbeam-utils",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "console_error_panic_hook"
|
||||
version = "0.1.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a06aeb73f470f66dcdbf7223caeebb85984942f22f1adb2a088cf9668146bbbc"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"wasm-bindgen",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "core-foundation-sys"
|
||||
version = "0.8.6"
|
||||
@@ -1041,6 +1051,7 @@ dependencies = [
|
||||
name = "limbo-wasm"
|
||||
version = "0.0.3"
|
||||
dependencies = [
|
||||
"console_error_panic_hook",
|
||||
"limbo_core",
|
||||
"wasm-bindgen",
|
||||
]
|
||||
|
||||
@@ -11,5 +11,6 @@ crate-type = ["cdylib"]
|
||||
path = "lib.rs"
|
||||
|
||||
[dependencies]
|
||||
console_error_panic_hook = "0.1.7"
|
||||
limbo_core = { path = "../../core", default-features = false }
|
||||
wasm-bindgen = "0.2"
|
||||
|
||||
@@ -75,3 +75,8 @@ impl limbo_core::Wal for Wal {
|
||||
todo!()
|
||||
}
|
||||
}
|
||||
|
||||
#[wasm_bindgen(start)]
|
||||
pub fn init() {
|
||||
console_error_panic_hook::set_once();
|
||||
}
|
||||
Reference in New Issue
Block a user