diff --git a/src/lib.rs b/src/lib.rs index 5e409c4..e5822c7 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -392,3 +392,12 @@ pub async extern "C" fn archive_character_base64( .map(|x| BASE64_STANDARD.encode(x))?; return Ok(format!("data:application/octet-stream;charset=utf-16le;base64,{buf}").into()); } + +#[cfg(target_family = "wasm")] +#[wasm_bindgen] +pub async extern "C" fn search_for_character(name: &str) -> Option { + #[cfg(feature = "debug")] + console_error_panic_hook::set_once(); + + search_character(name).await +} diff --git a/web/index.html b/web/index.html index fe11f30..6ae84ab 100644 --- a/web/index.html +++ b/web/index.html @@ -5,19 +5,31 @@ Auracite