Skip to content

Commit f5240cb

Browse files
xgreenxMitchTurner
andauthored
Added no_std support state transition related crates (#2040)
Added `no_std` support state transition related crates: - `fuel-core-types` - `fuel-core-storage` - `fuel-core-executor` ## Checklist - [x] Breaking changes are clearly marked as such in the PR description and changelog ### Before requesting review - [x] I have reviewed the code myself --------- Co-authored-by: Mitchell Turner <[email protected]>
1 parent 3b84ec1 commit f5240cb

File tree

58 files changed

+337
-103
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+337
-103
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,15 +139,15 @@ jobs:
139139

140140
# WASM compatibility checks
141141
- command: check
142-
args: -p fuel-core-types --target wasm32-unknown-unknown --no-default-features
142+
args: -p fuel-core-types --target wasm32-unknown-unknown --no-default-features --features alloc
143143
- command: check
144-
args: -p fuel-core-storage --target wasm32-unknown-unknown --no-default-features
144+
args: -p fuel-core-storage --target wasm32-unknown-unknown --no-default-features --features alloc
145145
- command: check
146146
args: -p fuel-core-client --target wasm32-unknown-unknown --no-default-features
147147
- command: check
148148
args: -p fuel-core-chain-config --target wasm32-unknown-unknown --no-default-features
149149
- command: check
150-
args: -p fuel-core-executor --target wasm32-unknown-unknown --no-default-features
150+
args: -p fuel-core-executor --target wasm32-unknown-unknown --no-default-features --features alloc
151151

152152
# disallow any job that takes longer than 45 minutes
153153
timeout-minutes: 45

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
99
### Added
1010
- [2122](https://github.com/FuelLabs/fuel-core/pull/2122): Changed the relayer URI address to be a vector and use a quorum provider. The `relayer` argument now supports multiple URLs to fetch information from different sources.
1111
- [2119](https://github.com/FuelLabs/fuel-core/pull/2119): GraphQL query fields for retrieving information about upgrades.
12-
- [2116](https://github.com/FuelLabs/fuel-core/pull/2116): Replace `H160` in config and cli options of relayer by `Bytes20` of `fuel-types`
1312

1413
### Changed
1514
- [2113](https://github.com/FuelLabs/fuel-core/pull/2113): Modify the way the gas price service and shared algo is initialized to have some default value based on best guess instead of `None`, and initialize service before graphql.
@@ -18,6 +17,14 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1817
- [2115](https://github.com/FuelLabs/fuel-core/pull/2115): Add test for `SignMode` `is_available` method.
1918
- [2124](https://github.com/FuelLabs/fuel-core/pull/2124): Generalize the way p2p req/res protocol handles requests.
2019

20+
#### Breaking
21+
22+
- [2040](https://github.com/FuelLabs/fuel-core/pull/2040): Added full `no_std` support state transition related crates. The crates now require the "alloc" feature to be enabled. Following crates are affected:
23+
- `fuel-core-types`
24+
- `fuel-core-storage`
25+
- `fuel-core-executor`
26+
- [2116](https://github.com/FuelLabs/fuel-core/pull/2116): Replace `H160` in config and cli options of relayer by `Bytes20` of `fuel-types`
27+
2128
### Fixed
2229
- [2134](https://github.com/FuelLabs/fuel-core/pull/2134): Perform RecoveryID normalization for AWS KMS -generated signatures.
2330

Cargo.lock

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

benches/benches-outputs/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ license = "BUSL-1.1"
66
publish = false
77

88
[dependencies]
9-
fuel-core-types = { path = "../../crates/types", default-features = false, features = [
9+
fuel-core-types = { path = "../../crates/types", features = [
1010
"random",
1111
"test-helpers",
1212
] }

bin/fuel-core-client/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ path = "src/main.rs"
1717
[dependencies]
1818
clap = { workspace = true, features = ["derive"] }
1919
fuel-core-client = { workspace = true }
20-
fuel-core-types = { workspace = true, features = ["serde"] }
20+
fuel-core-types = { workspace = true, features = ["alloc", "serde"] }
2121
serde_json = { workspace = true, features = ["raw_value"] }
2222
tokio = { workspace = true, features = ["macros"] }

bin/fuel-core/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ dotenvy = { version = "0.15", optional = true }
2828
fuel-core = { workspace = true, features = ["wasm-executor"] }
2929
fuel-core-chain-config = { workspace = true }
3030
fuel-core-poa = { workspace = true }
31-
fuel-core-types = { workspace = true }
31+
fuel-core-types = { workspace = true, features = ["std"] }
3232
hex = { workspace = true }
3333
humantime = "2.1"
3434
pyroscope = "0.5"
Binary file not shown.

ci_checks.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ cargo clippy -p fuel-core-wasm-executor --target wasm32-unknown-unknown --no-def
2121
cargo clippy --all-targets --all-features &&
2222
cargo clippy --manifest-path version-compatibility/Cargo.toml --workspace &&
2323
cargo doc --all-features --workspace --no-deps &&
24-
cargo make check --locked &&
25-
FUEL_ALWAYS_USE_WASM=true cargo make check --all-features --locked &&
26-
cargo check -p fuel-core-types --target wasm32-unknown-unknown --no-default-features &&
27-
cargo check -p fuel-core-storage --target wasm32-unknown-unknown --no-default-features &&
24+
cargo check -p fuel-core-types --target wasm32-unknown-unknown --no-default-features --features alloc &&
25+
cargo check -p fuel-core-storage --target wasm32-unknown-unknown --no-default-features --features alloc &&
2826
cargo check -p fuel-core-client --target wasm32-unknown-unknown --no-default-features &&
2927
cargo check -p fuel-core-chain-config --target wasm32-unknown-unknown --no-default-features &&
30-
cargo check -p fuel-core-executor --target wasm32-unknown-unknown --no-default-features &&
28+
cargo check -p fuel-core-executor --target wasm32-unknown-unknown --no-default-features --features alloc &&
29+
cargo make check --all-features --locked &&
30+
cargo make check --locked &&
3131
OVERRIDE_CHAIN_CONFIGS=true cargo test --test integration_tests local_node &&
3232
cargo test --workspace &&
3333
FUEL_ALWAYS_USE_WASM=true cargo test --all-features --workspace &&

crates/chain-config/Cargo.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@ description = "Fuel Chain config types"
1414
anyhow = { workspace = true }
1515
bech32 = { version = "0.9.0", default-features = false, optional = true }
1616
derivative = { workspace = true }
17-
fuel-core-storage = { workspace = true }
17+
fuel-core-storage = { workspace = true, features = ["alloc"] }
1818
fuel-core-types = { workspace = true, default-features = false, features = [
19+
"alloc",
1920
"serde",
2021
] }
2122
itertools = { workspace = true, features = ["use_alloc"] }
@@ -31,6 +32,7 @@ tracing = { version = "0.1", default-features = false, optional = true }
3132
bytes = { workspace = true }
3233
fuel-core-chain-config = { path = ".", features = ["parquet", "test-helpers"] }
3334
fuel-core-types = { workspace = true, default-features = false, features = [
35+
"alloc",
3436
"random",
3537
"serde",
3638
] }

crates/client/Cargo.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ anyhow = { workspace = true }
1515
cynic = { workspace = true }
1616
derive_more = { workspace = true }
1717
eventsource-client = { version = "0.12.2", optional = true }
18-
fuel-core-types = { workspace = true, features = ["serde"] }
18+
fuel-core-types = { workspace = true, features = ["alloc", "serde"] }
1919
futures = { workspace = true, optional = true }
2020
hex = { workspace = true }
2121
# Included to enable webpki in the eventsource client
@@ -43,6 +43,7 @@ schemafy_lib = { version = "0.5" }
4343
serde_json = { version = "1.0", features = ["raw_value"] }
4444

4545
[features]
46-
default = ["subscriptions"]
46+
std = ["fuel-core-types/std"]
47+
default = ["subscriptions", "std"]
4748
test-helpers = []
4849
subscriptions = ["eventsource-client", "futures", "hyper-rustls"]

0 commit comments

Comments
 (0)