Structured Merge defines a common language for semantic merge rules, with implementations and fixtures across multiple languages.
- Specification-first merge vocabulary and compatibility fixtures
- Parser-backed template merges and git merges
- Ruby tooling for AST-aware templating and project maintenance
- Find out more at StructuredMerge.org
We welcome implementation feedback, prior art, bug reports, and release coordination in Ruby Users Forum and Discord.
Prior/Contemporaneous Art
Things we've heard about that are similar in some ways:
- difftastic - structural diff tool, parses with tree-sitter, compares syntax aware structure, and renders human oriented diffs. Does not generate patches, or perform merges.
- mergiraf - syntax-aware git merge driver implemented in Rust. Uses tree-sitter, and implements a fine-grained, 3DM-inspired, 3-way merge.
- spork - AST-based merges in Java, based on the research paper
arXiv-2202.05329v1. 3DM-derived merge over PCS/change-set structures, with custom conflict handling, formatting-aware printing, and git compatibility mode. - weave - entity-level semantic merge driver implemented in Rust, based on tree-sitter, which falls back to line-merge within multi-line entity spans.
Support StructuredMerge through Open Collective, GitHub Sponsors, or Liberapay.
| Project | Description | Downloads | Current CI | Funding |
|---|---|---|---|---|
| structuredmerge-go | Go implementation of the Structured Merge rules contract. | - | Open Collective / GitHub Sponsors / Liberapay | |
| structuredmerge-ruby | Ruby implementation and gem workspace. | - | Open Collective / GitHub Sponsors / Liberapay | |
| structuredmerge-rust | Rust implementation of the Structured Merge rules contract. | - | Open Collective / GitHub Sponsors / Liberapay | |
| structuredmerge-typescript | TypeScript implementation of the Structured Merge rules contract. | - | Open Collective / GitHub Sponsors / Liberapay | |
| structuredmerge-spec | Merge rules draft and shared specification material. | - | Open Collective / GitHub Sponsors / Liberapay | |
| structuredmerge-fixtures | Cross-implementation fixture corpus. | - | Open Collective / GitHub Sponsors / Liberapay | |
| ast-crispr | AST-aware structural editing primitives. | Open Collective / GitHub Sponsors / Liberapay | ||
| ast-merge | Structural merge tools for AST-backed documents. | Open Collective / GitHub Sponsors / Liberapay | ||
| tree_haver | Tree and node helper APIs for structured documents. | Open Collective / GitHub Sponsors / Liberapay | ||
| smorg-rb | Ruby CLI and orchestration helpers for Structured Merge. | Open Collective / GitHub Sponsors / Liberapay | ||
| kettle-jem | Template and maintenance engine for Ruby gem workspaces. | Open Collective / GitHub Sponsors / Liberapay |
This project is dual-licensed under AGPL-3.0-only and PolyForm-Small-Business-1.0.0, so pick whichever suits you best, or contact info@structuredmerge.org to request a license exception.