Skip to content

Commit

Permalink
Make fuel-core-executor no_std compatible (#1532)
Browse files Browse the repository at this point in the history
Closes #1531

---------

Co-authored-by: xgreenx <xgreenx9999@gmail.com>
  • Loading branch information
Salka1988 and xgreenx authored Dec 11, 2023
1 parent d0b7cee commit 9c526c4
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 8 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ jobs:
args: -p fuel-core-client --target wasm32-unknown-unknown --no-default-features
- command: check
args: -p fuel-core-chain-config --target wasm32-unknown-unknown --no-default-features
- command: check
args: -p fuel-core-executor --target wasm32-unknown-unknown --no-default-features

# disallow any job that takes longer than 45 minutes
timeout-minutes: 45
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ Description of the upcoming release here.
- [#1515](https://github.com/FuelLabs/fuel-core/pull/1515): Added support of `--version` command for `fuel-core-keygen` binary.
- [#1504](https://github.com/FuelLabs/fuel-core/pull/1504): A `Success` or `Failure` variant of `TransactionStatus` returned by a query now contains the associated receipts generated by transaction execution.

#### Breaking
- [#1531](https://github.com/FuelLabs/fuel-core/pull/1531): Make `fuel-core-executor` `no_std` compatible. It affects the `fuel-core` crate because it uses the `fuel-core-executor` crate. The change is breaking because of moved types.

### Changed

- [#1517](https://github.com/FuelLabs/fuel-core/pull/1517): Changed default gossip heartbeat interval to 500ms.
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ fuel-core-client-bin = { version = "0.21.0", path = "./bin/client" }
fuel-core-bin = { version = "0.21.0", path = "./bin/fuel-core" }
fuel-core-keygen = { version = "0.21.0", path = "./crates/keygen" }
fuel-core-keygen-bin = { version = "0.21.0", path = "./bin/keygen" }
fuel-core-chain-config = { version = "0.21.0", path = "./crates/chain-config" }
fuel-core-chain-config = { version = "0.21.0", path = "./crates/chain-config", default-features = false }
fuel-core-client = { version = "0.21.0", path = "./crates/client" }
fuel-core-database = { version = "0.21.0", path = "./crates/database" }
fuel-core-metrics = { version = "0.21.0", path = "./crates/metrics" }
Expand Down
2 changes: 1 addition & 1 deletion bin/fuel-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const_format = { version = "0.2", optional = true }
dirs = "4.0"
dotenvy = { version = "0.15", optional = true }
fuel-core = { workspace = true }
fuel-core-chain-config = { workspace = true }
fuel-core-chain-config = { workspace = true, default-features = true }
fuel-core-types = { workspace = true }
hex = "0.4"
humantime = "2.1"
Expand Down
1 change: 1 addition & 0 deletions ci_checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ cargo check -p fuel-core-types --target wasm32-unknown-unknown --no-default-feat
cargo check -p fuel-core-storage --target wasm32-unknown-unknown --no-default-features &&
cargo check -p fuel-core-client --target wasm32-unknown-unknown --no-default-features &&
cargo check -p fuel-core-chain-config --target wasm32-unknown-unknown --no-default-features &&
cargo check -p fuel-core-executor --target wasm32-unknown-unknown --no-default-features &&
cargo test --all-features --workspace &&
cargo test -p fuel-core --no-default-features &&
cargo test -p fuel-core-client --no-default-features &&
Expand Down
2 changes: 1 addition & 1 deletion crates/chain-config/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ rand = { workspace = true }
serde_json = { version = "1.0", features = ["raw_value"] }

[features]
default = ["std"]
default = ["std", "fuel-core-types/std"]
random = ["dep:rand", "fuel-core-types/random"]
std = ["dep:serde_json", "fuel-core-types/std", "anyhow/std"]
4 changes: 2 additions & 2 deletions crates/fuel-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ enum-iterator = "1.2"
fuel-core-chain-config = { workspace = true }
fuel-core-consensus-module = { workspace = true }
fuel-core-database = { workspace = true }
fuel-core-executor = { workspace = true }
fuel-core-executor = { workspace = true, features = ["std"] }
fuel-core-importer = { workspace = true }
fuel-core-metrics = { workspace = true }
fuel-core-p2p = { workspace = true, optional = true }
Expand Down Expand Up @@ -61,7 +61,7 @@ uuid = { version = "1.1", features = ["v4"] }

[dev-dependencies]
assert_matches = "1.5"
fuel-core-executor = { workspace = true, features = ["test-helpers"] }
fuel-core-executor = { workspace = true, features = ["std", "test-helpers"] }
fuel-core-services = { path = "./../services", features = ["test-helpers"] }
fuel-core-storage = { path = "./../storage", features = ["test-helpers"] }
fuel-core-trace = { path = "./../trace" }
Expand Down
10 changes: 7 additions & 3 deletions crates/services/executor/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,21 @@ description = "Fuel Block Executor"

[dependencies]
anyhow = { workspace = true }
fuel-core-chain-config = { workspace = true }
fuel-core-storage = { workspace = true, features = ["test-helpers"] }
fuel-core-types = { workspace = true, features = ["test-helpers"] }
fuel-core-chain-config = { workspace = true, default-features = false }
fuel-core-storage = { workspace = true }
fuel-core-types = { workspace = true, default-features = false }
hex = { version = "0.4", features = ["serde"] }
parking_lot = { workspace = true }
tracing = { workspace = true }

[dev-dependencies]
fuel-core-storage = { workspace = true, features = ["test-helpers"] }
fuel-core-trace = { path = "../../trace" }
fuel-core-types = { workspace = true, features = ["test-helpers"] }

[features]
default = ["std"]
std = ["fuel-core-chain-config/default", "fuel-core-types/default"]
test-helpers = [
"fuel-core-types/test-helpers",
"fuel-core-storage/test-helpers"
Expand Down

0 comments on commit 9c526c4

Please sign in to comment.