Cargo Features

[dependencies]
epdx = { version = "1.2.2", default-features = false, features = ["pybindings", "jsbindings", "wee_alloc"] }
default = wee_alloc

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

Affects epdx::convert_ilcd

pybindings = pyo3

Enables extension-module of pyo3 ^0.20.2

pyo3:

Use this feature when building an extension module.
It tells the linker to keep the python symbols unresolved,
so that the module can also be used with statically linked python interpreters.

jsbindings = console_error_panic_hook, serde-wasm-bindgen, tsify, wasm-bindgen

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 jsbindings?
serde-wasm-bindgen jsbindings?
tsify jsbindings?
pyo3 pybindings?

Enables pyo3 ^0.20.2

console_error_panic_hook jsbindings?

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 default

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.