From ee6db142c75202703058125724d5804816087120 Mon Sep 17 00:00:00 2001 From: StackOverflowExcept1on <109800286+StackOverflowExcept1on@users.noreply.github.com> Date: Wed, 7 Aug 2024 20:25:51 +0300 Subject: [PATCH 1/3] fix(workspace): specify minimum rust version for published crates --- Cargo.toml | 1 + common/Cargo.toml | 1 + common/codegen/Cargo.toml | 1 + common/numerated/Cargo.toml | 1 + core-errors/Cargo.toml | 1 + core-processor/Cargo.toml | 1 + core/Cargo.toml | 1 + galloc/Cargo.toml | 1 + gcli/Cargo.toml | 1 + gclient/Cargo.toml | 1 + gcore/Cargo.toml | 1 + gmeta/Cargo.toml | 1 + gmeta/codegen/Cargo.toml | 1 + gprimitives/Cargo.toml | 1 + gsdk/Cargo.toml | 1 + gsdk/codegen/Cargo.toml | 1 + gstd/Cargo.toml | 3 +-- gstd/codegen/Cargo.toml | 1 + gsys/Cargo.toml | 1 + gtest/Cargo.toml | 3 +++ lazy-pages/Cargo.toml | 1 + lazy-pages/common/Cargo.toml | 1 + lazy-pages/native-interface/Cargo.toml | 1 + runtime-interface/sandbox/Cargo.toml | 1 + runtime/primitives/Cargo.toml | 1 + sandbox/env/Cargo.toml | 1 + sandbox/host/Cargo.toml | 3 ++- sandbox/sandbox/Cargo.toml | 3 ++- stack-buffer/Cargo.toml | 1 + utils/actor-system-error/Cargo.toml | 1 + utils/cargo-gbuild/Cargo.toml | 1 + utils/gring/Cargo.toml | 1 + utils/node-wrapper/Cargo.toml | 1 + utils/ss58/Cargo.toml | 1 + utils/utils/Cargo.toml | 1 + utils/wasm-builder/Cargo.toml | 1 + utils/wasm-instrument/Cargo.toml | 1 + 37 files changed, 41 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index c471c1267aa..bdd141d536b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,6 +5,7 @@ edition = "2021" license = "GPL-3.0" homepage = "https://gear-tech.io" repository = "https://github.com/gear-tech/gear" +rust-version = "1.80" [workspace] resolver = "2" diff --git a/common/Cargo.toml b/common/Cargo.toml index 4691f272de2..7c3c5e7bab6 100644 --- a/common/Cargo.toml +++ b/common/Cargo.toml @@ -10,6 +10,7 @@ edition.workspace = true license.workspace = true homepage.workspace = true repository.workspace = true +rust-version.workspace = true [dependencies] primitive-types = { workspace = true, features = ["scale-info"] } diff --git a/common/codegen/Cargo.toml b/common/codegen/Cargo.toml index 8dbbfb0f60c..ec418034cbc 100644 --- a/common/codegen/Cargo.toml +++ b/common/codegen/Cargo.toml @@ -10,6 +10,7 @@ edition.workspace = true license.workspace = true homepage.workspace = true repository.workspace = true +rust-version.workspace = true [lib] proc-macro = true diff --git a/common/numerated/Cargo.toml b/common/numerated/Cargo.toml index fc73db8e69d..2ac8ded3f80 100644 --- a/common/numerated/Cargo.toml +++ b/common/numerated/Cargo.toml @@ -10,6 +10,7 @@ edition.workspace = true license.workspace = true homepage.workspace = true repository.workspace = true +rust-version.workspace = true [dependencies] num-traits.workspace = true diff --git a/core-errors/Cargo.toml b/core-errors/Cargo.toml index 04a7baeda06..104ead8b1c6 100644 --- a/core-errors/Cargo.toml +++ b/core-errors/Cargo.toml @@ -8,6 +8,7 @@ edition.workspace = true license.workspace = true homepage.workspace = true repository.workspace = true +rust-version.workspace = true [dependencies] scale-info = { workspace = true, features = ["derive"], optional = true } diff --git a/core-processor/Cargo.toml b/core-processor/Cargo.toml index 312f5576e87..5523aacc068 100644 --- a/core-processor/Cargo.toml +++ b/core-processor/Cargo.toml @@ -10,6 +10,7 @@ edition.workspace = true license.workspace = true homepage.workspace = true repository.workspace = true +rust-version.workspace = true [dependencies] gear-core.workspace = true diff --git a/core/Cargo.toml b/core/Cargo.toml index e4adcb206af..b7cb0fce16e 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -10,6 +10,7 @@ edition.workspace = true license.workspace = true homepage.workspace = true repository.workspace = true +rust-version.workspace = true [dependencies] gear-core-errors = { workspace = true, features = ["codec"] } diff --git a/galloc/Cargo.toml b/galloc/Cargo.toml index 0b85eef34cb..ef4a469f7c9 100644 --- a/galloc/Cargo.toml +++ b/galloc/Cargo.toml @@ -7,6 +7,7 @@ version.workspace = true authors.workspace = true edition.workspace = true license.workspace = true +rust-version.workspace = true [dependencies] # add "checks" feature to enable hard checks in allocator diff --git a/gcli/Cargo.toml b/gcli/Cargo.toml index f65dff58da6..d399ecd8d9a 100644 --- a/gcli/Cargo.toml +++ b/gcli/Cargo.toml @@ -10,6 +10,7 @@ edition.workspace = true license.workspace = true homepage.workspace = true repository.workspace = true +rust-version.workspace = true [dependencies] gsdk.workspace = true diff --git a/gclient/Cargo.toml b/gclient/Cargo.toml index c348b8357ed..b0ae57fa282 100644 --- a/gclient/Cargo.toml +++ b/gclient/Cargo.toml @@ -8,6 +8,7 @@ edition.workspace = true license.workspace = true homepage.workspace = true repository.workspace = true +rust-version.workspace = true [dependencies] gear-utils.workspace = true diff --git a/gcore/Cargo.toml b/gcore/Cargo.toml index 7e8ad61790a..94a31c6fa9e 100644 --- a/gcore/Cargo.toml +++ b/gcore/Cargo.toml @@ -6,6 +6,7 @@ version.workspace = true authors.workspace = true edition.workspace = true license.workspace = true +rust-version.workspace = true [dependencies] gsys.workspace = true diff --git a/gmeta/Cargo.toml b/gmeta/Cargo.toml index d96b290754f..772c3534879 100644 --- a/gmeta/Cargo.toml +++ b/gmeta/Cargo.toml @@ -10,6 +10,7 @@ edition.workspace = true license.workspace = true homepage.workspace = true repository.workspace = true +rust-version.workspace = true [dependencies] scale-info.workspace = true diff --git a/gmeta/codegen/Cargo.toml b/gmeta/codegen/Cargo.toml index 7168e704e70..44e23058e69 100644 --- a/gmeta/codegen/Cargo.toml +++ b/gmeta/codegen/Cargo.toml @@ -10,6 +10,7 @@ edition.workspace = true license.workspace = true homepage.workspace = true repository.workspace = true +rust-version.workspace = true [lib] proc-macro = true diff --git a/gprimitives/Cargo.toml b/gprimitives/Cargo.toml index fed67998b25..2ed05cdb8e2 100644 --- a/gprimitives/Cargo.toml +++ b/gprimitives/Cargo.toml @@ -6,6 +6,7 @@ version.workspace = true authors.workspace = true edition.workspace = true license.workspace = true +rust-version.workspace = true [dependencies] derive_more.workspace = true diff --git a/gsdk/Cargo.toml b/gsdk/Cargo.toml index 41129526785..eaaed1c305e 100644 --- a/gsdk/Cargo.toml +++ b/gsdk/Cargo.toml @@ -10,6 +10,7 @@ edition.workspace = true license.workspace = true homepage.workspace = true repository.workspace = true +rust-version.workspace = true [dependencies] anyhow.workspace = true diff --git a/gsdk/codegen/Cargo.toml b/gsdk/codegen/Cargo.toml index d59a0ea6870..22a4a340f45 100644 --- a/gsdk/codegen/Cargo.toml +++ b/gsdk/codegen/Cargo.toml @@ -10,6 +10,7 @@ authors.workspace = true license.workspace = true homepage.workspace = true repository.workspace = true +rust-version.workspace = true [lib] proc-macro = true diff --git a/gstd/Cargo.toml b/gstd/Cargo.toml index dede05663de..9e2540abdc4 100644 --- a/gstd/Cargo.toml +++ b/gstd/Cargo.toml @@ -4,14 +4,13 @@ description = "Gear programs standard library" documentation = "https://docs.rs/gstd" keywords = ["gear", "std", "no-std", "wasm", "smart-contracts"] categories = ["api-bindings"] -# Stable version of Rust >=1.73 is required due to new format of panic message. -rust-version = "1.73" version.workspace = true edition.workspace = true authors.workspace = true license.workspace = true homepage.workspace = true repository.workspace = true +rust-version.workspace = true [dependencies] arrayvec = { version = "0.7.4", default-features = false, optional = true } diff --git a/gstd/codegen/Cargo.toml b/gstd/codegen/Cargo.toml index d444a9e9562..9a7afb13898 100644 --- a/gstd/codegen/Cargo.toml +++ b/gstd/codegen/Cargo.toml @@ -10,6 +10,7 @@ authors.workspace = true license.workspace = true homepage.workspace = true repository.workspace = true +rust-version.workspace = true [lib] proc-macro = true diff --git a/gsys/Cargo.toml b/gsys/Cargo.toml index ff350f5b793..3b3d82dd565 100644 --- a/gsys/Cargo.toml +++ b/gsys/Cargo.toml @@ -10,3 +10,4 @@ edition.workspace = true license.workspace = true homepage.workspace = true repository.workspace = true +rust-version.workspace = true diff --git a/gtest/Cargo.toml b/gtest/Cargo.toml index e7f482b92ee..5e67fe21afb 100644 --- a/gtest/Cargo.toml +++ b/gtest/Cargo.toml @@ -6,6 +6,9 @@ version.workspace = true authors.workspace = true edition.workspace = true license.workspace = true +homepage.workspace = true +repository.workspace = true +rust-version.workspace = true [dependencies] gear-core.workspace = true diff --git a/lazy-pages/Cargo.toml b/lazy-pages/Cargo.toml index 542b0fca6df..d0bb3f5f295 100644 --- a/lazy-pages/Cargo.toml +++ b/lazy-pages/Cargo.toml @@ -8,6 +8,7 @@ edition.workspace = true license.workspace = true homepage.workspace = true repository.workspace = true +rust-version.workspace = true [dependencies] log = { workspace = true, features = ["std"] } diff --git a/lazy-pages/common/Cargo.toml b/lazy-pages/common/Cargo.toml index fb847f199f2..7376ee5e1a9 100644 --- a/lazy-pages/common/Cargo.toml +++ b/lazy-pages/common/Cargo.toml @@ -8,6 +8,7 @@ edition.workspace = true license.workspace = true homepage.workspace = true repository.workspace = true +rust-version.workspace = true [dependencies] gear-core.workspace = true diff --git a/lazy-pages/native-interface/Cargo.toml b/lazy-pages/native-interface/Cargo.toml index ec2b874d028..d8eb3719928 100644 --- a/lazy-pages/native-interface/Cargo.toml +++ b/lazy-pages/native-interface/Cargo.toml @@ -8,6 +8,7 @@ edition.workspace = true license.workspace = true homepage.workspace = true repository.workspace = true +rust-version.workspace = true [dependencies] gear-core.workspace = true diff --git a/runtime-interface/sandbox/Cargo.toml b/runtime-interface/sandbox/Cargo.toml index 9d0e9101031..43eefeaae27 100644 --- a/runtime-interface/sandbox/Cargo.toml +++ b/runtime-interface/sandbox/Cargo.toml @@ -6,6 +6,7 @@ edition.workspace = true license.workspace = true homepage.workspace = true repository.workspace = true +rust-version.workspace = true [dependencies] sp-runtime-interface.workspace = true diff --git a/runtime/primitives/Cargo.toml b/runtime/primitives/Cargo.toml index e8b6a1a3217..7c2ecaaf375 100644 --- a/runtime/primitives/Cargo.toml +++ b/runtime/primitives/Cargo.toml @@ -8,6 +8,7 @@ edition.workspace = true license.workspace = true homepage.workspace = true repository.workspace = true +rust-version.workspace = true [package.metadata.docs.rs] targets = ["x86_64-unknown-linux-gnu"] diff --git a/sandbox/env/Cargo.toml b/sandbox/env/Cargo.toml index 2ee3e35b8c0..afe522c5930 100644 --- a/sandbox/env/Cargo.toml +++ b/sandbox/env/Cargo.toml @@ -8,6 +8,7 @@ license.workspace = true homepage.workspace = true repository.workspace = true version.workspace = true +rust-version.workspace = true [package.metadata.docs.rs] targets = ["x86_64-unknown-linux-gnu"] diff --git a/sandbox/host/Cargo.toml b/sandbox/host/Cargo.toml index bb9f6492a91..4032f55c69e 100644 --- a/sandbox/host/Cargo.toml +++ b/sandbox/host/Cargo.toml @@ -3,12 +3,13 @@ name = "gear-sandbox-host" description = "A set of common definitions that are needed for defining execution engines." documentation = "https://docs.rs/gear-sandbox-host" readme = "README.md" +version.workspace = true authors.workspace = true edition.workspace = true license.workspace = true homepage.workspace = true repository.workspace = true -version.workspace = true +rust-version.workspace = true [package.metadata.docs.rs] targets = ["x86_64-unknown-linux-gnu"] diff --git a/sandbox/sandbox/Cargo.toml b/sandbox/sandbox/Cargo.toml index e58b4199f49..90b345d6fa2 100644 --- a/sandbox/sandbox/Cargo.toml +++ b/sandbox/sandbox/Cargo.toml @@ -3,12 +3,13 @@ name = "gear-sandbox" description = "This crate provides means to instantiate and execute wasm modules." documentation = "https://docs.rs/gear-sandbox" readme = "README.md" +version.workspace = true authors.workspace = true edition.workspace = true license.workspace = true homepage.workspace = true repository.workspace = true -version.workspace = true +rust-version.workspace = true [package.metadata.docs.rs] targets = ["x86_64-unknown-linux-gnu"] diff --git a/stack-buffer/Cargo.toml b/stack-buffer/Cargo.toml index 0f261313c91..e2d6ed4e15d 100644 --- a/stack-buffer/Cargo.toml +++ b/stack-buffer/Cargo.toml @@ -6,6 +6,7 @@ version.workspace = true authors.workspace = true edition.workspace = true license.workspace = true +rust-version.workspace = true [build-dependencies] cc = { version = "1.0", optional = true } diff --git a/utils/actor-system-error/Cargo.toml b/utils/actor-system-error/Cargo.toml index 70e24eb39af..304aba7b0a7 100644 --- a/utils/actor-system-error/Cargo.toml +++ b/utils/actor-system-error/Cargo.toml @@ -8,6 +8,7 @@ authors.workspace = true license.workspace = true homepage.workspace = true repository.workspace = true +rust-version.workspace = true [dependencies] derive_more.workspace = true diff --git a/utils/cargo-gbuild/Cargo.toml b/utils/cargo-gbuild/Cargo.toml index 8343291c01a..39bfcb3f03b 100644 --- a/utils/cargo-gbuild/Cargo.toml +++ b/utils/cargo-gbuild/Cargo.toml @@ -8,6 +8,7 @@ edition.workspace = true license.workspace = true homepage.workspace = true repository.workspace = true +rust-version.workspace = true [dependencies] anyhow.workspace = true diff --git a/utils/gring/Cargo.toml b/utils/gring/Cargo.toml index 0941ef56994..6b6f898b58f 100644 --- a/utils/gring/Cargo.toml +++ b/utils/gring/Cargo.toml @@ -9,6 +9,7 @@ edition.workspace = true license.workspace = true homepage.workspace = true repository.workspace = true +rust-version.workspace = true [[bin]] name = "gring" diff --git a/utils/node-wrapper/Cargo.toml b/utils/node-wrapper/Cargo.toml index 3d1deb78db2..3e0c3873deb 100644 --- a/utils/node-wrapper/Cargo.toml +++ b/utils/node-wrapper/Cargo.toml @@ -8,6 +8,7 @@ edition.workspace = true license.workspace = true homepage.workspace = true repository.workspace = true +rust-version.workspace = true [dependencies] anyhow.workspace = true diff --git a/utils/ss58/Cargo.toml b/utils/ss58/Cargo.toml index 61642ce5cbf..5734fe20893 100644 --- a/utils/ss58/Cargo.toml +++ b/utils/ss58/Cargo.toml @@ -6,6 +6,7 @@ version.workspace = true authors.workspace = true edition.workspace = true license.workspace = true +rust-version.workspace = true [dependencies] bs58.workspace = true diff --git a/utils/utils/Cargo.toml b/utils/utils/Cargo.toml index dd7d0118ea6..dc420a738d2 100644 --- a/utils/utils/Cargo.toml +++ b/utils/utils/Cargo.toml @@ -8,6 +8,7 @@ edition.workspace = true license.workspace = true homepage.workspace = true repository.workspace = true +rust-version.workspace = true [dependencies] nonempty.workspace = true diff --git a/utils/wasm-builder/Cargo.toml b/utils/wasm-builder/Cargo.toml index 66150601706..d76b6061388 100644 --- a/utils/wasm-builder/Cargo.toml +++ b/utils/wasm-builder/Cargo.toml @@ -6,6 +6,7 @@ version.workspace = true edition.workspace = true license.workspace = true repository.workspace = true +rust-version.workspace = true include = ["build.rs", "src/**/*", "Cargo.toml", "README.md"] readme = "README.md" diff --git a/utils/wasm-instrument/Cargo.toml b/utils/wasm-instrument/Cargo.toml index 5ceaf007d30..29980941751 100644 --- a/utils/wasm-instrument/Cargo.toml +++ b/utils/wasm-instrument/Cargo.toml @@ -10,6 +10,7 @@ edition.workspace = true license.workspace = true homepage.workspace = true repository.workspace = true +rust-version.workspace = true [dependencies] gwasm-instrument = { workspace = true, features = ["sign_ext"] } From 6860447d3d5e129f63d27a37d8506f8171a97a28 Mon Sep 17 00:00:00 2001 From: StackOverflowExcept1on <109800286+StackOverflowExcept1on@users.noreply.github.com> Date: Wed, 7 Aug 2024 21:08:30 +0300 Subject: [PATCH 2/3] publish wasm-proc to crates io --- Cargo.lock | 2 +- utils/crates-io/src/lib.rs | 3 ++- utils/wasm-proc/Cargo.toml | 9 ++++++++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a7a0fc64748..101f071b3fd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -18561,7 +18561,7 @@ dependencies = [ [[package]] name = "wasm-proc" -version = "0.1.0" +version = "1.5.0" dependencies = [ "clap 4.5.9", "env_logger", diff --git a/utils/crates-io/src/lib.rs b/utils/crates-io/src/lib.rs index a869b4e2bae..f3528ab2893 100644 --- a/utils/crates-io/src/lib.rs +++ b/utils/crates-io/src/lib.rs @@ -73,7 +73,7 @@ pub const STACKED_DEPENDENCIES: [&str; 13] = [ /// NOTE: Each package in this array could possibly depend /// on the previous one, please be cautious about changing /// the order. -pub const PACKAGES: [&str; 9] = [ +pub const PACKAGES: [&str; 10] = [ "gring", "gear-wasm-builder", "gear-node-wrapper", @@ -83,6 +83,7 @@ pub const PACKAGES: [&str; 9] = [ "gsdk", "gclient", "gcli", + "wasm-proc", ]; /// Alias for packages. diff --git a/utils/wasm-proc/Cargo.toml b/utils/wasm-proc/Cargo.toml index 0464900fc18..66dfd716e87 100644 --- a/utils/wasm-proc/Cargo.toml +++ b/utils/wasm-proc/Cargo.toml @@ -1,7 +1,14 @@ [package] name = "wasm-proc" -version = "0.1.0" +description = "Gear wasm processor" +keywords = ["gear", "cli", "wasm"] +categories = ["command-line-interface", "command-line-utilities", "wasm"] +documentation = "https://docs.rs/wasm-proc" +version.workspace = true +authors.workspace = true edition.workspace = true +license.workspace = true +rust-version.workspace = true [dependencies] clap = { workspace = true, features = ["derive"] } From 6001341c92c437937182db545805f13549fd05ca Mon Sep 17 00:00:00 2001 From: StackOverflowExcept1on <109800286+StackOverflowExcept1on@users.noreply.github.com> Date: Wed, 7 Aug 2024 21:44:27 +0300 Subject: [PATCH 3/3] remove --lib --- utils/crates-io/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/crates-io/src/lib.rs b/utils/crates-io/src/lib.rs index f3528ab2893..c9af56d3e59 100644 --- a/utils/crates-io/src/lib.rs +++ b/utils/crates-io/src/lib.rs @@ -95,7 +95,7 @@ pub const PACKAGE_ALIAS: [(&str, &str); 2] = [ /// Check the input package pub fn check(manifest: &str) -> Result { Command::new("cargo") - .args(["+stable", "check", "--lib", "--manifest-path", manifest]) + .args(["+stable", "check", "--manifest-path", manifest]) .status() .map_err(Into::into) }