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

#118 in Build Utils

Download history 435/week @ 2024-12-24 604/week @ 2024-12-31 380/week @ 2025-01-07 371/week @ 2025-01-14 280/week @ 2025-01-21 419/week @ 2025-01-28 1588/week @ 2025-02-04 4008/week @ 2025-02-11 1562/week @ 2025-02-18 1834/week @ 2025-02-25 4120/week @ 2025-03-04 4612/week @ 2025-03-11 1966/week @ 2025-03-18 2326/week @ 2025-03-25 1594/week @ 2025-04-01 1239/week @ 2025-04-08

8,193 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