From e2223c65961a6d507aa9a2c7bd40140169ff043d Mon Sep 17 00:00:00 2001 From: DanGould Date: Mon, 2 Mar 2026 01:19:20 +0800 Subject: [PATCH] Format Cargo.toml files with taplo Extend the taplo configuration to reorder keys in [package], [features], [lib], and [package.metadata] sections in addition to the existing dependency section rules. Run taplo fmt to apply consistent alphabetical key ordering across all Cargo.toml files. This reduces unnecessary merge conflicts caused by inconsistent key ordering across crates. --- fuzz/Cargo.toml | 4 ++-- ohttp-relay/Cargo.toml | 18 +++++++++--------- payjoin-cli/Cargo.toml | 18 +++++++++--------- payjoin-directory/Cargo.toml | 14 +++++++------- payjoin-ffi/Cargo.toml | 14 +++++++------- payjoin-ffi/dart/native/Cargo.toml | 6 +++--- payjoin-ffi/javascript/test-utils/Cargo.toml | 2 +- payjoin-mailroom/Cargo.toml | 16 ++++++++-------- payjoin-test-utils/Cargo.toml | 8 ++++---- payjoin/Cargo.toml | 18 +++++++++--------- taplo.toml | 13 ++++++++++++- 11 files changed, 71 insertions(+), 60 deletions(-) diff --git a/fuzz/Cargo.toml b/fuzz/Cargo.toml index 9a77f9d41..51a5063a7 100644 --- a/fuzz/Cargo.toml +++ b/fuzz/Cargo.toml @@ -1,8 +1,8 @@ [package] +edition = "2021" name = "payjoin-fuzz" -version = "0.0.1" publish = false -edition = "2021" +version = "0.0.1" [package.metadata] cargo-fuzz = true diff --git a/ohttp-relay/Cargo.toml b/ohttp-relay/Cargo.toml index 98f982745..7483e3619 100644 --- a/ohttp-relay/Cargo.toml +++ b/ohttp-relay/Cargo.toml @@ -1,23 +1,23 @@ [package] -name = "ohttp-relay" -version = "0.0.11" authors = ["Dan Gould "] +categories = ["web-programming", "network-programming"] description = "Relay Oblivious HTTP requests to protect IP metadata" -repository = "https://github.com/payjoin/rust-payjoin/tree/master/ohttp-relay" -readme = "README.md" +edition = "2021" +exclude = ["tests"] keywords = ["ohttp", "privacy"] -categories = ["web-programming", "network-programming"] license = "MITNFA" -edition = "2021" +name = "ohttp-relay" +readme = "README.md" +repository = "https://github.com/payjoin/rust-payjoin/tree/master/ohttp-relay" rust-version = "1.85.0" -exclude = ["tests"] +version = "0.0.11" [features] -default = ["bootstrap"] +_test-util = [] bootstrap = ["connect-bootstrap", "ws-bootstrap"] connect-bootstrap = [] +default = ["bootstrap"] ws-bootstrap = ["futures", "rustls", "tokio-tungstenite"] -_test-util = [] [dependencies] byteorder = "1.5.0" diff --git a/payjoin-cli/Cargo.toml b/payjoin-cli/Cargo.toml index 786b4a760..ad4acf801 100644 --- a/payjoin-cli/Cargo.toml +++ b/payjoin-cli/Cargo.toml @@ -1,17 +1,17 @@ [package] -name = "payjoin-cli" -version = "0.2.0" authors = ["Dan Gould "] +categories = ["cryptography::cryptocurrencies", "network-programming"] description = "A command-line Payjoin client for Bitcoin Core" -repository = "https://github.com/payjoin/rust-payjoin" -readme = "README.md" +edition = "2021" +exclude = ["tests"] keywords = ["bip78", "payjoin", "bitcoin"] -categories = ["cryptography::cryptocurrencies", "network-programming"] license = "MITNFA" -edition = "2021" -rust-version = "1.85" +name = "payjoin-cli" +readme = "README.md" +repository = "https://github.com/payjoin/rust-payjoin" resolver = "2" -exclude = ["tests"] +rust-version = "1.85" +version = "0.2.0" [[bin]] name = "payjoin-cli" @@ -19,9 +19,9 @@ path = "src/main.rs" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [features] +_manual-tls = ["reqwest/rustls-tls", "payjoin/_manual-tls", "tokio-rustls"] default = ["v2"] native-certs = ["reqwest/rustls-tls-native-roots"] -_manual-tls = ["reqwest/rustls-tls", "payjoin/_manual-tls", "tokio-rustls"] v1 = ["payjoin/v1", "hyper", "hyper-util", "http-body-util"] v2 = ["payjoin/v2", "payjoin/io"] diff --git a/payjoin-directory/Cargo.toml b/payjoin-directory/Cargo.toml index 5b70dda3c..36722988f 100644 --- a/payjoin-directory/Cargo.toml +++ b/payjoin-directory/Cargo.toml @@ -1,16 +1,16 @@ [package] -name = "payjoin-directory" -version = "0.0.3" authors = ["Dan Gould "] +categories = ["cryptography::cryptocurrencies", "network-programming"] description = "A store-and-forward and Oblivious Gateway Resource directory server for Async Payjoin" -repository = "https://github.com/payjoin/rust-payjoin" -readme = "README.md" +edition = "2021" keywords = ["bip78", "bip77", "payjoin", "bitcoin", "ohttp"] -categories = ["cryptography::cryptocurrencies", "network-programming"] license = "MITNFA" -edition = "2021" -rust-version = "1.85" +name = "payjoin-directory" +readme = "README.md" +repository = "https://github.com/payjoin/rust-payjoin" resolver = "2" +rust-version = "1.85" +version = "0.0.3" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/payjoin-ffi/Cargo.toml b/payjoin-ffi/Cargo.toml index 78ba7782a..913982c26 100644 --- a/payjoin-ffi/Cargo.toml +++ b/payjoin-ffi/Cargo.toml @@ -1,21 +1,21 @@ [package] -name = "payjoin-ffi" -version = "0.24.0" edition = "2021" -license = "MIT OR Apache-2.0" exclude = ["tests"] +license = "MIT OR Apache-2.0" +name = "payjoin-ffi" +version = "0.24.0" [features] -default = [] +_manual-tls = ["payjoin/_manual-tls"] +_test-utils = ["payjoin-test-utils", "tokio"] csharp = ["dep:uniffi-bindgen-cs"] dart = ["dep:uniffi-dart"] -_test-utils = ["payjoin-test-utils", "tokio"] -_manual-tls = ["payjoin/_manual-tls"] +default = [] wasm_js = ["getrandom/js"] [lib] -name = "payjoin_ffi" crate-type = ["lib", "staticlib", "cdylib"] +name = "payjoin_ffi" [[bin]] name = "uniffi-bindgen" diff --git a/payjoin-ffi/dart/native/Cargo.toml b/payjoin-ffi/dart/native/Cargo.toml index 2a614b342..60b621f05 100644 --- a/payjoin-ffi/dart/native/Cargo.toml +++ b/payjoin-ffi/dart/native/Cargo.toml @@ -1,19 +1,19 @@ [workspace] [package] -name = "payjoin-ffi-wrapper" description = "This is a simple wrapper crate which re-exports payjoin-ffi for publishing to pub.dev" -version = "0.1.0" edition = "2021" license = "MIT OR Apache-2.0" +name = "payjoin-ffi-wrapper" publish = false +version = "0.1.0" [features] _test-utils = ["payjoin-ffi/_test-utils"] [lib] -name = "payjoin_ffi_wrapper" crate-type = ["staticlib", "cdylib"] +name = "payjoin_ffi_wrapper" [dependencies] payjoin-ffi = { git = "https://github.com/payjoin/rust-payjoin.git", branch = "master", features = [ diff --git a/payjoin-ffi/javascript/test-utils/Cargo.toml b/payjoin-ffi/javascript/test-utils/Cargo.toml index 6d0c0f1bc..d8bdc081d 100644 --- a/payjoin-ffi/javascript/test-utils/Cargo.toml +++ b/payjoin-ffi/javascript/test-utils/Cargo.toml @@ -1,7 +1,7 @@ [package] +edition = "2021" name = "payjoin-test-utils-napi" version = "0.1.0" -edition = "2021" [lib] crate-type = ["cdylib"] diff --git a/payjoin-mailroom/Cargo.toml b/payjoin-mailroom/Cargo.toml index 482cb66b7..fa40d3197 100644 --- a/payjoin-mailroom/Cargo.toml +++ b/payjoin-mailroom/Cargo.toml @@ -1,28 +1,28 @@ [package] -name = "payjoin-mailroom" -version = "0.1.0" -description = "Combined Payjoin Directory and OHTTP Relay" -repository = "https://github.com/payjoin/rust-payjoin/tree/master/payjoin-mailroom" -keywords = ["bip77", "bitcoin", "ohttp", "payjoin", "privacy"] categories = [ "cryptography::cryptocurrencies", "network-programming", "web-programming", ] -license = "MITNFA" +description = "Combined Payjoin Directory and OHTTP Relay" edition = "2021" +keywords = ["bip77", "bitcoin", "ohttp", "payjoin", "privacy"] +license = "MITNFA" +name = "payjoin-mailroom" +repository = "https://github.com/payjoin/rust-payjoin/tree/master/payjoin-mailroom" rust-version = "1.85.0" +version = "0.1.0" [features] -default = [] _manual-tls = ["dep:axum-server", "dep:rustls", "ohttp-relay/_test-util"] +access-control = ["dep:flate2", "dep:ipnet", "dep:maxminddb", "dep:reqwest"] acme = [ "dep:tokio-rustls-acme", "dep:axum-server", "dep:rustls", "dep:tokio-stream", ] -access-control = ["dep:flate2", "dep:ipnet", "dep:maxminddb", "dep:reqwest"] +default = [] telemetry = ["dep:opentelemetry-otlp"] [dependencies] diff --git a/payjoin-test-utils/Cargo.toml b/payjoin-test-utils/Cargo.toml index ee8a1b5fa..bc1dbf2f0 100644 --- a/payjoin-test-utils/Cargo.toml +++ b/payjoin-test-utils/Cargo.toml @@ -1,12 +1,12 @@ [package] -name = "payjoin-test-utils" -version = "0.0.1" -edition = "2021" authors = ["Dan Gould "] description = "Payjoin test utilities" +edition = "2021" +license = "MIT" +name = "payjoin-test-utils" repository = "https://github.com/payjoin/rust-payjoin" rust-version = "1.85" -license = "MIT" +version = "0.0.1" [dependencies] axum-server = { version = "0.8", features = ["tls-rustls-no-provider"] } diff --git a/payjoin/Cargo.toml b/payjoin/Cargo.toml index 662b619ec..c232af8ae 100644 --- a/payjoin/Cargo.toml +++ b/payjoin/Cargo.toml @@ -1,21 +1,21 @@ [package] -name = "payjoin" -version = "1.0.0-rc.2" authors = ["Dan Gould "] -description = "Payjoin Library implementing BIP 78 and BIP 77 batching protocols." -repository = "https://github.com/payjoin/rust-payjoin" -readme = "../README.md" -keywords = ["bip78", "payjoin", "bitcoin"] categories = [ "api-bindings", "cryptography::cryptocurrencies", "network-programming", ] +description = "Payjoin Library implementing BIP 78 and BIP 77 batching protocols." +edition = "2021" +exclude = ["tests"] +keywords = ["bip78", "payjoin", "bitcoin"] license = "MITNFA" +name = "payjoin" +readme = "../README.md" +repository = "https://github.com/payjoin/rust-payjoin" resolver = "2" -edition = "2021" rust-version = "1.85" -exclude = ["tests"] +version = "1.0.0-rc.2" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -35,9 +35,9 @@ directory = [] v1 = ["_core"] v2 = ["_core", "hpke", "bhttp", "ohttp", "directory"] #[doc = "Functions to fetch OHTTP keys via CONNECT proxy using reqwest. Enables `v2` since only `v2` uses OHTTP."] -io = ["v2", "reqwest/rustls-tls"] _manual-tls = ["reqwest/rustls-tls", "rustls"] _test-utils = [] +io = ["v2", "reqwest/rustls-tls"] [dependencies] bhttp = { version = "0.6.1", optional = true } diff --git a/taplo.toml b/taplo.toml index 324fc69b1..a5a038c92 100644 --- a/taplo.toml +++ b/taplo.toml @@ -7,7 +7,18 @@ indent_size = 2 [[rule]] include = ["**/Cargo.toml"] -keys = ["dependencies", "*-dependencies", "workspace"] +keys = [ + "dependencies", + "dev-dependencies", + "build-dependencies", + "workspace.dependencies", +] [rule.formatting] reorder_keys = true align_comments = true + +[[rule]] +include = ["**/Cargo.toml"] +keys = ["package", "features", "lib", "package.metadata", "package.metadata.*"] +[rule.formatting] +reorder_keys = true