feat(slice-2e): v0.0.35 — WASM investigation 3 layers (Layer 1+2 RESUELTOS, Layer 3 BLOCKED LLVM install)

Slice 2e WASM structural blocker investigation canonical sesión 3+ extended.
Substrate-wasm-builder re-enabled feature-gated. 3 layers explored canonical,
2 resueltos end-to-end, Layer 3 escalado a system-level LLVM install canonical.

## 3-layer findings canonical

- Layer 1 alloc/exchange_malloc duplicate → RESUELTO Slice 2c+2d (WASM_BUILD_STD=0)
- Layer 2 getrandom 0.2.17 wasm-incompat → RESUELTO Slice 2e (direct dep + custom feature)
- Layer 3 secp256k1-sys clang wasm32 target unsupported → BLOQUEADO (requires brew LLVM)

## Changes

- crates/origin-chain-runtime/Cargo.toml — substrate-wasm-builder feature-gated + getrandom workspace dep
- crates/origin-chain-runtime/build.rs — conditional WasmBuilder activation
- Cargo.toml workspace — getrandom = { version = "0.2", features = ["custom"] } workspace dep

## Layer 3 path forward canonical (Approach A recommended)

brew install llvm + configure CC_wasm32_unknown_unknown env var + retry build.
Pre-testnet Q3 2026 deployment infrastructure setup canonical canonical canonical.

## Investigation report canonical

Filed monorepo: docs/L7_roadmaps/SLICE_2E_INVESTIGATION_REPORT_V1.md (~280 LOC)
4 path forward approaches documented (LLVM install + pre-built secp256k1 + mock-WASM continue + upstream wait).

## Verification

- cargo test --workspace — 202 tests passing, 0 failures (NO regression)
- Default build unchanged (Slice 3 mock-WASM continues estable canonical)
- Feature-gated --features wasm-build activates substrate-wasm-builder para Layer 3 empirical testing

🔍 Slice 2e advanced canonical canonical. Path documented para Slice 2f future post-LLVM install.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
davidherranandClaude Opus 4.7 committed 2026-05-26 17:57:18 -05:00
1 parent 10ee1ab7b9
commit 44f1a0ae7f
5 files changed
+828 -33

No files matched your search

+13 -5
View File
@@ -52,6 +52,11 @@ origin-chain-fees.workspace = true
# (Inmutable #41 AGI DIDs Cross-Species Co-authorship)
origin-chain-agent-identity.workspace = true
# Slice 2e v0.0.35 — Direct getrandom canonical dep canonical para activate
# `custom` feature canonical via Cargo feature unification (transitive
# via const-random-macro → macro_magic → frame-support-procedural).
getrandom = { workspace = true }
# Phase 5.1 v0.0.29: origin-chain-governance wired runtime composition Index 10 canonical
# (CHN-4 Foundation Treasury Governance, AI-Driven Human-Guarded canonical)
origin-chain-governance.workspace = true
@@ -78,14 +83,17 @@ log.workspace = true
serde_json.workspace = true
[build-dependencies]
# Slice 2c+2d findings registered (build.rs doc): WASM_BUILD_STD=0 resuelve
# alloc/exchange_malloc pero descubre serde/std leak via types/std transitive
# activation. Slice 2e future: [patch.crates-io] serde override o sp-io gate
# adjust o stable2512-4+ upstream fix. Mientras tanto: no-op + Slice 3 mock-WASM.
# substrate-wasm-builder = { workspace = true, optional = true }
# Slice 2e v0.0.35 — Re-enabled substrate-wasm-builder for active investigation.
# Slice 2c+2d findings: WASM_BUILD_STD=0 resuelve alloc/exchange_malloc pero
# descubre serde/std leak via types/std transitive activation. Slice 2e attempt:
# patch.crates-io serde override + types/std isolation.
substrate-wasm-builder = { version = "26.0.1", optional = true }
[features]
default = ["std"]
# Slice 2e v0.0.35 — WASM build feature gate canonical.
# Enable with `--features wasm-build` para build real WASM_BINARY canonical.
wasm-build = ["substrate-wasm-builder"]
std = [
"origin-chain-types/std",
"sp-core/std",