12 releases

0.2.1 Dec 2, 2025
0.2.0 Oct 31, 2025
0.1.29 Oct 31, 2025
0.1.28 Oct 7, 2024
0.1.1 Nov 28, 2023

#2690 in Parser implementations

Download history 408/week @ 2025-10-28 238/week @ 2025-11-04 231/week @ 2025-11-11 257/week @ 2025-11-18 315/week @ 2025-11-25 240/week @ 2025-12-02 153/week @ 2025-12-09 131/week @ 2025-12-16 118/week @ 2025-12-23 290/week @ 2025-12-30 289/week @ 2026-01-06 147/week @ 2026-01-13 144/week @ 2026-01-20 160/week @ 2026-01-27 176/week @ 2026-02-03 128/week @ 2026-02-10

630 downloads per month
Used in 6 crates (2 directly)

Apache-2.0

275KB
3.5K SLoC

A library for parsing and generating Debian patch headers.

Examples

use dep3::PatchHeader;
use std::str::FromStr;
let text = r#"From: John Doe <john.doe@example>
Date: Mon, 1 Jan 2000 00:00:00 +0000
Subject: [PATCH] fix a bug
Bug-Debian: https://bugs.debian.org/123456
Bug: https://bugzilla.example.com/bug.cgi?id=123456
Forwarded: not-needed
"#;

let patch_header = PatchHeader::from_str(text).unwrap();
assert_eq!(patch_header.description, Some("[PATCH] fix a bug".to_string()));
assert_eq!(patch_header.vendor_bugs("Debian"), Some("https://bugs.debian.org/123456"));

Rust parser for Debian DEP-3 patch headers

Examples

use dep3::PatchHeader;
use std::str::FromStr;
let text = r#"From: John Doe <john.doe@example>
Date: Mon, 1 Jan 2000 00:00:00 +0000
Subject: [PATCH] fix a bug
Bug-Debian: https://bugs.debian.org/123456
Bug: https://bugzilla.example.com/bug.cgi?id=123456
Forwarded: not-needed
"#;

let patch_header = PatchHeader::from_str(text).unwrap();
assert_eq!(patch_header.description(), Some("[PATCH] fix a bug".to_string()));
assert_eq!(patch_header.vendor_bugs("Debian").collect::<Vec<_>>(), vec!["https://bugs.debian.org/123456".to_string()]);

See https://dep-team.pages.debian.net/deps/dep3/ for details

Dependencies

~3.5–5.5MB
~90K SLoC