//! # Build script — Slice 2e v0.0.35 canonical investigation //! //! ## History //! //! - **Slice 2c attempts 1-4** (2026-05-21): direct serde / pin / profile / //! build_using_defaults — ALL NO solved alloc/exchange_malloc conflict. //! - **Slice 2c attempt #5 + Slice 2d** (2026-05-24): WASM_BUILD_STD=0 explicit //! override → alloc/exchange_malloc RESUELTO. NEW layer: panic_impl duplicate //! via serde/std leak transitive. //! - **Slice 2e v0.0.35** (2026-05-26): re-enable substrate-wasm-builder canonical //! con `wasm-build` feature gate. Investigate [patch.crates-io] serde override //! + types/std isolation empirical. //! //! ## Usage canonical //! //! - Default (no feature): build script no-op, mock-WASM Slice 3 fallback active. //! - `--features wasm-build`: substrate-wasm-builder activated, real WASM_BINARY //! build attempted. WASM_BUILD_STD=0 must be set to avoid alloc duplicate. //! //! ## Path forward post-Slice 2e canonical //! //! Si serde/std leak resolved → Phase 3 pallet-revive smart contracts unblocked //! Si NOT resolved → document next attempt path (upstream Substrate stable2512-4+ //! wait OR sp-io feature gate audit deeper OR alternative WASM builder). #[cfg(feature = "wasm-build")] fn main() { substrate_wasm_builder::WasmBuilder::new() .with_current_project() .export_heap_base() .import_memory() .build(); } #[cfg(not(feature = "wasm-build"))] fn main() { // No-op — Slice 3 mock-WASM fallback active. // Enable real WASM build with `cargo build --features wasm-build`. }