Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
DimiDumo committed Feb 26, 2025
2 parents b7bb363 + 8ae338c commit 99bb6c2
Show file tree
Hide file tree
Showing 8 changed files with 3,538 additions and 24 deletions.
1 change: 1 addition & 0 deletions packages/apis/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,4 @@ wasm-bindgen = "0.2"
serde-wasm-bindgen = "0.6.5"
js-sys = "0.3.69"
wasm-bindgen-test = "0.3.42"
console_error_panic_hook = "0.1.7"
7 changes: 7 additions & 0 deletions packages/apis/src/wasm.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
use crate::extract_substrs::*;
use crate::*;
use console_error_panic_hook;
use js_sys::Array;
use serde_json::Value;
use std::panic;
use wasm_bindgen::prelude::*;

#[wasm_bindgen(start)]
pub fn init_panic_hook() {
panic::set_hook(Box::new(console_error_panic_hook::hook));
}

#[wasm_bindgen]
#[allow(non_snake_case)]
pub fn padString(str: &str, paddedBytesSize: usize) -> Array {
Expand Down
Loading

0 comments on commit 99bb6c2

Please sign in to comment.