Cargo Features

[dependencies]
hypetrigger = { version = "0.4.1", default-features = false, features = ["photon", "tesseract", "tensorflow", "wasm", "console_error_panic_hook", "wee_alloc"] }
default = console_error_panic_hook

The console_error_panic_hook feature is set by default whenever hypetrigger is added without default-features = false somewhere in the dependency tree.

photon tensorflow? tesseract? wasm?

Enables photon-rs

Affects debug::debug_photon_image, hypetrigger::photon, hypetrigger::threshold

tesseract = photon

Enables reqwest ^0.11.13 and tesseract ^0.13.0

Affects hypetrigger::tesseract

tensorflow = photon

Enables tensorflow ^0.20.0

Affects hypetrigger::tensorflow

wasm = photon

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.

console_error_panic_hook default

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.

Unfortunately, wee_alloc requires nightly Rust when targeting wasm for now.