Repository navigation
Description
Parent: #16. Implements the #13 decision for one owned private core-Wasm ABI generator over the existing Wasmtime 45/Cranelift core-module host.
Cross-repo implementation tracker: zackees/fp-bindgen#1.
Scope
Depend on an immutable revision/version of the owned zackees/fp-bindgen fork. The fork owns the Rust declaration frontend/IR and the explicit Wasmtime core-Wasm generator tracked by zackees/fp-bindgen#1. The legacy upstream Wasmer generator/runtime is not reused or linked; generated Wasmtime host glue is consumed privately by kernal-api.
From one checked-in, versioned kernal-api core-ABI source of truth, deterministically generate: (1) a Rust guest crate, (2) a private Wasmtime host dispatcher, and (3) a checked-in ABI manifest. Preserve the familiar fp_import!/fp_export!-style Rust UX while making generated guest signatures target the accepted wasm32-wasip1-threads core-Wasm profile. The source defines ABI version/compatibility direction; exact kernal-api:v1 import names, signatures, result/status encoding, required metadata; request identity/completion wire representations; and reserved semantic operation/resource/error identifiers. It reserves that arbitrary serialized values, paths, platform objects, and whole bulk payloads are not ABI values.
Generation is checked in and reproducible from the checked-in ABI source. It runs as an explicit verification/regeneration command, never implicitly during ordinary Cargo builds.
Extend final-module admission so the exact generated v1 import/signature/metadata set is negotiated before root entry or any host effect. Reject absent, future, duplicate, malformed, incompatible, or capability-inappropriate ABI declarations before instantiation.
Import-policy invariant
This issue must not broaden #15's allowlist. The new kernal-api:v1 imports are admitted only when they exactly match the generated v1 contract. Existing closed P1/thread compatibility imports remain separately explicit and authority-free. No generic kernal-api:*, ambient WASI, filesystem, process, network, clock, random, environment, or stdio authority is accepted.
Invariants
- One owned ABI source of truth and one pinned fork generator; no upstream fp-bindgen runtime reuse, WIT, MessagePack transport, ad-hoc RPC, or parallel hand-written guest API.
default = []andfulldo not resolve the generator, guest support, Wasmtime, or wasmparser.- No public API exposes raw ABI packets, numeric capability bits, generated support types, Wasmtime, Tokio, Store, Linker, or backend types.
Non-goals
No host operation execution, futures, polling, cancellation, resources, quotas, streams/blobs, blocking adapters, Tauri, or guest thread bootstrap.
RED → GREEN
- RED: checked-in characterization proves the handwritten
kernel-yieldimport has no generated version-negotiated ABI source of truth. - RED: reproduce and characterize fp-bindgen's historical 16,777,215-byte
FatPtrboundary; it is not an acceptable bulk-transfer path and no whole-value workaround is permitted. - RED: fixtures show metadata/import drift cannot presently be distinguished from a compatible module.
- GREEN: the pinned fork frontend/IR deterministically produces the checked-in Rust guest crate, private Wasmtime dispatcher, and ABI manifest from one v1 contract; regeneration is byte-for-byte stable and a drift check fails when output is stale.
- GREEN: exact import namespace/name/signature/version tests accept only the generated v1 contract and reject every mutation before
Module::new/instantiation. - GREEN: duplicate/version-skew/capability-mismatch metadata produces bounded facade-owned diagnostics without host effects.
- GREEN: generated code never appears in the default/full dependency graph;
soldr cargo test --locked --no-default-featuresremains free of Wasmtime/parser/generator/guest-support resolution.
Platform and deliverables
Compile on Linux/macOS/Windows x86-64/ARM64. Deliver the pinned fork dependency/vendor record, ABI source, deterministic generator/check command, checked-in guest crate/private Wasmtime glue/manifest, admission fixtures, compatibility note, and Soldr-only focused commands.
Dependencies and closure
- Parent: feat(wasm): add generated async kernel ABI and generation-safe resources #16; governed by feat(wasm): prove a streamed kernal-api Rust sketch runtime with zccache and extension2 cores #13 and consumes feat(wasm): establish threaded sketch build, import validation, and lifecycle substrate #15's closed import-policy contract.
- Cross-repo dependency: feat: generate Wasmtime core-Wasm guest and host bindings for kernal-api zackees/fp-bindgen#1 must land first and be pinned by immutable revision.
- Followed by the generated async operation lifecycle child; feat(wasm): add bounded opaque blobs and exact-output file capability #17 ultimately depends on the scoped-resource child that follows it.
- Close only when the async-operation child can implement a synthetic operation entirely through this generated contract, with no handwritten parallel ABI path.
Activity
zackees commentedon Aug 27, 2026
Decision update: the owned fp-bindgen fork now carries the Wasmtime/core-Wasm backend rather than being consumed as frontend/IR only. Implementation is tracked in zackees/fp-bindgen#1; kernal-api will pin the landed revision and privately consume the generated host glue.
zackees commentedon Aug 28, 2026
fp-bindgen Wasmtime Core Wasm generator merged upstream: zackees/fp-bindgen#2 at
4e44d9e5408653e3c428ee3f855cc194d53f60b0. Post-merge Rust 1.95.0 exact generated-host golden is green. Kernal integration remains pending the Soldr/zccache released-artifact path.feat(wasm): generated scalar ABI and exact metadata admission (#148)
zackees commentedon Sep 12, 2026
Closed as completed. The pinned generated v1 Core-Wasm contract is on main: deterministic guest/linker/manifest generation, exact precompile metadata admission, drift verification, historical FatPtr characterization, and feature isolation are in place. Its stated closure condition is now exercised by the generated async lifecycle through the same ABI.