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

#264 in Configuration

Download history 353/week @ 2025-06-14 421/week @ 2025-06-21 350/week @ 2025-06-28 420/week @ 2025-07-05 458/week @ 2025-07-12 467/week @ 2025-07-19 735/week @ 2025-07-26 877/week @ 2025-08-02 632/week @ 2025-08-09 466/week @ 2025-08-16 610/week @ 2025-08-23 443/week @ 2025-08-30 517/week @ 2025-09-06 617/week @ 2025-09-13 381/week @ 2025-09-20 639/week @ 2025-09-27

2,195 downloads per month
Used in 8 crates (5 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
~17K SLoC