Cargo Features

[dependencies]
ink = { version = "6.0.0-alpha", default-features = false, features = ["std", "ink-debug", "show-codegen-docs", "no-allocator", "no-panic-handler", "unstable-hostfn"] }
default = std

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

std default

Enables linkme, std of parity-scale-codec, scale-info, sp-io, sp-runtime-interface, and staging-xcm and std of deranged, derive_more, ink_env, and ink_macro

deranged:

todo pin until https://github.com/jhpratt/deranged/issues/18 is resolved

and std of ink_metadata, ink_prelude, ink_primitives, and ink_storage

ink_metadata:

todo why here too?

Affects ink::CONTRACT_EVENTS, ink::collect_events

ink-debug

Enable contract debug messages via debug_print! and debug_println!.

Enables ink-debug of ink_env

show-codegen-docs
no-allocator

Disable the ink! provided global memory allocator.

Enables no-allocator of ink_env

no-panic-handler

Disable the ink! provided panic handler.

Enables no-panic-handler of ink_env

unstable-hostfn

Enables unstable-hostfn of ink_env and ink_storage

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.

ink_metadata std
scale-info std