Replace archived core2 dependency with no_std_io2#185
Replace archived core2 dependency with no_std_io2#185vmx merged 2 commits intomultiformats:masterfrom
Conversation
core2 was archived upstream on 2026-04-14 ("No longer supported. Use
core directly."). core::io::{Read, Write} are not yet stable in Rust
(tracking issue rust-lang/rust#68315), so a direct migration is not
currently possible.
no_std_io2 0.8.1 is an API-compatible drop-in replacement for core2's
io module, purpose-built for crates that need the std::io trait shape
in no_std contexts.
This mirrors the approach taken in multiformats/rust-multihash#407
for multiformats org consistency.
Closes multiformats#184.
|
Note on CI: all 7 checks are failing with |
|
Could we make
|
That'd be a great improvement, I don't think there's a point in pulling this dependency for every project, especially given that I'd imagine most projects using this crate aren't restricted by |
|
Thanks @Benten-Ben for the PR. Could you please add a comment to #177. I still hope that license change eventually happens. |
@hanabi1224 That sounds good to me. But I first want to get this patch release with minimal changes out quickly. PRs are welcome to improve things in regards to std/no_std. |
Establishes the Phase 1 Cargo workspace for the Benten Engine:
benten-core, benten-graph, benten-ivm, benten-caps, benten-eval,
benten-engine, plus bindings/napi. This commit lands the workspace
manifest, lockfile, clippy configuration, and the three stub crates
(benten-ivm / benten-caps / benten-eval) whose real implementations
come online in subsequent phases. benten-core / benten-graph /
benten-engine / bindings-napi follow in their own slices.
Workspace dependencies are pinned to the 2026-04-14 validated versions
(ENGINE-SPEC §14.5): blake3 1.8, serde_ipld_dagcbor 0.6, multihash 0.19,
redb 4, napi 3, wasmtime 35, criterion 0.8, proptest 1.11, papaya 0.2,
mimalloc 0.1, thiserror 2, tracing 0.1.
Includes two [patch.crates-io] entries resolving the core2 yank
(bbqsrc/core2 archived 2026-04-14):
- cid -> BentenAlignmentInc/rust-cid @ e11cf45 (our fork; upstream
PR multiformats/rust-cid#185, tracking #184)
- core2 -> technocreatives/core2 @ 545e84b (transitional; removed
when multiformats/rust-multihash#407 merges and releases)
Clippy config adopts workspace-wide warn-on-all + pedantic + nursery
defaults with a Benten-specific doc-valid-idents allowlist (CIDv1,
MVCC, IVM, UCAN, DID, etc.) so Benten terms don't need backticks in
every doc line.
Captures the Phase 1 stack-validation spike findings per the pre-work process defined in CLAUDE.md Step 4: - Verdict: STACK VALIDATED — 6-crate workspace composes end-to-end with deterministic content hashing - What shipped: all 10 brief deliverables checked off (workspace scaffold, benten-core hashing, benten-graph KVBackend + redb, benten-engine orchestrator, napi bindings, criterion benchmark, cargo fmt/clippy/nextest/doc all green, D1 intra-process + D2 cross-process + D3 wasm32 compile-check all passing) - What was punted: multihash crate declared but not imported (hand-rolled envelope works), hand-rolled base32 (migrate to multibase crate), IVM/Caps/Eval crates as stubs, Node.js-side napi smoke test, mimalloc/papaya/wasmtime not yet wired - Canonical CID pinned: bafyr4iflzldgzjrtknevsib24ewiqgtj65pm2ituow3yxfpq57nfmwduda - Benchmark numbers with honest caveats (create_node 4.02ms driven by redb fsync — motivates Phase 1 DurabilityMode work) - Seven surprises documented including the core2 yank + resolution: forked rust-cid to BentenAlignmentInc, swapped core2 -> no_std_io2, filed upstream PR multiformats/rust-cid#185 - Next actions numbered so any agent can pick them up
Consolidates docs/ into a three-tier structure:
docs/ — active, committed canonical docs
docs/research/ — ongoing investigations (ivm-benchmark lives here)
docs/validation/ — empirical artifacts (paper-prototype-handlers.md)
docs/future/ — exploratory proposals (runtime, bentend, etc.)
docs/archive/ — superseded specs + v1 critiques (read-only history)
New canonical docs produced during pre-work and critic review:
VISION.md — three-pillar framing, 8-phase committed scope
ARCHITECTURE.md — layered architecture, 6-crate Phase 1 plan
QUICKSTART.md — target 10-minute DX path (Phase 1 deliverable)
ERROR-CATALOG.md — stable error codes with fix hints
GLOSSARY.md — Benten-specific terms with definitions
PROJECT-HISTORY.md — how we got here, philosophy, naming
DEVELOPMENT-METHODOLOGY.md — ADDL pipeline + orchestration patterns
FULL-ROADMAP.md — 8-phase committed plan + exploratory partition
Updated in place to reflect validated decisions (2026-04-14):
BUSINESS-PLAN.md — three pillars framing replaces three products
DSL-SPECIFICATION.md — revised 12-primitive set (added SUBSCRIBE,
STREAM; dropped VALIDATE, GATE)
ENGINE-SPEC.md — 6-crate structure, validated deps, honest
performance targets, core2/no_std_io2 note
PLATFORM-DESIGN.md — unchanged in substance, formatting pass
Moves that previously sat as uncommitted deletes + untracked recreations:
docs/archive-v{1,2}-* -> docs/archive/superseded/v{1,2}-specification.md
docs/critique-*.md -> docs/archive/v1-critiques/*
docs/explore-*.md -> docs/archive/superseded/ or docs/research/
docs/operation-vocab-*.md / docs/review-vocab-* / docs/v2-review-*
-> docs/archive/superseded/ as applicable
docs/paper-prototype-handlers.md -> docs/validation/
prototypes/ivm/ -> docs/research/ivm-benchmark/
SPIKE follow-up: ENGINE-SPEC §7 gains a "Dependency note (2026-04-14)"
paragraph documenting the core2 yank and the BentenAlignmentInc
rust-cid fork pinning, pointing at multiformats/rust-cid#185.
CLAUDE.md is intentionally not included here — it is a high-traffic
orchestrator-facing file and gets its own separate slice (next commit).
Summary
core2was archived upstream on 2026-04-14 with the note "No longer supported. Usecoredirectly." Version 0.4.0 is yanked from crates.io with no replacement, makingcidcurrently unbuildable from a clean checkout against the default registry.This PR swaps
core2forno_std_io2, an API-compatible drop-in replacement purpose-built for crates that needstd::io's trait shape inno_stdcontexts.Approach
Mirrors the approach in multiformats/rust-multihash#407 for multiformats org consistency. The diff is the minimum needed:
Cargo.toml: replace thecore2dependency withno_std_io2 = "0.8.1"; update two feature flags (std,alloc) to referenceno_std_io2/allocinstead ofcore2/alloc.src/cid.rs,src/error.rs: replace the twouse core2::io;imports withuse no_std_io2::io;.No other changes.
no_std_io2'sio::Readandio::Errortypes preserve the exact surface previously consumed fromcore2::io.Alternatives considered
core::io::{Read, Write}: not stable (rust-lang/rust#68315 has been open since 2020, blocked on thestd::io::ErrorOS-coupling problem).embedded-io: more idiomatic for new work, but introduces a different trait surface and would be a larger, more opinionated change. Happy to rework asembedded-ioif maintainers prefer.rust-multihashmigration.Testing
Currently,
cid's own dev-dependency chain (multihash-codetable) pullscore2transitively, so the upstream test suite can't build against a clean registry until #407 merges and a release is cut. Once that lands, the test suite unblocks automatically.The library itself compiles cleanly against
no_std_io2for--all-features,--no-default-features, and--no-default-features --features alloc.Refs
Closes #184.