File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed
Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change 2828//!
2929//! ## `experimental_spec_shaking_v2`
3030//!
31- //! Enables spec shaking, a mechanism for stripping unused type and event
32- //! definitions from a contract's spec after building.
31+ //! Enables v2 spec shaking, an improved mechanism for controlling which type,
32+ //! event, and function definitions appear in a contract's spec.
33+ //!
34+ //! ### Spec Shaking v1 (default, no feature flag)
35+ //!
36+ //! - Lib imports (via `contractimport!`): exported
37+ //! - Wasm imports (via `contractimport!`): not exported
38+ //! - `pub` types: exported
39+ //! - Non-`pub` types: not exported
40+ //! - All events: exported
41+ //! - All functions: exported
42+ //!
43+ //! ### Spec Shaking v2 (this feature)
44+ //!
45+ //! - Everything exported (types, events, functions, imports)
46+ //! - Unused entries shaken out using dead code / spec elimination
3347//!
3448//! A contract's spec (the `contractspecv0` custom section in the Wasm binary)
3549//! contains entries for every function, type, and event defined by the contract.
You can’t perform that action at this time.
0 commit comments