It runs but not really
This commit is contained in:
1
codecs/visdif/Cargo.lock
generated
1
codecs/visdif/Cargo.lock
generated
@ -281,6 +281,7 @@ dependencies = [
|
||||
"console_error_panic_hook",
|
||||
"dssim-core",
|
||||
"imgref",
|
||||
"rayon-core",
|
||||
"rgb",
|
||||
"wasm-bindgen",
|
||||
"wasm-bindgen-test",
|
||||
|
@ -18,6 +18,7 @@ wasm-bindgen = "0.2.38"
|
||||
dssim-core = "2.11.3"
|
||||
imgref = "1.7.0"
|
||||
rgb = "0.8.24"
|
||||
rayon-core = "1.7.1"
|
||||
# The `console_error_panic_hook` crate provides better debugging of panics by
|
||||
# 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
|
||||
|
@ -4,6 +4,7 @@ use wasm_bindgen::prelude::*;
|
||||
use dssim_core::{Dssim, ToRGBAPLU};
|
||||
use imgref;
|
||||
use rgb::FromSlice;
|
||||
use rayon_core;
|
||||
|
||||
mod utils;
|
||||
|
||||
@ -17,6 +18,7 @@ cfg_if! {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#[wasm_bindgen]
|
||||
#[no_mangle]
|
||||
pub fn ssim(data_a: Vec<u8>, data_b: Vec<u8>, width: usize, height: usize) -> f64 {
|
||||
|
@ -8,7 +8,7 @@ cfg_if! {
|
||||
// For more details see
|
||||
// https://github.com/rustwasm/console_error_panic_hook#readme
|
||||
if #[cfg(feature = "console_error_panic_hook")] {
|
||||
extern crate console_error_panic_hook;
|
||||
use console_error_panic_hook;
|
||||
pub use self::console_error_panic_hook::set_once as set_panic_hook;
|
||||
} else {
|
||||
#[inline]
|
||||
|
Reference in New Issue
Block a user