1 unstable release

0.0.0 Dec 17, 2023

#77 in #cfg

Zlib OR Apache-2.0 OR MIT

4KB

syn-merge

Latest version Documentation CI

Merge syn structures by adding cfgs.

Thoughts about diffing

Should operate directly on Rust source code (not on some custom AST).

Able to operate on multiple files (in contrast to most diffing out there).

Longest common subsequence algorithm?

How do we handle ties? Some kind of weighting?

Basically:

let contents = vec![...];
let files = contents.iter().map(syn::parse_file).flatten()?;
let merged = syn_merge::merge(files)?;
file.write(prettyplease::unparse(merged))?;

lib.rs:

Merge syn structures by adding cfgs

Dependencies

~0.4–0.8MB
~19K SLoC