diff --git a/Cargo.toml b/Cargo.toml index 9234456fed3..a52576c5a29 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -82,3 +82,8 @@ opt-level = 3 opt-level = 3 [profile.dev.package.sha2] opt-level = 3 + +[workspace.package] +edition = "2021" +authors = ["Near Inc "] +rust-version = "1.64.0" diff --git a/chain/chain-primitives/Cargo.toml b/chain/chain-primitives/Cargo.toml index 7bee072bc68..3d90b41c9c3 100644 --- a/chain/chain-primitives/Cargo.toml +++ b/chain/chain-primitives/Cargo.toml @@ -1,11 +1,11 @@ [package] name = "near-chain-primitives" version = "0.0.0" -authors = ["Near Inc "] +authors.workspace = true publish = true # Please update rust-toolchain.toml as well when changing version here: -rust-version = "1.64.0" -edition = "2021" +rust-version.workspace = true +edition.workspace = true license = "MIT OR Apache-2.0" repository = "https://github.com/near/nearcore" description = "This crate hosts NEAR chain-related error types" diff --git a/chain/chain/Cargo.toml b/chain/chain/Cargo.toml index 46b24c67798..6fde3a821ab 100644 --- a/chain/chain/Cargo.toml +++ b/chain/chain/Cargo.toml @@ -1,11 +1,11 @@ [package] name = "near-chain" version = "0.0.0" -authors = ["Near Inc "] +authors.workspace = true publish = false # Please update rust-toolchain.toml as well when changing version here: -rust-version = "1.64.0" -edition = "2021" +rust-version.workspace = true +edition.workspace = true [dependencies] ansi_term = "0.12" diff --git a/chain/chunks-primitives/Cargo.toml b/chain/chunks-primitives/Cargo.toml index bb8be135aa7..01446ff2475 100644 --- a/chain/chunks-primitives/Cargo.toml +++ b/chain/chunks-primitives/Cargo.toml @@ -1,11 +1,11 @@ [package] name = "near-chunks-primitives" version = "0.0.0" -authors = ["Near Inc "] +authors.workspace = true publish = true # Please update rust-toolchain.toml as well when changing version here: -rust-version = "1.64.0" -edition = "2021" +rust-version.workspace = true +edition.workspace = true license = "MIT OR Apache-2.0" repository = "https://github.com/near/nearcore" description = "This crate hosts NEAR chunks-related error types" diff --git a/chain/chunks/Cargo.toml b/chain/chunks/Cargo.toml index da4018c12c2..9051e3a0b4c 100644 --- a/chain/chunks/Cargo.toml +++ b/chain/chunks/Cargo.toml @@ -1,11 +1,11 @@ [package] name = "near-chunks" version = "0.0.0" -authors = ["Near Inc "] +authors.workspace = true publish = false # Please update rust-toolchain.toml as well when changing version here: -rust-version = "1.64.0" -edition = "2021" +rust-version.workspace = true +edition.workspace = true [dependencies] actix = "0.13.0" diff --git a/chain/client-primitives/Cargo.toml b/chain/client-primitives/Cargo.toml index 7d3d8220bb0..860ded421b5 100644 --- a/chain/client-primitives/Cargo.toml +++ b/chain/client-primitives/Cargo.toml @@ -1,11 +1,11 @@ [package] name = "near-client-primitives" version = "0.0.0" -authors = ["Near Inc "] +authors.workspace = true publish = true # Please update rust-toolchain.toml as well when changing version here: -rust-version = "1.64.0" -edition = "2021" +rust-version.workspace = true +edition.workspace = true license = "MIT OR Apache-2.0" repository = "https://github.com/near/nearcore" description = "This crate hosts NEAR client-related error types" diff --git a/chain/client/Cargo.toml b/chain/client/Cargo.toml index 57a074942b6..8086ef737a1 100644 --- a/chain/client/Cargo.toml +++ b/chain/client/Cargo.toml @@ -1,11 +1,11 @@ [package] name = "near-client" version = "0.0.0" -authors = ["Near Inc "] +authors.workspace = true publish = false # Please update rust-toolchain.toml as well when changing version here: -rust-version = "1.64.0" -edition = "2021" +rust-version.workspace = true +edition.workspace = true [dependencies] ansi_term = "0.12" diff --git a/chain/epoch-manager/Cargo.toml b/chain/epoch-manager/Cargo.toml index dd638f75ad3..eafba61b3ff 100644 --- a/chain/epoch-manager/Cargo.toml +++ b/chain/epoch-manager/Cargo.toml @@ -1,11 +1,11 @@ [package] name = "near-epoch-manager" version = "0.0.0" -authors = ["Near Inc "] +authors.workspace = true publish = false # Please update rust-toolchain.toml as well when changing version here: -rust-version = "1.64.0" -edition = "2021" +rust-version.workspace = true +edition.workspace = true [dependencies] diff --git a/chain/indexer-primitives/Cargo.toml b/chain/indexer-primitives/Cargo.toml index 45b2b6d57d0..521abc1ad2d 100644 --- a/chain/indexer-primitives/Cargo.toml +++ b/chain/indexer-primitives/Cargo.toml @@ -1,11 +1,11 @@ [package] name = "near-indexer-primitives" version = "0.0.0" -authors = ["Near Inc "] +authors.workspace = true publish = true # Please update rust-toolchain.toml as well when changing version here: -rust-version = "1.64.0" -edition = "2021" +rust-version.workspace = true +edition.workspace = true license = "MIT OR Apache-2.0" repository = "https://github.com/near/nearcore" description = "This crate hosts structures for the NEAR Indexer Framework types" diff --git a/chain/indexer/Cargo.toml b/chain/indexer/Cargo.toml index 0133cdb37a8..3d90cecabdd 100644 --- a/chain/indexer/Cargo.toml +++ b/chain/indexer/Cargo.toml @@ -1,11 +1,11 @@ [package] name = "near-indexer" version = "0.0.0" -authors = ["Near Inc "] +authors.workspace = true publish = false # Please update rust-toolchain.toml as well when changing version here: -rust-version = "1.64.0" -edition = "2021" +rust-version.workspace = true +edition.workspace = true [dependencies] actix = "0.13.0" diff --git a/chain/jsonrpc-adversarial-primitives/Cargo.toml b/chain/jsonrpc-adversarial-primitives/Cargo.toml index b6f2f97ae3a..74406245c32 100644 --- a/chain/jsonrpc-adversarial-primitives/Cargo.toml +++ b/chain/jsonrpc-adversarial-primitives/Cargo.toml @@ -1,11 +1,11 @@ [package] name = "near-jsonrpc-adversarial-primitives" version = "0.0.0" -authors = ["Near Inc "] +authors.workspace = true publish = false # Please update rust-toolchain.toml as well when changing version here: -rust-version = "1.64.0" -edition = "2021" +rust-version.workspace = true +edition.workspace = true [dependencies] serde = { version = "1", features = ["derive"] } diff --git a/chain/jsonrpc-primitives/Cargo.toml b/chain/jsonrpc-primitives/Cargo.toml index 819c9208ab5..2c1022bbe43 100644 --- a/chain/jsonrpc-primitives/Cargo.toml +++ b/chain/jsonrpc-primitives/Cargo.toml @@ -1,11 +1,11 @@ [package] name = "near-jsonrpc-primitives" version = "0.0.0" -authors = ["Near Inc "] +authors.workspace = true publish = true # Please update rust-toolchain.toml as well when changing version here: -rust-version = "1.64.0" -edition = "2021" +rust-version.workspace = true +edition.workspace = true license = "MIT OR Apache-2.0" repository = "https://github.com/near/nearcore" description = "This crate hosts structures for the NEAR JSON RPC Requests, Responses and Error types" diff --git a/chain/jsonrpc/Cargo.toml b/chain/jsonrpc/Cargo.toml index 35c7611e06d..4a2d251bb06 100644 --- a/chain/jsonrpc/Cargo.toml +++ b/chain/jsonrpc/Cargo.toml @@ -1,11 +1,11 @@ [package] name = "near-jsonrpc" version = "0.0.0" -authors = ["Near Inc "] +authors.workspace = true publish = false # Please update rust-toolchain.toml as well when changing version here: -rust-version = "1.64.0" -edition = "2021" +rust-version.workspace = true +edition.workspace = true [dependencies] actix = "0.13.0" diff --git a/chain/jsonrpc/client/Cargo.toml b/chain/jsonrpc/client/Cargo.toml index ff8bd08e7a9..2630b42f143 100644 --- a/chain/jsonrpc/client/Cargo.toml +++ b/chain/jsonrpc/client/Cargo.toml @@ -1,11 +1,11 @@ [package] name = "near-jsonrpc-client" version = "0.0.0" -authors = ["Near Inc "] +authors.workspace = true publish = false # Please update rust-toolchain.toml as well when changing version here: -rust-version = "1.64.0" -edition = "2021" +rust-version.workspace = true +edition.workspace = true [dependencies] awc = "3.0.0" diff --git a/chain/jsonrpc/fuzz/Cargo.toml b/chain/jsonrpc/fuzz/Cargo.toml index 0c22049c7f3..c81833898c4 100644 --- a/chain/jsonrpc/fuzz/Cargo.toml +++ b/chain/jsonrpc/fuzz/Cargo.toml @@ -1,11 +1,11 @@ [package] name = "near-jsonrpc-fuzz" version = "0.0.0" -authors = ["Near Inc "] +authors.workspace = true publish = false # Please update rust-toolchain.toml as well when changing version here: -rust-version = "1.64.0" -edition = "2021" +rust-version.workspace = true +edition.workspace = true [package.metadata] cargo-fuzz = true diff --git a/chain/jsonrpc/jsonrpc-tests/Cargo.toml b/chain/jsonrpc/jsonrpc-tests/Cargo.toml index b1dd2c99614..54b83e227d0 100644 --- a/chain/jsonrpc/jsonrpc-tests/Cargo.toml +++ b/chain/jsonrpc/jsonrpc-tests/Cargo.toml @@ -1,11 +1,11 @@ [package] name = "near-jsonrpc-tests" version = "0.0.0" -authors = ["Near Inc "] +authors.workspace = true publish = false # Please update rust-toolchain.toml as well when changing version here: -rust-version = "1.64.0" -edition = "2021" +rust-version.workspace = true +edition.workspace = true [dependencies] actix = "0.13.0" diff --git a/chain/network-primitives/Cargo.toml b/chain/network-primitives/Cargo.toml index 725efaa4440..8ddeb725338 100644 --- a/chain/network-primitives/Cargo.toml +++ b/chain/network-primitives/Cargo.toml @@ -1,10 +1,10 @@ [package] name = "near-network-primitives" version = "0.0.0" -authors = ["Near Inc "] -edition = "2021" +authors.workspace = true +edition.workspace = true # Please update rust-toolchain.toml as well when changing version here: -rust-version = "1.64.0" +rust-version.workspace = true description = "This crate hosts NEAR network-related primitive types" repository = "https://github.com/near/nearcore" license = "MIT OR Apache-2.0" diff --git a/chain/network/Cargo.toml b/chain/network/Cargo.toml index b9810ecedb0..20b8a3b990a 100644 --- a/chain/network/Cargo.toml +++ b/chain/network/Cargo.toml @@ -1,10 +1,10 @@ [package] name = "near-network" version = "0.0.0" -authors = ["Near Inc "] -edition = "2021" +authors.workspace = true +edition.workspace = true # Please update rust-toolchain.toml as well when changing version here: -rust-version = "1.64.0" +rust-version.workspace = true publish = false [build-dependencies] diff --git a/chain/pool/Cargo.toml b/chain/pool/Cargo.toml index 8db9d2d237e..2a606c371da 100644 --- a/chain/pool/Cargo.toml +++ b/chain/pool/Cargo.toml @@ -2,11 +2,11 @@ name = "near-pool" version = "0.0.0" license = "MIT OR Apache-2.0" -authors = ["Near Inc "] +authors.workspace = true publish = false # Please update rust-toolchain.toml as well when changing version here: -rust-version = "1.64.0" -edition = "2021" +rust-version.workspace = true +edition.workspace = true [dependencies] borsh = "0.9" diff --git a/chain/rosetta-rpc/Cargo.toml b/chain/rosetta-rpc/Cargo.toml index 56ab93d06e5..d400268a557 100644 --- a/chain/rosetta-rpc/Cargo.toml +++ b/chain/rosetta-rpc/Cargo.toml @@ -1,11 +1,11 @@ [package] name = "near-rosetta-rpc" version = "0.0.0" -authors = ["Near Inc "] +authors.workspace = true publish = false # Please update rust-toolchain.toml as well when changing version here: -rust-version = "1.64.0" -edition = "2021" +rust-version.workspace = true +edition.workspace = true # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/chain/telemetry/Cargo.toml b/chain/telemetry/Cargo.toml index 9c606ca9c86..36906354a10 100644 --- a/chain/telemetry/Cargo.toml +++ b/chain/telemetry/Cargo.toml @@ -1,11 +1,11 @@ [package] name = "near-telemetry" version = "0.0.0" -authors = ["Near Inc "] +authors.workspace = true publish = false # Please update rust-toolchain.toml as well when changing version here: -rust-version = "1.64.0" -edition = "2021" +rust-version.workspace = true +edition.workspace = true [dependencies] actix = "0.13.0" diff --git a/core/account-id/Cargo.toml b/core/account-id/Cargo.toml index c5cbc66d755..867b88fa401 100644 --- a/core/account-id/Cargo.toml +++ b/core/account-id/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "near-account-id" version = "0.0.0" -authors = ["Near Inc "] +authors.workspace = true publish = true # This crate is published to crates.io with a semver API. Care must be taken # when updaing its rust-version. diff --git a/core/account-id/fuzz/Cargo.toml b/core/account-id/fuzz/Cargo.toml index 51a206135d3..424cd1508c6 100644 --- a/core/account-id/fuzz/Cargo.toml +++ b/core/account-id/fuzz/Cargo.toml @@ -2,11 +2,11 @@ [package] name = "near-account-id-fuzz" version = "0.0.0" -authors = ["Near Inc "] +authors.workspace = true publish = false # Please update rust-toolchain.toml as well when changing version here: -rust-version = "1.64.0" -edition = "2021" +rust-version.workspace = true +edition.workspace = true [package.metadata] cargo-fuzz = true diff --git a/core/chain-configs/Cargo.toml b/core/chain-configs/Cargo.toml index a24a6253a2a..1d32f8cd903 100644 --- a/core/chain-configs/Cargo.toml +++ b/core/chain-configs/Cargo.toml @@ -1,11 +1,11 @@ [package] name = "near-chain-configs" version = "0.0.0" -authors = ["Near Inc "] +authors.workspace = true publish = true # Please update rust-toolchain.toml as well when changing version here: -rust-version = "1.64.0" -edition = "2021" +rust-version.workspace = true +edition.workspace = true license = "MIT OR Apache-2.0" repository = "https://github.com/near/nearcore" description = "This crate provides typed interfaces to the NEAR Genesis and Chain Configs" diff --git a/core/crypto/Cargo.toml b/core/crypto/Cargo.toml index b6024cc1fa0..bac3c84deac 100644 --- a/core/crypto/Cargo.toml +++ b/core/crypto/Cargo.toml @@ -2,11 +2,11 @@ name = "near-crypto" version = "0.0.0" license = "MIT OR Apache-2.0" -authors = ["Near Inc "] +authors.workspace = true publish = true # Please update rust-toolchain.toml as well when changing version here: -rust-version = "1.64.0" -edition = "2021" +rust-version.workspace = true +edition.workspace = true repository = "https://github.com/near/nearcore" description = "This is an internal crate for common cryptographic types" diff --git a/core/o11y/Cargo.toml b/core/o11y/Cargo.toml index 5c23aecaf64..4dc54674316 100644 --- a/core/o11y/Cargo.toml +++ b/core/o11y/Cargo.toml @@ -1,12 +1,12 @@ [package] name = "near-o11y" version = "0.0.0" -authors = ["Near Inc "] +authors.workspace = true description = "Observability helpers for the near codebase" -edition = "2021" +edition.workspace = true publish = false readme = "README.md" -rust-version = "1.64.0" +rust-version.workspace = true [dependencies] atty = "0.2" diff --git a/core/primitives-core/Cargo.toml b/core/primitives-core/Cargo.toml index 754ab9e3f7e..bd6103927b8 100644 --- a/core/primitives-core/Cargo.toml +++ b/core/primitives-core/Cargo.toml @@ -1,11 +1,11 @@ [package] name = "near-primitives-core" version = "0.0.0" -authors = ["Near Inc "] +authors.workspace = true publish = true # Please update rust-toolchain.toml as well when changing version here: -rust-version = "1.64.0" -edition = "2021" +rust-version.workspace = true +edition.workspace = true license = "MIT OR Apache-2.0" repository = "https://github.com/near/nearcore" description = """ diff --git a/core/primitives/Cargo.toml b/core/primitives/Cargo.toml index af6903145b6..e2556de555a 100644 --- a/core/primitives/Cargo.toml +++ b/core/primitives/Cargo.toml @@ -1,11 +1,11 @@ [package] name = "near-primitives" version = "0.0.0" -authors = ["Near Inc "] +authors.workspace = true publish = true # Please update rust-toolchain.toml as well when changing version here: -rust-version = "1.64.0" -edition = "2021" +rust-version.workspace = true +edition.workspace = true license = "MIT OR Apache-2.0" repository = "https://github.com/near/nearcore" description = """ diff --git a/core/store/Cargo.toml b/core/store/Cargo.toml index 6821b0178b0..634d9dbe411 100644 --- a/core/store/Cargo.toml +++ b/core/store/Cargo.toml @@ -2,11 +2,11 @@ name = "near-store" version = "0.0.0" license = "MIT OR Apache-2.0" -authors = ["Near Inc "] +authors.workspace = true publish = false # Please update rust-toolchain.toml as well when changing version here: -rust-version = "1.64.0" -edition = "2021" +rust-version.workspace = true +edition.workspace = true [dependencies] anyhow = "1.0.62" diff --git a/genesis-tools/genesis-csv-to-json/Cargo.toml b/genesis-tools/genesis-csv-to-json/Cargo.toml index 7423ac9c3e4..7fc1f141920 100644 --- a/genesis-tools/genesis-csv-to-json/Cargo.toml +++ b/genesis-tools/genesis-csv-to-json/Cargo.toml @@ -1,11 +1,11 @@ [package] name = "genesis-csv-to-json" version = "0.0.0" -authors = ["Near Inc "] +authors.workspace = true publish = false # Please update rust-toolchain.toml as well when changing version here: -rust-version = "1.64.0" -edition = "2021" +rust-version.workspace = true +edition.workspace = true [dependencies] chrono = "0.4.7" diff --git a/genesis-tools/genesis-populate/Cargo.toml b/genesis-tools/genesis-populate/Cargo.toml index fb3bd33f53f..274b2da464c 100644 --- a/genesis-tools/genesis-populate/Cargo.toml +++ b/genesis-tools/genesis-populate/Cargo.toml @@ -1,11 +1,11 @@ [package] name = "genesis-populate" version = "0.0.0" -authors = ["Near Inc "] +authors.workspace = true publish = false # Please update rust-toolchain.toml as well when changing version here: -rust-version = "1.64.0" -edition = "2021" +rust-version.workspace = true +edition.workspace = true [dependencies] borsh = "0.9" diff --git a/genesis-tools/keypair-generator/Cargo.toml b/genesis-tools/keypair-generator/Cargo.toml index d0210e930ff..3be8fee10a9 100644 --- a/genesis-tools/keypair-generator/Cargo.toml +++ b/genesis-tools/keypair-generator/Cargo.toml @@ -1,11 +1,11 @@ [package] name = "keypair-generator" version = "0.0.0" -authors = ["Near Inc "] +authors.workspace = true publish = false # Please update rust-toolchain.toml as well when changing version here: -rust-version = "1.64.0" -edition = "2021" +rust-version.workspace = true +edition.workspace = true [dependencies] clap = { version = "3.1.6", features = ["derive"] } diff --git a/integration-tests/Cargo.toml b/integration-tests/Cargo.toml index 6aff950b171..3419d7f01f2 100644 --- a/integration-tests/Cargo.toml +++ b/integration-tests/Cargo.toml @@ -1,11 +1,11 @@ [package] name = "integration-tests" version = "0.0.0" -authors = ["Near Inc "] +authors.workspace = true publish = false # Please update rust-toolchain.toml as well when changing version here: -rust-version = "1.64.0" -edition = "2021" +rust-version.workspace = true +edition.workspace = true [dependencies] actix = "0.13.0" diff --git a/nearcore/Cargo.toml b/nearcore/Cargo.toml index 8f9813c7cd1..ac9f0937df1 100644 --- a/nearcore/Cargo.toml +++ b/nearcore/Cargo.toml @@ -1,11 +1,11 @@ [package] name = "nearcore" version = "0.0.0" -authors = ["Near Inc "] +authors.workspace = true publish = false # Please update rust-toolchain.toml as well when changing version here: -rust-version = "1.64.0" -edition = "2021" +rust-version.workspace = true +edition.workspace = true [dependencies] anyhow = "1.0.51" diff --git a/neard/Cargo.toml b/neard/Cargo.toml index 9d4853ce092..d048d0c51e9 100644 --- a/neard/Cargo.toml +++ b/neard/Cargo.toml @@ -1,11 +1,11 @@ [package] name = "neard" version = "0.0.0" -authors = ["Near Inc "] +authors.workspace = true publish = false # Please update rust-toolchain.toml as well when changing version here: -rust-version = "1.64.0" -edition = "2021" +rust-version.workspace = true +edition.workspace = true default-run = "neard" [[bin]] diff --git a/runtime/near-vm-errors/Cargo.toml b/runtime/near-vm-errors/Cargo.toml index 311046c16aa..cc8a1b71896 100644 --- a/runtime/near-vm-errors/Cargo.toml +++ b/runtime/near-vm-errors/Cargo.toml @@ -1,11 +1,11 @@ [package] name = "near-vm-errors" version = "0.0.0" -authors = ["Near Inc "] +authors.workspace = true publish = true # Please update rust-toolchain.toml as well when changing version here: -rust-version = "1.64.0" -edition = "2021" +rust-version.workspace = true +edition.workspace = true license = "MIT OR Apache-2.0" readme = "README.md" categories = ["wasm"] diff --git a/runtime/near-vm-logic/Cargo.toml b/runtime/near-vm-logic/Cargo.toml index 9cf6e08bf64..bd26345231c 100644 --- a/runtime/near-vm-logic/Cargo.toml +++ b/runtime/near-vm-logic/Cargo.toml @@ -1,11 +1,11 @@ [package] name = "near-vm-logic" version = "0.0.0" -authors = ["Near Inc "] +authors.workspace = true publish = true # Please update rust-toolchain.toml as well when changing version here: -rust-version = "1.64.0" -edition = "2021" +rust-version.workspace = true +edition.workspace = true license = "MIT OR Apache-2.0" readme = "README.md" categories = ["wasm"] diff --git a/runtime/near-vm-runner/Cargo.toml b/runtime/near-vm-runner/Cargo.toml index 305b06252a3..ab27625eb49 100644 --- a/runtime/near-vm-runner/Cargo.toml +++ b/runtime/near-vm-runner/Cargo.toml @@ -1,11 +1,11 @@ [package] name = "near-vm-runner" version = "0.0.0" -authors = ["Near Inc "] +authors.workspace = true publish = false # Please update rust-toolchain.toml as well when changing version here: -rust-version = "1.64.0" -edition = "2021" +rust-version.workspace = true +edition.workspace = true license = "MIT OR Apache-2.0" readme = "README.md" categories = ["wasm"] diff --git a/runtime/near-vm-runner/fuzz/Cargo.toml b/runtime/near-vm-runner/fuzz/Cargo.toml index 83e7fad0f84..0c0e5c2afb2 100644 --- a/runtime/near-vm-runner/fuzz/Cargo.toml +++ b/runtime/near-vm-runner/fuzz/Cargo.toml @@ -1,11 +1,11 @@ [package] name = "near-vm-runner-fuzz" version = "0.0.0" -authors = ["Near Inc "] +authors.workspace = true publish = false # Please update rust-toolchain.toml as well when changing version here: -rust-version = "1.64.0" -edition = "2021" +rust-version.workspace = true +edition.workspace = true [package.metadata] cargo-fuzz = true diff --git a/runtime/runtime-params-estimator/Cargo.toml b/runtime/runtime-params-estimator/Cargo.toml index 1c8c395c960..6ba056751b2 100644 --- a/runtime/runtime-params-estimator/Cargo.toml +++ b/runtime/runtime-params-estimator/Cargo.toml @@ -1,11 +1,11 @@ [package] name = "runtime-params-estimator" version = "0.0.0" -authors = ["Near Inc "] +authors.workspace = true publish = false # Please update rust-toolchain.toml as well when changing version here: -rust-version = "1.64.0" -edition = "2021" +rust-version.workspace = true +edition.workspace = true [[bin]] name = "runtime-params-estimator" diff --git a/runtime/runtime-params-estimator/estimator-warehouse/Cargo.toml b/runtime/runtime-params-estimator/estimator-warehouse/Cargo.toml index d53d867e62e..57bc05c78ab 100644 --- a/runtime/runtime-params-estimator/estimator-warehouse/Cargo.toml +++ b/runtime/runtime-params-estimator/estimator-warehouse/Cargo.toml @@ -1,11 +1,11 @@ [package] -authors = ["Near Inc "] +authors.workspace = true name = "estimator-warehouse" version = "0.0.0" publish = false # Please update rust-toolchain.toml as well when changing version here: -rust-version = "1.64.0" -edition = "2021" +rust-version.workspace = true +edition.workspace = true [dependencies] anyhow = "1.0.56" diff --git a/runtime/runtime/Cargo.toml b/runtime/runtime/Cargo.toml index be5c0715b19..c0fab9b60b9 100644 --- a/runtime/runtime/Cargo.toml +++ b/runtime/runtime/Cargo.toml @@ -2,11 +2,11 @@ name = "node-runtime" version = "0.0.0" license = "MIT OR Apache-2.0" -authors = ["Near Inc "] +authors.workspace = true publish = false # Please update rust-toolchain.toml as well when changing version here: -rust-version = "1.64.0" -edition = "2021" +rust-version.workspace = true +edition.workspace = true [dependencies] byteorder = "1.2" diff --git a/test-utils/actix-test-utils/Cargo.toml b/test-utils/actix-test-utils/Cargo.toml index 8fd47568cae..5ee3f132577 100644 --- a/test-utils/actix-test-utils/Cargo.toml +++ b/test-utils/actix-test-utils/Cargo.toml @@ -1,11 +1,11 @@ [package] name = "near-actix-test-utils" version = "0.0.0" -authors = ["Near Inc "] +authors.workspace = true publish = false # Please update rust-toolchain.toml as well when changing version here: -rust-version = "1.64.0" -edition = "2021" +rust-version.workspace = true +edition.workspace = true [dependencies] actix-rt = "2" diff --git a/test-utils/logger/Cargo.toml b/test-utils/logger/Cargo.toml index 655419bb87b..32fb6fb6afb 100644 --- a/test-utils/logger/Cargo.toml +++ b/test-utils/logger/Cargo.toml @@ -1,11 +1,11 @@ [package] name = "near-logger-utils" version = "0.0.0" -authors = ["Near Inc "] +authors.workspace = true publish = false # Please update rust-toolchain.toml as well when changing version here: -rust-version = "1.64.0" -edition = "2021" +rust-version.workspace = true +edition.workspace = true [dependencies] tracing = "0.1.13" diff --git a/test-utils/runtime-tester/Cargo.toml b/test-utils/runtime-tester/Cargo.toml index d551616020d..d65ce3f8ef7 100644 --- a/test-utils/runtime-tester/Cargo.toml +++ b/test-utils/runtime-tester/Cargo.toml @@ -1,11 +1,11 @@ [package] name = "runtime-tester" version = "0.0.0" -authors = ["Near Inc "] +authors.workspace = true publish = false # Please update rust-toolchain.toml as well when changing version here: -rust-version = "1.64.0" -edition = "2021" +rust-version.workspace = true +edition.workspace = true [dependencies] byteorder = "1.2" diff --git a/test-utils/runtime-tester/fuzz/Cargo.toml b/test-utils/runtime-tester/fuzz/Cargo.toml index 25bedfc26b9..053c059ec79 100644 --- a/test-utils/runtime-tester/fuzz/Cargo.toml +++ b/test-utils/runtime-tester/fuzz/Cargo.toml @@ -1,11 +1,11 @@ [package] name = "runtime-tester-fuzz" version = "0.0.0" -authors = ["Near Inc "] +authors.workspace = true publish = false # Please update rust-toolchain.toml as well when changing version here: -rust-version = "1.64.0" -edition = "2021" +rust-version.workspace = true +edition.workspace = true [package.metadata] cargo-fuzz = true diff --git a/test-utils/store-validator/Cargo.toml b/test-utils/store-validator/Cargo.toml index 7e170ba37c8..03871177f36 100644 --- a/test-utils/store-validator/Cargo.toml +++ b/test-utils/store-validator/Cargo.toml @@ -1,11 +1,11 @@ [package] name = "store-validator" version = "0.0.0" -authors = ["Near Inc "] +authors.workspace = true publish = false # Please update rust-toolchain.toml as well when changing version here: -rust-version = "1.64.0" -edition = "2021" +rust-version.workspace = true +edition.workspace = true [dependencies] ansi_term = "0.12" diff --git a/test-utils/testlib/Cargo.toml b/test-utils/testlib/Cargo.toml index 5190abf978f..97d10cfb574 100644 --- a/test-utils/testlib/Cargo.toml +++ b/test-utils/testlib/Cargo.toml @@ -1,11 +1,11 @@ [package] name = "testlib" version = "0.0.0" -authors = ["Near Inc "] +authors.workspace = true publish = false # Please update rust-toolchain.toml as well when changing version here: -rust-version = "1.64.0" -edition = "2021" +rust-version.workspace = true +edition.workspace = true [dependencies] byteorder = "1.2" diff --git a/tools/chainsync-loadtest/Cargo.toml b/tools/chainsync-loadtest/Cargo.toml index 26b500adef5..da6d1ba5a05 100644 --- a/tools/chainsync-loadtest/Cargo.toml +++ b/tools/chainsync-loadtest/Cargo.toml @@ -1,11 +1,11 @@ [package] name = "chainsync-loadtest" version = "0.0.0" -authors = ["Near Inc "] +authors.workspace = true publish = false # Please update rust-toolchain.toml as well when changing version here: -rust-version = "1.64.0" -edition = "2021" +rust-version.workspace = true +edition.workspace = true default-run = "chainsync-loadtest" [[bin]] diff --git a/tools/delay-detector/Cargo.toml b/tools/delay-detector/Cargo.toml index 3014f33d00d..f388f973d58 100644 --- a/tools/delay-detector/Cargo.toml +++ b/tools/delay-detector/Cargo.toml @@ -1,11 +1,11 @@ [package] name = "delay-detector" version = "0.0.0" -authors = ["Near Inc "] +authors.workspace = true publish = false # Please update rust-toolchain.toml as well when changing version here: -rust-version = "1.64.0" -edition = "2021" +rust-version.workspace = true +edition.workspace = true [dependencies] tracing = "0.1.13" diff --git a/tools/indexer/example/Cargo.toml b/tools/indexer/example/Cargo.toml index 4d8441f57b8..4553a6333a5 100644 --- a/tools/indexer/example/Cargo.toml +++ b/tools/indexer/example/Cargo.toml @@ -1,11 +1,11 @@ [package] name = "indexer-example" version = "0.0.0" -authors = ["Near Inc "] +authors.workspace = true publish = false # Please update rust-toolchain.toml as well when changing version here: -rust-version = "1.64.0" -edition = "2021" +rust-version.workspace = true +edition.workspace = true [dependencies] actix = "0.13.0" diff --git a/tools/mock-node/Cargo.toml b/tools/mock-node/Cargo.toml index 83b98ee8e5f..24659cb1f0b 100644 --- a/tools/mock-node/Cargo.toml +++ b/tools/mock-node/Cargo.toml @@ -1,11 +1,11 @@ [package] name = "mock-node" version = "0.0.0" -authors = ["Near Inc "] +authors.workspace = true publish = false # Please update rust-toolchain.toml as well when changing version here: -rust-version = "1.64.0" -edition = "2021" +rust-version.workspace = true +edition.workspace = true [dependencies] actix = "0.13.0" diff --git a/tools/restaked/Cargo.toml b/tools/restaked/Cargo.toml index 51ef864f1e5..a64957d47a2 100644 --- a/tools/restaked/Cargo.toml +++ b/tools/restaked/Cargo.toml @@ -1,11 +1,11 @@ [package] name = "restaked" version = "0.0.0" -authors = ["Near Inc "] +authors.workspace = true publish = false # Please update rust-toolchain.toml as well when changing version here: -rust-version = "1.64.0" -edition = "2021" +rust-version.workspace = true +edition.workspace = true [dependencies] clap = { version = "3.1.6", features = ["derive"] } diff --git a/tools/rpctypegen/core/Cargo.toml b/tools/rpctypegen/core/Cargo.toml index 5121924c5c0..1c132a6f8f5 100644 --- a/tools/rpctypegen/core/Cargo.toml +++ b/tools/rpctypegen/core/Cargo.toml @@ -1,11 +1,11 @@ [package] name = "near-rpc-error-core" version = "0.0.0" -authors = ["Near Inc "] +authors.workspace = true publish = true # Please update rust-toolchain.toml as well when changing version here: -rust-version = "1.64.0" -edition = "2021" +rust-version.workspace = true +edition.workspace = true license = "MIT OR Apache-2.0" repository = "https://github.com/near/nearcore" description = """ diff --git a/tools/rpctypegen/macro/Cargo.toml b/tools/rpctypegen/macro/Cargo.toml index d00b698509c..c559f3812e4 100644 --- a/tools/rpctypegen/macro/Cargo.toml +++ b/tools/rpctypegen/macro/Cargo.toml @@ -1,11 +1,11 @@ [package] name = "near-rpc-error-macro" version = "0.0.0" -authors = ["Near Inc "] +authors.workspace = true publish = true # Please update rust-toolchain.toml as well when changing version here: -rust-version = "1.64.0" -edition = "2021" +rust-version.workspace = true +edition.workspace = true license = "MIT OR Apache-2.0" repository = "https://github.com/near/nearcore" description = """ diff --git a/tools/state-viewer/Cargo.toml b/tools/state-viewer/Cargo.toml index c05ce4ad7da..fe38d264795 100644 --- a/tools/state-viewer/Cargo.toml +++ b/tools/state-viewer/Cargo.toml @@ -1,11 +1,11 @@ [package] name = "state-viewer" version = "0.0.0" -authors = ["Near Inc "] +authors.workspace = true publish = false # Please update rust-toolchain.toml as well when changing version here: -rust-version = "1.64.0" -edition = "2021" +rust-version.workspace = true +edition.workspace = true [dependencies] ansi_term = "0.12" diff --git a/tools/storage-usage-delta-calculator/Cargo.toml b/tools/storage-usage-delta-calculator/Cargo.toml index dcb3657c90a..14eaea6ec47 100644 --- a/tools/storage-usage-delta-calculator/Cargo.toml +++ b/tools/storage-usage-delta-calculator/Cargo.toml @@ -1,11 +1,11 @@ [package] name = "storage-usage-delta-calculator" version = "0.0.0" -authors = ["Near Inc ", "Egor Kulikov "] +authors.workspace = true publish = false # Please update rust-toolchain.toml as well when changing version here: -rust-version = "1.64.0" -edition = "2021" +rust-version.workspace = true +edition.workspace = true # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/tools/themis/Cargo.toml b/tools/themis/Cargo.toml index 3cf12d1f1ce..05d95020a22 100644 --- a/tools/themis/Cargo.toml +++ b/tools/themis/Cargo.toml @@ -1,9 +1,9 @@ [package] name = "themis" version = "0.0.0" -authors = ["Near Inc ", "Miraculous Owonubi "] -edition = "2021" -rust-version = "1.64.0" +authors.workspace = true +edition.workspace = true +rust-version.workspace = true publish = false license = "MIT OR Apache-2.0" description = "https://en.wikipedia.org/wiki/Themis" diff --git a/tools/themis/src/rules.rs b/tools/themis/src/rules.rs index 5c9fa10efcb..4c16e3e1774 100644 --- a/tools/themis/src/rules.rs +++ b/tools/themis/src/rules.rs @@ -30,7 +30,7 @@ pub fn has_rust_version(workspace: &Workspace) -> anyhow::Result<()> { let outliers: Vec<_> = workspace .members .iter() - .filter(|pkg| pkg.raw["package"].get("rust-version").is_none()) + .filter(|pkg| pkg.parsed.rust_version.is_none()) .map(|pkg| Outlier { path: pkg.parsed.manifest_path.clone(), found: None }) .collect(); @@ -95,20 +95,19 @@ pub fn has_debuggable_rust_version(workspace: &Workspace) -> anyhow::Result<()> let mut outliers = vec![]; for pkg in &workspace.members { - let (rust_version, raw) = match pkg.raw["package"].get("rust-version") { + match &pkg.parsed.rust_version { Some(rust_version) => { - let raw = rust_version.as_str().unwrap(); - (semver::VersionReq::parse(raw)?, raw) + if !rust_version.matches(&rust_toolchain) { + outliers.push(Outlier { + path: pkg.parsed.manifest_path.clone(), + found: Some(format!("{}", rust_version)), + }); + } + } + None => { + // we can skip, since we have has_rust_version check + continue; } - // we can skip, since we have has_rust_version check - None => continue, - }; - - if !rust_version.matches(&rust_toolchain) { - outliers.push(Outlier { - path: pkg.parsed.manifest_path.clone(), - found: Some(raw.to_owned()), - }); } } diff --git a/utils/mainnet-res/Cargo.toml b/utils/mainnet-res/Cargo.toml index efe65e24f39..dc1d20444a6 100644 --- a/utils/mainnet-res/Cargo.toml +++ b/utils/mainnet-res/Cargo.toml @@ -1,10 +1,10 @@ [package] name = "near-mainnet-res" version = "0.0.0" -authors = ["Near Inc "] -edition = "2021" +authors.workspace = true +edition.workspace = true # Please update rust-toolchain.toml as well when changing version here: -rust-version = "1.64.0" +rust-version.workspace = true publish = false # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/utils/near-cache/Cargo.toml b/utils/near-cache/Cargo.toml index bbbddc1dc3d..25d9749e754 100644 --- a/utils/near-cache/Cargo.toml +++ b/utils/near-cache/Cargo.toml @@ -1,10 +1,10 @@ [package] name = "near-cache" version = "0.0.0" -authors = ["Near Inc "] -edition = "2021" +authors.workspace = true +edition.workspace = true # Please update rust-toolchain.toml as well when changing version here: -rust-version = "1.64.0" +rust-version.workspace = true publish = false [dependencies] diff --git a/utils/near-performance-metrics-macros/Cargo.toml b/utils/near-performance-metrics-macros/Cargo.toml index 05051201af3..56b97b464c8 100644 --- a/utils/near-performance-metrics-macros/Cargo.toml +++ b/utils/near-performance-metrics-macros/Cargo.toml @@ -1,10 +1,10 @@ [package] name = "near-performance-metrics-macros" version = "0.0.0" -authors = ["Near Inc "] -edition = "2021" +authors.workspace = true +edition.workspace = true # Please update rust-toolchain.toml as well when changing version here: -rust-version = "1.64.0" +rust-version.workspace = true publish = false [dependencies] diff --git a/utils/near-performance-metrics/Cargo.toml b/utils/near-performance-metrics/Cargo.toml index 71dc4ec4625..f8ddb391849 100644 --- a/utils/near-performance-metrics/Cargo.toml +++ b/utils/near-performance-metrics/Cargo.toml @@ -1,10 +1,10 @@ [package] name = "near-performance-metrics" version = "0.0.0" -authors = ["Near Inc "] -edition = "2021" +authors.workspace = true +edition.workspace = true # Please update rust-toolchain.toml as well when changing version here: -rust-version = "1.64.0" +rust-version.workspace = true publish = false [dependencies] diff --git a/utils/near-stable-hasher/Cargo.toml b/utils/near-stable-hasher/Cargo.toml index 0d6bb783b4a..1d645a0f294 100644 --- a/utils/near-stable-hasher/Cargo.toml +++ b/utils/near-stable-hasher/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "near-stable-hasher" version = "0.0.0" -authors = ["Near Inc "] -edition = "2021" +authors.workspace = true +edition.workspace = true # Please update rust-toolchain.toml as well when changing version here: -rust-version = "1.64.0" +rust-version.workspace = true publish = false