feat: resource graph fixes, emit-import-map, and stable clippy#55
Merged
feat: resource graph fixes, emit-import-map, and stable clippy#55
Conversation
The nightly toolchain may not include the clippy component, causing the pre-commit hook to fail. Use `cargo +stable clippy` to ensure clippy is always available. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Adds `--emit-import-map <PATH>` to the `fuse` subcommand, which writes
a JSON file mapping each import in the fused module to its index,
module name, and field name. This enables the synth/kiln pipeline to
wire WASI host functions when cross-compiling fused WASM to ARM.
Output format: {"imports": [{"index": N, "module": "...", "name": "..."}]}
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… transfer Three interrelated fixes for cross-component resource handle routing: 1. Build resource ownership graph BEFORE identify_adapter_sites so the graph-based callee_defines_resource override actually runs (was dead code — graph was always None at that point). 2. defines_resource/resource_definer try bare, [export]-prefixed, and [export]-stripped interface name variants. Core module imports use "[export]imports" while the resolver passes bare "imports". Also narrow the re-exporter removal pass to only remove entries for the specific interface being imported (was removing ALL entries). 3. Own<T> result transfers now call resource.rep (callee handle → rep) before resource.new (rep → caller handle). Previously only called resource.new which received a handle instead of a rep. Graph override now uses one-way logic: only upgrade (false→true) when graph confirms definer, only downgrade (true→false) when graph confirms re-exporter. Unknown entries leave the heuristic value unchanged. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The cleanup pass now removes ALL defines_cache entries for a component that imports a resource, regardless of the export interface name. A component that imports "imports" and exports as "exports" is still a re-exporter — the old code only removed entries where interface names matched, missing cross-name re-export scenarios like resource_floats. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Extract three core WASM modules from the OSxCAR automotive demo (osxcar.de/insights/demonstration/) — anti-pinch, motor driver, and soft start/stop. These are real-world Aptiv components built with wit-bindgen-c 0.46.0 for the anti-pinch window control system. Includes: - WIT interface definitions (reconstructed from jco JS bindings) - Download script to extract base64-encoded WASM from demo page - Build script to wrap core modules into P2 components - README documenting cross-tool testing with meld/loom/synth/kiln/gale Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add a coverage job to CI using cargo-llvm-cov and codecov-action v5. Generates lcov coverage data from all workspace tests and uploads to Codecov. Add coverage badge to README. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
cargo +stable clippyso the hook works when nightly toolchain lacks the clippy component--emit-import-map: New CLI flag for synth/kiln integration — writes JSON mapping each fused module import to its index, module, and field nameidentify_adapter_sitesso graph-basedcallee_defines_resourceoverride actually runs (was dead code)defines_resource/resource_definertry bare,[export]-prefixed, and stripped interface name variantsown<T>result transfers now callresource.repthenresource.new(was missingresource.rep)Test plan
cargo +stable clippy --all-targets -- -D warningscleancargo fmtclean🤖 Generated with Claude Code