From 59899c7c178edd0ebd26107b1aa280650df78df7 Mon Sep 17 00:00:00 2001 From: e-desouza Date: Tue, 14 Jul 2026 12:39:53 -0400 Subject: [PATCH 1/3] chore: declare rust-version and forbid unsafe_code in manifests - Add rust-version = "1.87" to xrpl-rust (enforces documented MSRV at cargo level; downstream consumers get a clear error instead of cryptic proc-macro failures on older toolchains) - Add rust-version = "1.85" to xrpl-rust-macros (edition = "2024" already requires 1.85; now declared explicitly) - Add [lints.rust] unsafe_code = "forbid" to xrpl-rust (crate contains no unsafe code; guard prevents silent introduction into deserialization paths that process untrusted XRPL network data) Closes #350, closes #351 --- Cargo.toml | 5 +++++ xrpl-rust-macros/Cargo.toml | 1 + 2 files changed, 6 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 67012eb3..6504f506 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,6 +2,7 @@ name = "xrpl-rust" version = "1.2.0" edition = "2021" +rust-version = "1.87" authors = [ "Tanveer Wahid ", "LimpidCrypto ", @@ -165,3 +166,7 @@ actix-rt = ["dep:actix-rt"] async-std-rt = ["dep:async-std"] futures-rt = ["dep:futures-timer"] smol-rt = ["dep:smol"] + + +[lints.rust] +unsafe_code = "forbid" diff --git a/xrpl-rust-macros/Cargo.toml b/xrpl-rust-macros/Cargo.toml index ae97d33f..10397d7a 100644 --- a/xrpl-rust-macros/Cargo.toml +++ b/xrpl-rust-macros/Cargo.toml @@ -2,6 +2,7 @@ name = "xrpl-rust-macros" version = "0.1.0" edition = "2024" +rust-version = "1.85" description = "XRPL Rust Macros" license = "ISC" From fd56dc764c3a2165d1898ae200b7498ccf989827 Mon Sep 17 00:00:00 2001 From: e-desouza Date: Tue, 14 Jul 2026 14:46:57 -0400 Subject: [PATCH 2/3] chore: add unsafe_code = forbid lint to xrpl-rust-macros (addresses review) --- xrpl-rust-macros/Cargo.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xrpl-rust-macros/Cargo.toml b/xrpl-rust-macros/Cargo.toml index 10397d7a..3790070d 100644 --- a/xrpl-rust-macros/Cargo.toml +++ b/xrpl-rust-macros/Cargo.toml @@ -13,3 +13,6 @@ proc-macro = true syn = "2.0" quote = "1.0" proc-macro2 = "1.0" + +[lints.rust] +unsafe_code = "forbid" From 27741caca39e82872f40a462acae230e90e94ebf Mon Sep 17 00:00:00 2001 From: e-desouza Date: Tue, 14 Jul 2026 14:46:57 -0400 Subject: [PATCH 3/3] style: reduce to single blank line before [lints.rust] in Cargo.toml (addresses review) --- Cargo.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 6504f506..f5f20b67 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -167,6 +167,5 @@ async-std-rt = ["dep:async-std"] futures-rt = ["dep:futures-timer"] smol-rt = ["dep:smol"] - [lints.rust] unsafe_code = "forbid"