Thanks to visit codestin.com
Credit goes to lib.rs

Cargo Features

[dependencies]
photon-rs = { version = "0.3.3", default-features = false, features = ["enable_wasm", "wee_alloc"] }
default = enable_wasm

The enable_wasm feature is set by default whenever photon-rs is added without default-features = false somewhere in the dependency tree.

enable_wasm default = console_error_panic_hook, js-sys, node-sys, wasm-bindgen, web-sys

Affects photon-rs::run

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.

wasm-bindgen enable_wasm

Affects photon-rs::putImageData, photon-rs::to_image_data

js-sys enable_wasm
node-sys enable_wasm
console_error_panic_hook enable_wasm

Enables console_error_panic_hook

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 code size when deploying.

wee_alloc implicit feature

Enables wee_alloc

wee_alloc is a tiny allocator for wasm that is only ~1K in code size compared to the default allocator's ~10K. It is slower than the default allocator, however.

web-sys enable_wasm

Affects photon-rs::get_image_data, photon-rs::open_image, photon-rs::to_raw_pixels, photon-rs::putImageData, photon-rs::to_image_data