docs(slice-2d): findings consolidados — serde/std leak via types/std identified
Slice 2d empirical investigation completada (sesión 2 cont 2026-05-24): - WASM_BUILD_STD=0 resuelve alloc/exchange_malloc (Slice 2c attempt #5) - NEW layer: panic_impl duplicate via serde/std leak transitive - Diagnostic vía cargo tree wasm32 -e features: ruta exacta identificada `origin-chain-types feature "std"` → `serde feature "std"` activation - Root cause: dep transitive activa types/std en wasm32 build incluso con --no-default-features (probable macro expansion automation) Slice 2e future requires architectural fix: - [patch.crates-io] serde override con strict no-std - O sp-io feature gate adjust - O wait stable2512-4+ upstream Mientras Slice 2e land: build.rs no-op + Slice 3 v0.0.13 mock-WASM estable. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
b67a6ca1c6
commit
274ddf3957
2 files changed
+24
-50
No files matched your search
@@ -1,47 +1,28 @@
|
||||
//! # Build script — Slice 2c canonical multi-attempt findings registered
|
||||
//! # Build script — Slice 2d findings registered, deferred future session
|
||||
//!
|
||||
//! Slice 2b investigation registered (sesión 1, 2026-05-21) — 4 fix attempts
|
||||
//! NO solved canonical:
|
||||
//! 1. Remove direct serde dep (transitive from FRAME) — NO solved
|
||||
//! 2. Pin serde =1.0.219 + =1.0.217 — NO solved
|
||||
//! 3. Remove profile.release lto/codegen-units customization — NO solved
|
||||
//! 4. WasmBuilder::build_using_defaults() upstream pattern — NO solved
|
||||
//! Slice 2c attempts 1-4 (Slice 2b 2026-05-21): direct serde / pin / profile /
|
||||
//! build_using_defaults — ALL NO solved alloc/exchange_malloc conflict.
|
||||
//!
|
||||
//! Slice 2c attempt #5 (Charon sesión 2 cont. 2026-05-24) — empirical test
|
||||
//! WASM_BUILD_STD=0 explicit override canonical. Upstream docs confirman:
|
||||
//! "WASM_BUILD_STD is disabled by default for WASM target and Rust >= 1.84".
|
||||
//! Slice 2c attempt #5 + Slice 2d (sesión 2 cont 2026-05-24):
|
||||
//! - WASM_BUILD_STD=0 explicit override → alloc/exchange_malloc RESUELTO
|
||||
//! - NEW layer surface: panic_impl duplicate via serde/std leak transitive
|
||||
//! - Diagnostic via cargo tree --target wasm32 -e features: identified
|
||||
//! `origin-chain-types feature "std"` → `serde feature "std"` activation path
|
||||
//! - Root cause: algún dep transitive activates types/std en wasm32 build
|
||||
//! incluso con --no-default-features (probable: macro expansion automation)
|
||||
//!
|
||||
//! ## Attempt #5 finding canonical (BIG progress)
|
||||
//! ## Path forward Slice 2e future
|
||||
//!
|
||||
//! `WASM_BUILD_STD=0` explicit + WasmBuilder re-enabled → **alloc/exchange_malloc
|
||||
//! issue RESUELTO canonical**. Pero canonical surface NEW error canonical:
|
||||
//! Requires architectural fix:
|
||||
//! - [patch.crates-io] serde override con strict no-std
|
||||
//! - O sp-io feature gate adjust
|
||||
//! - O wait stable2512-4+ upstream fix
|
||||
//!
|
||||
//! ```
|
||||
//! error[E0152]: found duplicate lang item `panic_impl`
|
||||
//! --> sp-io-40.0.1/src/lib.rs:1774:1
|
||||
//! = note: the lang item is first defined in crate `std` (which `serde` depends on)
|
||||
//! = note: first definition in `std` loaded from libstd-*.rlib
|
||||
//! = note: second definition in the local crate (`sp_io`)
|
||||
//! ```
|
||||
//!
|
||||
//! Diagnosis canonical: serde está siendo pulled con `std` feature canonical
|
||||
//! transitively desde algún dep canonical (parity-scale-codec o frame-*) →
|
||||
//! libstd canonical linked en wasm32 → conflict canonical con sp_io::panic
|
||||
//! handler canonical (que define panic_impl para no_std runtime).
|
||||
//!
|
||||
//! ## Path canonical resolución pending (Slice 2d canonical future)
|
||||
//!
|
||||
//! Requires deeper investigation canonical:
|
||||
//! - Inverted feature tree exact culprit identification canonical
|
||||
//! - Override canonical: `[patch.crates-io] serde = { ... }` con strict no-std
|
||||
//! - O explicit `WASM_BUILD_RUSTFLAGS` canonical override
|
||||
//! - O wait stable2512-4+ upstream canonical fix
|
||||
//!
|
||||
//! Mientras Slice 2d land canonical, build script canonical mantain no-op +
|
||||
//! Slice 3 (v0.0.13) mock-WASM fallback canonical path estable canonical.
|
||||
//! Mientras Slice 2e land, build script no-op + Slice 3 (v0.0.13) mock-WASM
|
||||
//! fallback (chain_spec.rs en node crate via serde_json puro) sigue siendo
|
||||
//! path estable. Cross-pillar consumers (Trinity/Codex/Ethos/Atelier) ya
|
||||
//! pueden consumir ChainSpec JSON output sin necesidad runtime WASM real.
|
||||
|
||||
fn main() {
|
||||
// No-op canonical — Slice 2d canonical land WASM_BINARY post serde/std
|
||||
// leakage canonical resolution canonical. Slice 3 mock-WASM (chain_spec
|
||||
// builder JSON canonical) sigue siendo el path canonical estable canonical.
|
||||
// No-op — Slice 2e future resolves WASM_BINARY. Slice 3 mock-WASM estable.
|
||||
}
|
||||
Reference in new issue
Block a user