{"id":47115454,"url":"https://github.com/pulseengine/loom","last_synced_at":"2026-03-12T18:58:28.299Z","repository":{"id":323898304,"uuid":"1093699475","full_name":"pulseengine/loom","owner":"pulseengine","description":"Loom — Formally verified WebAssembly optimizer. Part of the PulseEngine toolchain.","archived":false,"fork":false,"pushed_at":"2026-02-28T20:13:33.000Z","size":1319,"stargazers_count":1,"open_issues_count":5,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-28T23:28:34.140Z","etag":null,"topics":[],"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":null,"dco":null,"cla":null}},"created_at":"2025-11-10T18:09:14.000Z","updated_at":"2026-02-28T20:13:37.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/pulseengine/loom","commit_stats":null,"previous_names":["pulseengine/loom"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/pulseengine/loom","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pulseengine%2Floom","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pulseengine%2Floom/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pulseengine%2Floom/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pulseengine%2Floom/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pulseengine","download_url":"https://codeload.github.com/pulseengine/loom/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pulseengine%2Floom/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30439122,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-12T14:34:45.044Z","status":"ssl_error","status_checked_at":"2026-03-12T14:09:33.793Z","response_time":114,"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":[],"created_at":"2026-03-12T18:58:27.510Z","updated_at":"2026-03-12T18:58:28.283Z","avatar_url":"https://github.com/pulseengine.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# Loom\n\n\u003csup\u003eFormally verified WebAssembly optimizer\u003c/sup\u003e\n\n\u0026nbsp;\n\n[![CI](https://github.com/pulseengine/loom/actions/workflows/ci.yml/badge.svg)](https://github.com/pulseengine/loom/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![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\nTwelve-pass WebAssembly optimization pipeline built on Cranelift's ISLE pattern-matching engine. Constant folding, strength reduction, CSE, inlining, dead code elimination — each pass proven correct through Z3 SMT translation validation. Includes a fused mode purpose-built for Meld output.\n\nLoom consistently achieves 80-95% binary size reduction with 10-30 microsecond optimization times. The entire pipeline is pure Rust with minimal dependencies.\n\n## Quick Start\n\n```bash\n# Build from source\ngit clone https://github.com/pulseengine/loom\ncd loom\ncargo build --release\n\n# Optimize a WebAssembly module\nloom optimize input.wasm -o output.wasm\n\n# With statistics\nloom optimize input.wasm -o output.wasm --stats\n\n# With Z3 verification\nloom optimize input.wasm -o output.wasm --verify\n```\n\n## Architecture\n\n- **loom-core** — Optimization pipeline implementation\n- **loom-shared** — Core ISLE definitions and WebAssembly IR (stable API)\n- **loom-cli** — Command-line interface\n- **loom-testing** — Differential testing framework\n\nThe 12-phase pipeline: Precompute, ISLE Constant Folding, Strength Reduction, CSE, Function Inlining, ISLE (Post-inline), Code Folding, LICM, Branch Simplification, Dead Code Elimination, Block Merging, Vacuum and Simplify Locals.\n\nSee [docs/architecture.md](docs/architecture.md) for the full pipeline design.\n\n## Features\n\n- **Constant folding** — Compile-time evaluation with cross-function propagation via inlining\n- **Strength reduction** — Replace expensive ops with cheaper equivalents (`x * 8` becomes `x \u003c\u003c 3`)\n- **Common subexpression elimination** — Deduplicate redundant computations\n- **Function inlining** — Inline small functions to expose cross-function optimizations\n- **Dead code elimination** — Remove unreachable code and unused locals\n- **Loop-invariant code motion** — Hoist invariant expressions out of loops\n- **Component Model support** — wasm32-wasip2 build target\n- **Stateful dataflow analysis** — Track locals and memory state across passes\n- **Idempotent passes** — Safe to run multiple times without degradation\n\n## Formal Verification\n\nLoom supports two verification modes:\n\n**Property-Based (Always Available)**\n```bash\nloom optimize input.wasm -o output.wasm --verify\n```\nFast idempotence checks and constant folding validation with ~5ms overhead.\n\n**Z3 SMT Formal Proof (Optional)**\n```bash\ncargo build --release --features verification\nloom optimize input.wasm -o output.wasm --verify\n```\nProves mathematically that optimizations preserve program semantics via translation validation. See [docs/guides/formal-verification.md](docs/guides/formal-verification.md) for details.\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## Documentation\n\n- [Usage Guide](docs/guides/usage.md) — Complete CLI reference and best practices\n- [Quick Reference](docs/guides/quick-reference.md) — Cheat sheet for common tasks\n- [Architecture](docs/architecture.md) — Deep dive into the 12-phase pipeline\n- [Formal Verification](docs/guides/formal-verification.md) — Z3 SMT verification internals\n- [WASM Build](docs/guides/wasm-build.md) — Building Loom to WebAssembly\n- [Fused Component Optimization](docs/design/fused-component-optimization.md) — Meld-Loom pipeline\n- [Contributing](CONTRIBUTING.md) — How to contribute\n\n## Building\n\n```bash\ncargo build --release                            # Standard build\ncargo build --release --features verification    # With Z3 verification\ncargo test                                       # Run tests\ncargo bench                                      # Run benchmarks\nbazel build //loom-cli:loom_wasm --platforms=@rules_rust//rust/platform:wasm  # WASM build\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%2Floom","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpulseengine%2Floom","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpulseengine%2Floom/lists"}