{"id":47115436,"url":"https://github.com/pulseengine/meld","last_synced_at":"2026-04-29T06:01:32.758Z","repository":{"id":336373208,"uuid":"1149395942","full_name":"pulseengine/meld","owner":"pulseengine","description":"Meld — Static WebAssembly component fusion. Part of the PulseEngine toolchain.","archived":false,"fork":false,"pushed_at":"2026-04-27T19:45:48.000Z","size":84184,"stargazers_count":4,"open_issues_count":14,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-27T21:22:40.404Z","etag":null,"topics":["component-model","formal-verification","fusion","pulseengine","rust","webassembly"],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pulseengine.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-02-04T04:09:56.000Z","updated_at":"2026-04-27T19:40:42.000Z","dependencies_parsed_at":"2026-03-01T13:01:07.945Z","dependency_job_id":null,"html_url":"https://github.com/pulseengine/meld","commit_stats":null,"previous_names":["pulseengine/meld"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/pulseengine/meld","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pulseengine%2Fmeld","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pulseengine%2Fmeld/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pulseengine%2Fmeld/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pulseengine%2Fmeld/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pulseengine","download_url":"https://codeload.github.com/pulseengine/meld/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pulseengine%2Fmeld/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32412890,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T05:20:56.964Z","status":"ssl_error","status_checked_at":"2026-04-29T05:19:54.749Z","response_time":110,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["component-model","formal-verification","fusion","pulseengine","rust","webassembly"],"created_at":"2026-03-12T18:58:24.034Z","updated_at":"2026-04-29T06:01:27.740Z","avatar_url":"https://github.com/pulseengine.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# Meld\n\n\u003csup\u003eStatic WebAssembly component fusion\u003c/sup\u003e\n\n\u0026nbsp;\n\n[![CI](https://github.com/pulseengine/meld/actions/workflows/ci.yml/badge.svg)](https://github.com/pulseengine/meld/actions/workflows/ci.yml)\n![Rust](https://img.shields.io/badge/Rust-CE422B?style=flat-square\u0026logo=rust\u0026logoColor=white\u0026labelColor=1a1b27)\n![WebAssembly](https://img.shields.io/badge/WebAssembly-654FF0?style=flat-square\u0026logo=webassembly\u0026logoColor=white\u0026labelColor=1a1b27)\n![Component Model](https://img.shields.io/badge/Component_Model-654FF0?style=flat-square\u0026logoColor=white\u0026labelColor=1a1b27)\n![Formally Verified](https://img.shields.io/badge/Formally_Verified-00C853?style=flat-square\u0026logoColor=white\u0026labelColor=1a1b27)\n![License: Apache-2.0](https://img.shields.io/badge/License-Apache--2.0-blue?style=flat-square\u0026labelColor=1a1b27)\n\n\u0026nbsp;\n\n\u003ch6\u003e\n  \u003ca href=\"https://github.com/pulseengine/meld\"\u003eMeld\u003c/a\u003e\n  \u0026middot;\n  \u003ca href=\"https://github.com/pulseengine/loom\"\u003eLoom\u003c/a\u003e\n  \u0026middot;\n  \u003ca href=\"https://github.com/pulseengine/synth\"\u003eSynth\u003c/a\u003e\n  \u0026middot;\n  \u003ca href=\"https://github.com/pulseengine/kiln\"\u003eKiln\u003c/a\u003e\n  \u0026middot;\n  \u003ca href=\"https://github.com/pulseengine/sigil\"\u003eSigil\u003c/a\u003e\n\u003c/h6\u003e\n\n\u003c/div\u003e\n\n\u0026nbsp;\n\nMeld fuses. Loom weaves. Synth transpiles. Kiln fires. Sigil seals.\n\nMeld statically fuses multiple WebAssembly components into a single core module, eliminating the need for runtime linking. Import resolution, index-space merging, and canonical ABI adapter generation happen at build time. Every transformation carries mechanized proofs covering parsing, resolution, merging, and adapter correctness.\n\nUnlike composition tools that produce linked-but-separate component graphs, Meld produces a single monolithic module suitable for whole-program optimization by Loom and native transpilation by Synth.\n\n## Quick Start\n\n```bash\n# From source (Cargo)\ncargo install --path meld-cli\n\n# From source (Bazel)\nbazel build //meld-cli:meld\n\n# Fuse two components\nmeld fuse component_a.wasm component_b.wasm -o fused.wasm\n```\n\n### Full Pipeline\n\n```bash\n# 1. Build components\ncargo component build --release\n\n# 2. Fuse into single module\nmeld fuse composed.wasm -o fused.wasm\n\n# 3. Optimize with Loom\nloom optimize fused.wasm -o optimized.wasm\n\n# 4. Run\nwasmtime run optimized.wasm\n```\n\n### Bazel Integration\n\n```starlark\nload(\"@meld//rules:meld.bzl\", \"meld_fuse\")\n\nmeld_fuse(\n    name = \"my_app\",\n    components = [\n        \":component_a\",\n        \":component_b\",\n    ],\n)\n```\n\n## How It Works\n\n1. **Parse** — Extract core modules and type information from components\n2. **Resolve** — Build import/export graph, identify cross-component calls\n3. **Merge** — Combine function/memory/table/global index spaces\n4. **Adapt** — Generate Canonical ABI trampolines for cross-component calls\n5. **Encode** — Output single core WebAssembly module\n\n### Adapter Generation\n\nCross-component calls may require adapters that handle string transcoding (UTF-8, UTF-16, Latin-1), memory copying between component memories, list/array serialization, and resource handle transfer. Meld generates these adapters using techniques inspired by Wasmtime's FACT (Fused Adapter Compiler of Trampolines).\n\n## Memory Strategies\n\n### Multi-Memory (Default)\n\nEach component retains its own linear memory. Cross-component calls use adapters that allocate in the callee's memory via `cabi_realloc` and copy data with `memory.copy`. Requires multi-memory support (WebAssembly Core Spec 3.0).\n\n```bash\nmeld fuse a.wasm b.wasm -o fused.wasm\n```\n\n### Shared Memory (Legacy)\n\nAll components share a single linear memory. Simpler but one component's `memory.grow` corrupts every other component's address space.\n\n```bash\nmeld fuse --memory shared a.wasm b.wasm -o fused.wasm\n```\n\n## Supply Chain Security\n\nMeld integrates with [Sigil](https://github.com/pulseengine/sigil) for supply chain attestation. Each fusion operation records input component hashes, tool version and configuration, and transformation metadata. The attestation is embedded in the output module's custom section.\n\n## Formal Verification\n\nMeld's core transformations are formally verified using Rocq. The proofs establish that fusion preserves program semantics — the fused module behaves identically to the original composed components.\n\nKey verified properties:\n- **Merge correctness** — Index remapping preserves function/memory/table references\n- **Resolve correctness** — Topological sort produces valid instantiation order; cycle detection terminates\n- **Adapter correctness** — Generated trampolines preserve call semantics\n- **Forward simulation** — Fused module simulates the original component graph step-by-step\n\nProofs are built via Bazel using [`rules_rocq_rust`](https://github.com/pulseengine/rules_rocq_rust):\n\n```bash\nbazel build //proofs/transformations/merge:merge_spec\nbazel build //proofs/spec:fusion_spec\n```\n\nSee [`proofs/`](proofs/) for the full proof tree and [`PROOF_GUIDE.md`](proofs/PROOF_GUIDE.md) for an introduction.\n\n\u003e [!NOTE]\n\u003e **Cross-cutting verification** \u0026mdash; Rocq mechanized proofs, Kani bounded model checking, Z3 SMT verification, and Verus Rust verification are used across the PulseEngine toolchain. Sigil attestation chains bind it all together.\n\n## Limitations\n\n- **Resources** — Resource handle transfer across components is limited\n- **Async** — Async component functions not yet supported\n- **String transcoding** — UTF-8/UTF-16 and Latin-1/UTF-8 are implemented; UTF-8/Latin-1 is not yet supported\n\n## Development\n\n```bash\ncargo build                # Build\ncargo test                 # Test\nbazel build //...          # Bazel build\nRUST_LOG=debug cargo run -- fuse a.wasm b.wasm -o out.wasm\n```\n\n## License\n\nApache-2.0\n\n---\n\n\u003cdiv align=\"center\"\u003e\n\n\u003csub\u003ePart of \u003ca href=\"https://github.com/pulseengine\"\u003ePulseEngine\u003c/a\u003e \u0026mdash; formally verified WebAssembly toolchain for safety-critical systems\u003c/sub\u003e\n\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpulseengine%2Fmeld","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpulseengine%2Fmeld","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpulseengine%2Fmeld/lists"}