From c736e89f2ba0df2b03734e2a63e32f106477927d Mon Sep 17 00:00:00 2001 From: Georg Semmler Date: Tue, 16 Dec 2025 09:28:51 +0100 Subject: [PATCH] Exclude development scripts and fuzzing data During a dependency review we noticed that different regex-* crate includes various development scripts and sometimes fuzzing data. These development scripts shouldn't be there as they might, at some point become problematic. As of now they prevent any downstream user from enabling the `[bans.build.interpreted]` option of cargo deny. The fuzzing data are also not needed for anything. I opted for using an explicit include list instead of an exclude list to prevent these files from beeing included in the published packages to make sure that everything that's included is an conscious choice. --- Cargo.toml | 5 ++++- regex-automata/Cargo.toml | 1 + regex-capi/Cargo.toml | 1 + regex-lite/Cargo.toml | 1 + regex-syntax/Cargo.toml | 1 + 5 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 5aa140c5fc..6f0e46edc5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,7 @@ finite automata and guarantees linear time matching on all inputs. """ categories = ["text-processing"] autotests = false -exclude = ["/fuzz/*", "/record/*", "/scripts/*", "tests/fuzz/*", "/.github/*"] +include.workspace = true edition = "2021" rust-version = "1.65" @@ -27,6 +27,9 @@ members = [ "regex-test", ] +[workspace.package] +include = ["CHANGELOG.md", "Cargo.toml", "LICENSE-MIT", "LICENSE-APACHE", "README.md", "src/**/*.rs"] + # Features are documented in the "Crate features" section of the crate docs: # https://docs.rs/regex/*/#crate-features [features] diff --git a/regex-automata/Cargo.toml b/regex-automata/Cargo.toml index a01d3ec727..7a468bdfcc 100644 --- a/regex-automata/Cargo.toml +++ b/regex-automata/Cargo.toml @@ -13,6 +13,7 @@ categories = ["text-processing"] edition = "2021" autoexamples = false rust-version = "1.65" +include.workspace = true [lib] bench = false diff --git a/regex-capi/Cargo.toml b/regex-capi/Cargo.toml index 9d55258db9..c437095b95 100644 --- a/regex-capi/Cargo.toml +++ b/regex-capi/Cargo.toml @@ -13,6 +13,7 @@ A C API for Rust's regular expression library. workspace = ".." edition = "2021" rust-version = "1.65" +include.workspace = true [lib] name = "rure" diff --git a/regex-lite/Cargo.toml b/regex-lite/Cargo.toml index 16469f6feb..1917941741 100644 --- a/regex-lite/Cargo.toml +++ b/regex-lite/Cargo.toml @@ -13,6 +13,7 @@ workspace = ".." edition = "2021" rust-version = "1.65" autotests = false +include.workspace = true # Features are documented in the "Crate features" section of the crate docs: # https://docs.rs/regex-lite/*/#crate-features diff --git a/regex-syntax/Cargo.toml b/regex-syntax/Cargo.toml index e6dd1bc3d5..1b84c68a2d 100644 --- a/regex-syntax/Cargo.toml +++ b/regex-syntax/Cargo.toml @@ -10,6 +10,7 @@ description = "A regular expression parser." workspace = ".." edition = "2021" rust-version = "1.65" +include.workspace = true # Features are documented in the "Crate features" section of the crate docs: # https://docs.rs/regex-syntax/*/#crate-features