10 releases

0.2.1 Apr 7, 2025
0.2.0 Mar 20, 2025
0.1.7 Dec 21, 2024
0.1.6 Nov 17, 2024
0.1.2 Nov 27, 2023

#117 in Build Utils

Download history 430/week @ 2024-12-30 518/week @ 2025-01-06 403/week @ 2025-01-13 337/week @ 2025-01-20 278/week @ 2025-01-27 1071/week @ 2025-02-03 3935/week @ 2025-02-10 1955/week @ 2025-02-17 1553/week @ 2025-02-24 4127/week @ 2025-03-03 4286/week @ 2025-03-10 2594/week @ 2025-03-17 1839/week @ 2025-03-24 2002/week @ 2025-03-31 1395/week @ 2025-04-07 1060/week @ 2025-04-14

6,544 downloads per month
Used in 7 crates (4 directly)

Apache-2.0

130KB
3K SLoC

A lossless parser for Makefiles

Example:

use std::io::Read;
let contents = r#"PYTHON = python3

.PHONY: all

all: build

build:
	$(PYTHON) setup.py build
"#;
let makefile: makefile_lossless::Makefile = contents.parse().unwrap();

assert_eq!(makefile.rules().count(), 3);

Lossless parser for Makefiles

This crate provides a lossless parser for makefiles, creating a modifiable CST.

Example:


let mf = Makefile::read("Makefile").unwrap();

println!("Rules in the makefile: {:?}", mf.rules().map(|r| r.targets().join(" ")).collect::<Vec<_>>());

Dependencies

~1MB
~16K SLoC