- Cargo.toml: alkcall = "0.8.0" (convention 11 — pinned, first consumption of the 0.8.0 surface), serde/serde_json, bytes, and the std-only futures subset (BoxFuture seam shape). tokio's wasm-clean subset and the empty local/composed features unchanged. - lib.rs: the six skeleton modules per overview.md §Module Map (params, wire, producer, consumer, egress, error) — stub files with module docs naming their filling tasks; no re-exports yet (each implementation task adds its own). Verified: cargo test (76 tests), clippy --all-targets -D warnings, fmt --check, cargo doc --no-deps, both wasm checks (check + clippy on wasm32-unknown-unknown), and the dep-graph spot-checks (no mio/socket2/tokio::net in the default normal graph; normal tokio features = bytes/io-util/macros/rt/sync/time only). alkcall 0.8.0 from crates.io confirmed wasm-clean via probe build before wiring. Task: tasks/implementation/core-crate-deps.md (completed)
6.3 KiB
id, name, status, depends_on, scope, risk, impact, level
| id | name | status | depends_on | scope | risk | impact | level |
|---|---|---|---|---|---|---|---|
| implementation/core-crate-deps | Core — crate dependencies + module skeleton (alkcall wiring) | completed | narrow | low | project | implementation |
Description
Add the dependency surface the wrapper layers need and the module
skeleton so the batch-1 core tasks have their targets. This is the
batch-1 analogue of the vendor scaffolding task: the crate gains
alkcall (its substrate — first consumption of the 0.8.0 surface) and
the module files named in overview.md §Module Map, born wasm-clean.
Deliverables:
Cargo.toml[dependencies]— add to the existing trio (tokio wasm-clean subset, tracing, thiserror):alkcall = "0.8.0"(pinned per AGENTS.md convention 11 — bump deliberately, never transitively)serde = { version = "1", features = ["derive"] },serde_json = "1"(the params schema + spec builder)bytes = "1"(the wire codec's buffer types)futures = { version = "0.3", default-features = false, features = ["std"] }(BoxFuture for the seam callbacks — the alktunnels precedent; verify the wasm-clean subset compiles)- tokio stays
default-features = falsewith the wasm-clean subset (rt,sync,io-util,macros,time) — neverfeatures = ["full"](AGENTS.md convention 4). Notokio/net, nosocket2— those ridelocalin batch 2. [features]staysdefault = [],local = [],composed = []— declared empty by design (ADR-009); populated by their modules' batch-2 tasks.
src/lib.rs— keep#![forbid(unsafe_code)]and the crate docs; declare the module skeleton per overview.md §Module Map:params,wire,producer,consumer,egress,error— one-line stub files, each with a module doc naming its filling task (the vendor-scaffolding precedent).rfc1928stays as is.- Re-export posture:
lib.rsre-exports public API per convention 15 — for now the module declarations only; each implementation task adds its own re-exports.
Acceptance Criteria
cargo testpassescargo clippy --all-targets -- -D warningscleancargo fmt --checkcleancargo check --target wasm32-unknown-unknownclean — the wasm gate stays green with alkcall + serde + bytes + futures in the graph (alkcall 0.8.0's default crate is wasm-clean; verify, do not assume)cargo clippy --target wasm32-unknown-unknown -- -D warningsclean- No
tokio/net,socket2,mioin the default dependency graph (cargo treespot-check) alkcallpinned at"0.8.0"(not a range)- Module skeleton matches overview.md §Module Map (module names and file layout)
References
- docs/architecture/overview.md §Dependencies, §Module Map
- docs/architecture/decisions/009-feature-gates.md (the feature
layout; no
netfeature) - AGENTS.md conventions 4 (tokio subset), 11 (alkcall pin), 15 (module structure)
- Sibling posture:
/workspace/@alkdev/alktunnels/Cargo.toml(alkcall 0.8.0 consumer; the futures/bytes/serde dep set)
Notes
- Verified before implementing that alkcall 0.8.0 (the crates.io
artifact, same resolution alktunnels uses) is wasm-clean with no
[patch]/RUSTFLAGS need: itsgetrandom 0.4 + wasm_jsis self-contained onwasm32-unknown-unknown. Thefutures = { default-features = false, features = ["std"] }subset compiles in the same graph (probe build in/tmp/opencode/wasm-probe). - Cargo.toml — added
alkcall = "0.8.0"(pinned, not a range — convention 11),serde = { version = "1", features = ["derive"] },serde_json = "1",bytes = "1", andfutures = { version = "0.3", default-features = false, features = ["std"] }(the BoxFuture seam shape; the std-only subset, not default features — the latter is the same set in practice, but the explicit subset is the documented posture). tokio unchanged (the wasm-clean subset,default-features = false— neverfull); the full-tokio dev-dep stays native-only.[features]untouched (default = [],local = [],composed = []— ADR-009, populated by batch-2). - lib.rs — kept
#![forbid(unsafe_code)]+ crate docs; declared the six skeleton modules per overview.md §Module Map:params,wire,producer,consumer,egress,error(alphabetical declaration order afterrfc1928; rustfmt-sorted). No re-exports yet (convention 15 posture: each implementation task adds its own). - Stub files — one-line module docs (2–5 lines) each naming its
filling task:
params/error→ core-params-errors,wire→ core-wire-codec,egress→ core-seam-types,producer→ core-producer-connect (+ associates/bind),consumer→ core-consumer-connect (+ associates/bind).door.rs,local/,composed/are deliberately absent — feature-gated batch-2 modules born with their features, per the overview module map's local/ composed posture. - Dep-graph spot checks:
cargo tree --target wasm32-unknown-unknown -e normal -i mioand-i socket2print nothing (not in the wasm normal graph); the normal-only tokio feature set on both native and wasm targets is exactlybytes/default io-util macros rt sync time(thenet/fullfeatures appear only via the dev-dependency tokio — the test-only surface, by design).
Summary
Added the batch-1 dependency surface and the module skeleton:
Cargo.toml gains alkcall = "0.8.0" (the substrate pin,
convention 11), serde/serde_json, bytes, and the std-only
futures subset — tokio's wasm-clean subset and the empty
local/composed features unchanged; src/lib.rs declares the six
skeleton modules (params, wire, producer, consumer, egress,
error) per overview.md §Module Map, each a stub with a module doc
naming its filling task (the vendor-scaffolding precedent); no
re-exports yet. Wasm-cleanliness verified before and after: alkcall
0.8.0's crates.io artifact compiles clean on
wasm32-unknown-unknown with no patching (probe build), and the
crate's checks all pass — cargo test (39+37 tests, 2 doc-ignored),
cargo clippy --all-targets -- -D warnings, cargo fmt --check,
cargo doc --no-deps, both wasm checks, and the mio/socket2/
tokio::net absence spot-checks on the default (normal) dependency
graph.