feat(runtime): add LLVM Wasm plugin runtime and Rust Arrow example #6069
All Vouch review confidence checks passed
Residual risk 0.27 = Change Risk (0.50) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.50 · 632 lines diff across 7 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.386
Shallow Review Depth
shallow_review_depth
0.344
Real PR Conversation Timeline
1 comments
"Review active on #6069"
general
weight: 0.35
M4n5ter
Summary
This PR adds an experimental language-neutral core-Wasm plugin path to Maka and uses a Rust Apache Arrow Compute plugin as the first real example.
The current JavaScript/TypeScript plugin loader remains unchanged. A package opts into the new path with
runtime.format = "wasm"andruntime.abi = "maka:plugin/runtime@1".Why LLVM makes Rust plugins possible
Maka does not need to understand Rust source code or embed a Rust runtime. Rust code is compiled by
rustc, whose backend lowers the program through LLVM towasm32-unknown-unknown. The resulting Wasm core module exports the small Maka ABI:memoryi64The Runtime Host validates the manifest, starts the module in a worker with no imports, enforces memory/input/output/time limits, and adapts each manifest contribution into the existing
PluginToolService. The resulting Tool is indistinguishable from a JavaScript plugin Tool to the rest of Maka.This is why the approach extends beyond Rust: C, C++, Zig, Swift, or another LLVM frontend can target the same Wasm ABI. LLVM is the compilation and audit layer; it is not a Runtime Host dependency.
Arrow example
experiments/llvm-plugin/arrow-data-analysisis a complete Rust plugin package:summarybuilds an ArrowFloat64Arrayand computes sum, min, max, mean, and null statistics.group_sumbuilds Arrow numeric/string arrays and computes per-group aggregates.maka.extension.jsondeclares the Wasm runtime.maka.composition.ymlinstalls thearrow_analyzeTool at profile scope.e2e.mjsinstalls the package through the realHostPluginPlatform, invokes it, and uninstalls it.deepseek-e2e.mjsoptionally exercises DeepSeek function calling through the same Tool. It only readsDEEPSEEK_API_KEYfrom the environment and never prints it.The local DeepSeek run completed successfully: DeepSeek selected
group_sum, the Arrow plugin returned east = 120 and west = 280, and DeepSeek generated a follow-up explanation from the Tool result.Package boundary change
The hard 256-file plugin package limit is removed. The package store still enforces:
A regression test installs a package with 300 files successfully.
Design and scope
Verification
npm --workspace @maka/runtime-host run typecheck— passednpm --workspace @maka/runtime-host run build— passednode --test --test-name-pattern="loads the versioned Wasm tool ABI" packages/runtime-host/dist/__tests__/wasm-plugin-runtime.test.js— passednode --test --test-name-pattern="Plugin packages do not impose a file-count cap" packages/runtime-host/dist/__tests__/plugin-platform.test.js— passedcargo check --manifest-path experiments/llvm-plugin/arrow-data-analysis/Cargo.toml— passedcd experiments/llvm-plugin && node sdk/build.mjs rust ../arrow-data-analysis— produceddist/plugin.wasmnode experiments/llvm-plugin/arrow-data-analysis/e2e.mjs— passed summary and group_sum installation/invocation/uninstall flownode experiments/llvm-plugin/arrow-data-analysis/deepseek-e2e.mjs— passed with the local DeepSeek API keynode scripts/asf-license-headers.mjs check— passedgit diff --checkand targeted Biome checks — passedThe full Runtime Host suite was not used as the acceptance gate because the existing checkout has unrelated baseline failures in ACP/deep-research fixtures and hosted execution metadata.
AI use
Tool(s) and scope: OpenAI Codex authored the implementation, tests, architecture documentation, and verification commands under human direction. The commit retains
Generated-by: Codex.Checklist
Does this PR entail a change in behavior?