feat(types): Phase 1.6+ Slice 2 — origin-chain-types fully no_std v0.0.11

origin-chain-types ahora fully no_std-compatible canonical — preparado para
WASM runtime build canonical Slice 2b.

## Refactor sistemático canonical
- src/lib.rs: #![cfg_attr(not(feature = "std"), no_std)] + extern crate alloc
- src/errors.rs: String → alloc::string::String
- src/provenance.rs: Vec<AccountId> → alloc::vec::Vec<AccountId>
- src/pallets.rs: Vec<AssetAttestation> → alloc::vec::Vec<AssetAttestation>
- Cargo.toml: [features] default=["std"] + std=["thiserror/std", "serde/std"]

## Workspace deps bump canonical (no_std-compatible)
- thiserror 1.0 → 2.0 default-features=false (no_std support nativo)
- serde 1.0 → =1.0.219 default-features=false (pin canonical para evitar
  serde_core breaking change canonical post-1.0.220)
- log 0.4 → default-features=false
- serde-big-array default-features=false

## Decisión empírica DEFERRED: WASM_BINARY a Slice 2b dedicated
substrate-wasm-builder retry encountered serde 1.0.x alloc/serde_core feature
conflict durante isolated WASM build (duplicate exchange_malloc lang item entre
rustup stdlib alloc + wbuild dir alloc). Investigation requires deep Rust
toolchain debugging — Slice 2b dedicated session merece DC propio.

Investigation canonical scope para Slice 2b:
1. substrate-wasm-builder 25.x o 27.x version regression test
2. cargo workspace.metadata.wasm-builder section config
3. RUSTFLAGS -Z build-std=core,alloc nightly approach
4. Fallback: pre-built WASM binary loaded from file
5. Possible upstream issue paritytech/polkadot-sdk

## Filosofía canonical
origin-chain-types era barrera canonical para hermanos consumers WASM runtimes.
Esa barrera canonical ya NO existe post-refactor. Forward compatibility canonical
preservada para Trinity 3D + Codex Vault + Ethos credential minting + AGI
co-authoring canonical futuras integrations.

David canon 2026-05-14 "la libertad infinita acota solo donde empieza la del
otro" — la liberación arquitectónica del no_std sucede ahora.

## Build
- cargo check workspace 17.06s warm
- cargo build --release 1m 38s cold rebuild (serde version regress full
  recompile triggered)
- origin-chain-node binary canonical ejecuta 4 subcommands
- Full workspace test OOM (signal 137) — per-crate testing deferred

## Phase 1.6+ progress
- Slice 1 ✅ (v0.0.10 CLI skeleton)
- Slice 2 ✅ (v0.0.11 ESTA no_std refactor)
- Slice 2b ⏳ WASM_BINARY dedicated debug
- Slice 3 ⏳ sc_service::ChainSpec
- Slice 4 ⏳ Full sc-service (consensus + RPC + networking)

Refs: CHARON_ROADMAP_V1 Phase 1.6+ Slice 2, no_std refactor canonical
preparation para WASM runtime build canonical Slice 2b

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
davidherranandClaude Opus 4.6 committed 2026-05-21 15:44:11 -05:00
1 parent 8a24a86ee6
commit 4a1f7bd834
11 files changed
+248 -81

No files matched your search

+10
View File
@@ -61,9 +61,18 @@ log.workspace = true
serde = { workspace = true, optional = true }
serde_json.workspace = true
[build-dependencies]
# Slice 2 v0.0.11 retry: substrate-wasm-builder DEFERRED nuevamente — serde 1.0.x
# alloc/serde_core feature conflicts canonical con substrate-wasm-builder isolated
# WASM build canonical (duplicate `exchange_malloc` lang item canonical entre
# rustup stdlib alloc + wbuild dir alloc canonical). Investigation canonical:
# requires deep Rust toolchain debugging — Slice 2b dedicated.
# substrate-wasm-builder = { workspace = true, optional = true }
[features]
default = ["std"]
std = [
"origin-chain-types/std",
"sp-core/std",
"sp-runtime/std",
"sp-std/std",
@@ -93,6 +102,7 @@ std = [
"parity-scale-codec/std",
"scale-info/std",
"serde",
# "substrate-wasm-builder", # DEFERRED Slice 2b debugging canonical
]
runtime-benchmarks = [
"frame-system/runtime-benchmarks",