knut-bifrost-wasm-guest — crate card
Reverse-engineered (from source — verify, don't trust the name)
- One-line pitch: A real
wasm32-unknown-unknownguest module for knut-bifrost'sWasmTransformhost — Arrow IPC stream in, Arrow IPC stream out — proving arrow-on-wasm and serving as a template for user guests. - Does: Exposes the guest ABI the host expects:
alloc(len) -> i32(reserve linear-memory bytes via a Vec-leak for the host to write the input IPC into) andtransform(ptr, len) -> i64(read the Arrow-IPC stream, keep only rows where_gar_idis even, write the survivors back as an IPC stream in a leaked buffer, return(out_ptr << 32) | out_len). On any error it writes an empty-but-valid IPC stream (schema only).#![no_std]+extern crate alloc. - Key deps:
arrow-array/arrow-schema/arrow-ipc/arrow-selectpinned to arrow 59 (to match the host's IPC format), alldefault-features = falsefor a lean wasm footprint. No workspace deps. - Shape:
cdyliblib only; tiny (singlelib.rs). Release profile:opt-level="z",lto,panic="abort". Not a workspace member — its own one-package[workspace], excluded from the native knut root so it only builds for wasm32. - Observed role in the workspace: Test/demo fixture and template for
knut-bifrost'swasmfeature (src/wasm.rshost,wasmiinterpreter). Built explicitly withcargo build --target wasm32-unknown-unknown --release; artifactknut_bifrost_wasm_guest.wasmis consumed by bifrost's wasm tests.
Fill in (one line each — only the human knows these)
- Primary consumer(s):
- Why it exists (vs the obvious alternative):
- Hard constraint (airgap / no-C-deps / no-FFI / pure-Rust / etc.):
- Release cadence & independence (rides a parent? own repo someday?):
- Status (production / prototype / experimental / stubbed):
- Must-NOT-change invariant:
- Biggest known gap or TODO:
- Anything a newcomer would get wrong about it: