Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into al-wasmi-host-executor
Browse files Browse the repository at this point in the history
# Conflicts:
#	sandbox/host/Cargo.toml
#	sandbox/host/src/sandbox.rs
  • Loading branch information
ark0f committed Jul 20, 2023
2 parents d8b3bfc + 96b0558 commit 2e61f14
Show file tree
Hide file tree
Showing 47 changed files with 84 additions and 116 deletions.
6 changes: 4 additions & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,7 @@
*.jpg binary
*.wasm binary

**/Cargo.lock linguist-generated=true
**/package-lock.json linguist-generated=true
**/Cargo.lock linguist-generated
**/package-lock.json linguist-generated
**/weights.rs linguist-generated
**/src/weights/** linguist-generated
3 changes: 3 additions & 0 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,9 @@ jobs:
- name: "ACTIONS: Setup environment variable"
if: github.ref == 'refs/heads/master' || contains(github.event.pull_request.labels.*.name, 'E0-forcecoverage')
run: echo "RUSTFLAGS=-Cinstrument-coverage" >> $GITHUB_ENV

- name: "Buid: Init"
run: ./scripts/gear.sh init cargo

- name: "Build: Gear"
run: ./scripts/gear.sh build gear --locked --release
Expand Down
2 changes: 1 addition & 1 deletion core-backend/sandbox/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ gear-backend-common.workspace = true
gsys ={ workspace = true }

gear-wasm-instrument.workspace = true
gear-sandbox = { workspace = true, features = ["host-sandbox"] }
gear-sandbox.workspace = true
# Use max_level_debug feature to remove tracing in sys-calls by default.
log.workspace = true
derive_more.workspace = true
Expand Down
4 changes: 2 additions & 2 deletions examples/async-custom-entry/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license = "GPL-3.0"
workspace = "../../"

[dependencies]
codec = { package = "parity-scale-codec", version = "3.4.0", default-features = false, features = ["derive"] }
parity-scale-codec = { workspace = true, features = ["derive"] }
gstd.workspace = true

[build-dependencies]
Expand All @@ -20,5 +20,5 @@ gtest.workspace = true

[features]
debug = ["gstd/debug"]
std = ["codec/std"]
std = ["parity-scale-codec/std"]
default = ["std"]
4 changes: 2 additions & 2 deletions examples/async-signal-entry/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license = "GPL-3.0"
workspace = "../../"

[dependencies]
codec = { package = "parity-scale-codec", version = "3.4.0", default-features = false, features = ["derive"] }
parity-scale-codec = { workspace = true, features = ["derive"] }
gstd.workspace = true

[build-dependencies]
Expand All @@ -20,5 +20,5 @@ gtest.workspace = true

[features]
debug = ["gstd/debug"]
std = ["codec/std"]
std = ["parity-scale-codec/std"]
default = ["std"]
2 changes: 1 addition & 1 deletion examples/async-signal-entry/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ mod code {
#[cfg(feature = "std")]
pub use code::WASM_BINARY_OPT as WASM_BINARY;

use codec::{Decode, Encode};
use parity_scale_codec::{Decode, Encode};

#[derive(Debug, Encode, Decode)]
pub enum InitAction {
Expand Down
2 changes: 1 addition & 1 deletion examples/async-tester/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license = "GPL-3.0"
workspace = "../../"

[dependencies]
codec = { package = "parity-scale-codec", version = "3.4.0", default-features = false, features = ["derive"] }
parity-scale-codec = { workspace = true, features = ["derive"] }
gstd.workspace = true

[build-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion examples/async-tester/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#![cfg_attr(not(feature = "std"), no_std)]
use codec::{Decode, Encode};
use parity_scale_codec::{Decode, Encode};

#[cfg(feature = "std")]
mod code {
Expand Down
4 changes: 2 additions & 2 deletions examples/btree/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license = "GPL-3.0"
workspace = "../../"

[dependencies]
codec = { package = "parity-scale-codec", version = "3.4.0", default-features = false, features = ["derive"] }
parity-scale-codec = { workspace = true, features = ["derive"] }
gstd.workspace = true

[build-dependencies]
Expand All @@ -20,5 +20,5 @@ gtest.workspace = true

[features]
debug = ["gstd/debug"]
std = ["codec/std"]
std = ["parity-scale-codec/std"]
default = ["std"]
2 changes: 1 addition & 1 deletion examples/btree/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ pub use code::WASM_BINARY_OPT as WASM_BINARY;

extern crate alloc;

use codec::{Decode, Encode};
use gstd::prelude::*;
use parity_scale_codec::{Decode, Encode};

#[derive(Encode, Debug, Decode, PartialEq, Eq)]
pub enum Request {
Expand Down
2 changes: 1 addition & 1 deletion examples/calc-hash/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license = "GPL-3.0"
workspace = "../../"

[dependencies]
codec = { package = "parity-scale-codec", version = "3.4.0", default-features = false, features = ["derive"]}
parity-scale-codec = { workspace = true, features = ["derive"]}
sha2 = { version = "0.10.6", default-features = false }

[build-dependencies]
Expand Down
4 changes: 2 additions & 2 deletions examples/calc-hash/in-one-block/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ license = "GPL-3.0"
workspace = "../../../"

[dependencies]
codec = { package = "parity-scale-codec", version = "3.4.0", default-features = false, features = ["derive"]}
parity-scale-codec = { workspace = true, features = ["derive"]}
gstd.workspace = true
shared = { path = "..", package = "demo-calc-hash" }

[build-dependencies]
gear-wasm-builder = { path = "../../../utils/wasm-builder" }
gear-wasm-builder.workspace = true

[features]
debug = ["gstd/debug"]
Expand Down
2 changes: 1 addition & 1 deletion examples/calc-hash/in-one-block/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
#![no_std]
use codec::{Decode, Encode};
use parity_scale_codec::{Decode, Encode};

#[cfg(feature = "std")]
mod code {
Expand Down
4 changes: 2 additions & 2 deletions examples/calc-hash/over-blocks/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ license = "GPL-3.0"
workspace = "../../../"

[dependencies]
codec = { package = "parity-scale-codec", version = "3.4.0", default-features = false, features = ["derive"]}
parity-scale-codec = { workspace = true, features = ["derive"]}
gstd.workspace = true
shared = { path = "../", package = "demo-calc-hash" }

[build-dependencies]
gear-wasm-builder = { path = "../../../utils/wasm-builder" }
gear-wasm-builder.workspace = true

[features]
debug = ["gstd/debug"]
Expand Down
2 changes: 1 addition & 1 deletion examples/calc-hash/over-blocks/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
// along with this program. If not, see <https://www.gnu.org/licenses/>.
#![no_std]

use codec::{Decode, Encode};
use parity_scale_codec::{Decode, Encode};
use shared::PackageId;

#[cfg(feature = "std")]
Expand Down
2 changes: 1 addition & 1 deletion examples/calc-hash/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

extern crate alloc;

use codec::{Decode, Encode};
use parity_scale_codec::{Decode, Encode};
use sha2::Digest;

pub type PackageId = [u8; 32];
Expand Down
4 changes: 2 additions & 2 deletions examples/distributor/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license = "GPL-3.0"
workspace = "../../"

[dependencies]
codec = { package = "parity-scale-codec", version = "3.4.0", default-features = false, features = ["derive"] }
parity-scale-codec = { workspace = true, features = ["derive"] }
gstd.workspace = true

[build-dependencies]
Expand All @@ -21,5 +21,5 @@ gtest.workspace = true

[features]
debug = ["gstd/debug"]
std = ["codec/std"]
std = ["parity-scale-codec/std"]
default = ["std"]
2 changes: 1 addition & 1 deletion examples/distributor/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@

extern crate alloc;

use codec::{Decode, Encode};
use gstd::{prelude::*, ActorId};
use parity_scale_codec::{Decode, Encode};

#[cfg(feature = "std")]
mod code {
Expand Down
2 changes: 1 addition & 1 deletion examples/messager/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ workspace = "../../"
gstd.workspace = true

[build-dependencies]
gear-wasm-builder = { path = "../../utils/wasm-builder" }
gear-wasm-builder.workspace = true

[features]
std = []
Expand Down
4 changes: 2 additions & 2 deletions examples/node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license = "GPL-3.0"
workspace = "../../"

[dependencies]
codec = { package = "parity-scale-codec", version = "3.4.0", default-features = false, features = ["derive"] }
parity-scale-codec = { workspace = true, features = ["derive"] }
gstd.workspace = true

[build-dependencies]
Expand All @@ -21,5 +21,5 @@ gtest.workspace = true

[features]
debug = ["gstd/debug"]
std = ["codec/std"]
std = ["parity-scale-codec/std"]
default = ["std"]
2 changes: 1 addition & 1 deletion examples/node/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
extern crate alloc;

use alloc::collections::BTreeSet;
use codec::{Decode, Encode};
use gstd::{debug, exec, msg, prelude::*, ActorId, MessageId};
use parity_scale_codec::{Decode, Encode};

#[cfg(feature = "std")]
mod code {
Expand Down
4 changes: 2 additions & 2 deletions examples/program-factory/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license = "GPL-3.0"
workspace = "../../"

[dependencies]
codec = { package = "parity-scale-codec", version = "3.4.0", default-features = false, features = ["derive"] }
parity-scale-codec = { workspace = true, features = ["derive"] }
gstd.workspace = true
hex-literal = "*"

Expand All @@ -21,5 +21,5 @@ gtest.workspace = true

[features]
debug = ["gstd/debug"]
std = ["codec/std"]
std = ["parity-scale-codec/std"]
default = ["std"]
2 changes: 1 addition & 1 deletion examples/program-factory/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@

#![cfg_attr(not(feature = "std"), no_std)]

use codec::{Decode, Encode};
#[cfg(not(feature = "std"))]
use gstd::prelude::*;
use parity_scale_codec::{Decode, Encode};

#[cfg(feature = "std")]
mod code {
Expand Down
6 changes: 3 additions & 3 deletions examples/proxy-relay/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ license = "GPL-3.0"
workspace = "../../"

[dependencies]
codec = { package = "parity-scale-codec", version = "3.4.0", default-features = false, features = ["derive"] }
parity-scale-codec = { workspace = true, features = ["derive"] }
gstd.workspace = true
scale-info = { version = "2.5.0", default-features = false, features = ["derive"] }
scale-info = { workspace = true, features = ["derive"] }

[build-dependencies]
gear-wasm-builder.workspace = true
Expand All @@ -18,5 +18,5 @@ gear-wasm-builder.workspace = true

[features]
debug = ["gstd/debug"]
std = ["codec/std", "scale-info/std"]
std = ["parity-scale-codec/std", "scale-info/std"]
default = ["std"]
2 changes: 1 addition & 1 deletion examples/proxy-relay/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@

#![cfg_attr(not(feature = "std"), no_std)]

use codec::{Decode, Encode};
use gstd::Vec;
use parity_scale_codec::{Decode, Encode};
use scale_info::TypeInfo;

#[cfg(feature = "std")]
Expand Down
6 changes: 3 additions & 3 deletions examples/proxy-reservation-with-gas/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ license = "GPL-3.0"
workspace = "../../"

[dependencies]
codec = { package = "parity-scale-codec", version = "3.4.0", default-features = false, features = ["derive"] }
parity-scale-codec = { workspace = true, features = ["derive"] }
gstd.workspace = true
scale-info = { version = "2.5.0", default-features = false, features = ["derive"] }
scale-info = { workspace = true, features = ["derive"] }

[build-dependencies]
gear-wasm-builder.workspace = true
Expand All @@ -18,5 +18,5 @@ gear-wasm-builder.workspace = true

[features]
debug = ["gstd/debug"]
std = ["codec/std", "scale-info/std"]
std = ["parity-scale-codec/std", "scale-info/std"]
default = ["std"]
2 changes: 1 addition & 1 deletion examples/proxy-reservation-with-gas/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#![cfg_attr(not(feature = "std"), no_std)]

use codec::{Decode, Encode};
use parity_scale_codec::{Decode, Encode};
use scale_info::TypeInfo;

#[cfg(feature = "std")]
Expand Down
6 changes: 3 additions & 3 deletions examples/proxy/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ workspace = "../../"

[dependencies]
gstd = { workspace = true }
codec = { package = "parity-scale-codec", version = "3.4.0", default-features = false, features = ["derive"] }
scale-info = { version = "2.5.0", default-features = false, features = ["derive"] }
parity-scale-codec = { workspace = true, features = ["derive"] }
scale-info = { workspace = true, features = ["derive"] }

[build-dependencies]
gear-wasm-builder.workspace = true
Expand All @@ -19,5 +19,5 @@ gear-wasm-builder.workspace = true
[features]
debug = ["gstd/debug"]
wasm-wrapper = []
std = ["wasm-wrapper", "codec/std", "scale-info/std"]
std = ["wasm-wrapper", "parity-scale-codec/std", "scale-info/std"]
default = ["std"]
2 changes: 1 addition & 1 deletion examples/proxy/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#![cfg_attr(not(feature = "std"), no_std)]

use codec::{Decode, Encode};
use parity_scale_codec::{Decode, Encode};
use scale_info::TypeInfo;

#[cfg(feature = "wasm-wrapper")]
Expand Down
2 changes: 1 addition & 1 deletion examples/reservation-manager/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ workspace = "../../"

[dependencies]
gstd.workspace = true
parity-scale-codec = { workspace = true, default-features = false, features = ["derive"] }
parity-scale-codec = { workspace = true, features = ["derive"] }

[build-dependencies]
gear-wasm-builder.workspace = true
Expand Down
4 changes: 2 additions & 2 deletions examples/send-from-reservation/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license = "GPL-3.0"
workspace = "../../"

[dependencies]
codec = { package = "parity-scale-codec", version = "3.4.0", default-features = false, features = ["derive"] }
parity-scale-codec = { workspace = true, features = ["derive"] }
gstd.workspace = true

[build-dependencies]
Expand All @@ -20,5 +20,5 @@ gtest.workspace = true

[features]
debug = ["gstd/debug"]
std = ["codec/std"]
std = ["parity-scale-codec/std"]
default = ["std"]
2 changes: 1 addition & 1 deletion examples/send-from-reservation/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#![cfg_attr(not(feature = "std"), no_std)]

use codec::{Decode, Encode};
use parity_scale_codec::{Decode, Encode};

#[cfg(feature = "std")]
mod code {
Expand Down
4 changes: 2 additions & 2 deletions examples/sys-calls/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ workspace = "../../"

[dependencies]
gstd = { workspace = true }
codec = { package = "parity-scale-codec", version = "3.4.0", default-features = false, features = ["derive"] }
parity-scale-codec = { workspace = true, features = ["derive"] }

[build-dependencies]
gear-wasm-builder.workspace = true
Expand All @@ -18,5 +18,5 @@ gear-wasm-builder.workspace = true
[features]
debug = ["gstd/debug"]
wasm-wrapper = []
std = ["wasm-wrapper", "codec/std"]
std = ["wasm-wrapper", "parity-scale-codec/std"]
default = ["std"]
Loading

0 comments on commit 2e61f14

Please sign in to comment.