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
@@ -64,17 +64,10 @@ log.workspace = true
|
|||||||
serde_json.workspace = true
|
serde_json.workspace = true
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
# Slice 2c canonical multi-attempt findings registered (build.rs doc canonical):
|
# Slice 2c+2d findings registered (build.rs doc): WASM_BUILD_STD=0 resuelve
|
||||||
# 1-4 (Slice 2b 2026-05-21): direct serde / pin / profile / build_using_defaults
|
# alloc/exchange_malloc pero descubre serde/std leak via types/std transitive
|
||||||
# — ALL NO solved alloc/exchange_malloc conflict canonical
|
# activation. Slice 2e future: [patch.crates-io] serde override o sp-io gate
|
||||||
# 5 (Slice 2c attempt #5 2026-05-24 sesión 2 cont): WASM_BUILD_STD=0 explicit
|
# adjust o stable2512-4+ upstream fix. Mientras tanto: no-op + Slice 3 mock-WASM.
|
||||||
# → alloc issue RESUELTO canonical. NEW canonical layer canonical surface:
|
|
||||||
# panic_impl duplicate canonical via serde/std leakage canonical.
|
|
||||||
#
|
|
||||||
# Slice 2d canonical future requires deeper canonical: inverted feature tree
|
|
||||||
# identify exact dep canonical activating serde/std + override canonical OR
|
|
||||||
# stable2512-4+ upstream fix canonical. Mientras canonical Slice 3 v0.0.13
|
|
||||||
# mock-WASM canonical path canonical estable canonical.
|
|
||||||
# substrate-wasm-builder = { workspace = true, optional = true }
|
# substrate-wasm-builder = { workspace = true, optional = true }
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
|
|||||||
@@ -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
|
//! Slice 2c attempts 1-4 (Slice 2b 2026-05-21): direct serde / pin / profile /
|
||||||
//! NO solved canonical:
|
//! build_using_defaults — ALL NO solved alloc/exchange_malloc conflict.
|
||||||
//! 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 attempt #5 (Charon sesión 2 cont. 2026-05-24) — empirical test
|
//! Slice 2c attempt #5 + Slice 2d (sesión 2 cont 2026-05-24):
|
||||||
//! WASM_BUILD_STD=0 explicit override canonical. Upstream docs confirman:
|
//! - WASM_BUILD_STD=0 explicit override → alloc/exchange_malloc RESUELTO
|
||||||
//! "WASM_BUILD_STD is disabled by default for WASM target and Rust >= 1.84".
|
//! - 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
|
//! Requires architectural fix:
|
||||||
//! issue RESUELTO canonical**. Pero canonical surface NEW error canonical:
|
//! - [patch.crates-io] serde override con strict no-std
|
||||||
|
//! - O sp-io feature gate adjust
|
||||||
|
//! - O wait stable2512-4+ upstream fix
|
||||||
//!
|
//!
|
||||||
//! ```
|
//! Mientras Slice 2e land, build script no-op + Slice 3 (v0.0.13) mock-WASM
|
||||||
//! error[E0152]: found duplicate lang item `panic_impl`
|
//! fallback (chain_spec.rs en node crate via serde_json puro) sigue siendo
|
||||||
//! --> sp-io-40.0.1/src/lib.rs:1774:1
|
//! path estable. Cross-pillar consumers (Trinity/Codex/Ethos/Atelier) ya
|
||||||
//! = note: the lang item is first defined in crate `std` (which `serde` depends on)
|
//! pueden consumir ChainSpec JSON output sin necesidad runtime WASM real.
|
||||||
//! = 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.
|
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
// No-op canonical — Slice 2d canonical land WASM_BINARY post serde/std
|
// No-op — Slice 2e future resolves WASM_BINARY. Slice 3 mock-WASM estable.
|
||||||
// leakage canonical resolution canonical. Slice 3 mock-WASM (chain_spec
|
|
||||||
// builder JSON canonical) sigue siendo el path canonical estable canonical.
|
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user