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

#2722 in Parser implementations

Download history 214/week @ 2025-10-09 197/week @ 2025-10-16 326/week @ 2025-10-23 295/week @ 2025-10-30 269/week @ 2025-11-06 196/week @ 2025-11-13 242/week @ 2025-11-20 416/week @ 2025-11-27 148/week @ 2025-12-04 149/week @ 2025-12-11 120/week @ 2025-12-18 99/week @ 2025-12-25 316/week @ 2026-01-01 294/week @ 2026-01-08 141/week @ 2026-01-15 144/week @ 2026-01-22

895 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