add no_std support (#42)

* Metadata supporting scale-info can be decoded and serialized in no_std (#2)

* Metadata supporting scale-info can be decoded and serialized in no_std (feature flag scale_info)

* Changes from review: rename feature flag into full_derive

* Changes from review: std implies full-derive

* Changes from review: optimization

Co-authored-by: echevrier <edith.chevrier@scs.ch>

* split full_derive into decode and sered_codec features.

(drop new Debug impls)

* cargo fmt

* rename serde_codec to serde_full

* Prior to v14 everything was Debug.

Are there any downsides? Unused debug impls will just get optimised away won't they?

* rust fmt

* Debug for the masses. Make it work for no_std

* check all combos of features

(if this plays well with ci then we should double up,
doing the same again but target wasm32)

* all wasm feature combos

Co-authored-by: echevrier <84318241+echevrier@users.noreply.github.com>
Co-authored-by: echevrier <edith.chevrier@scs.ch>
This commit is contained in:
Squirrel
2022-11-09 14:32:34 +00:00
committed by GitHub
parent d41046b12c
commit 1ea3299208
9 changed files with 253 additions and 225 deletions
+19 -28
View File
@@ -69,12 +69,20 @@ jobs:
- name: Add WASM Utilities
run: rustup target add wasm32-unknown-unknown --toolchain stable
## Check Stage
- name: Checking wasm32
- name: Checking wasm32 (v14)
uses: actions-rs/cargo@v1
uses: taiki-e/install-action@cargo-hack
with:
command: check
command: hack
toolchain: stable
args: --manifest-path ./frame-metadata/Cargo.toml --target wasm32-unknown-unknown --no-default-features
args: check --manifest-path ./frame-metadata/Cargo.toml --feature-powerset --no-dev-deps --features v14 --skip legacy,v8,v9,v10,v11,v12,v13 --depth 4 --target wasm32-unknown-unknown
- name: Checking wasm32 (all features)
uses: actions-rs/cargo@v1
uses: taiki-e/install-action@cargo-hack
with:
command: hack
toolchain: stable
args: check --manifest-path ./frame-metadata/Cargo.toml --feature-powerset --no-dev-deps --skip decode,serde_full --depth 4 --target wasm32-unknown-unknown
check-features:
name: Check Features
@@ -92,34 +100,17 @@ jobs:
fetch-depth: 5
submodules: recursive
## Check Stage
- name: Checking without any features
- name: Checking v14 feature combinations (native)
uses: actions-rs/cargo@v1
uses: taiki-e/install-action@cargo-hack
with:
command: check
command: hack
toolchain: stable
args: --manifest-path ./frame-metadata/Cargo.toml --no-default-features
- name: Checking v12
args: check --manifest-path ./frame-metadata/Cargo.toml --feature-powerset --no-dev-deps --features v14 --skip legacy,v8,v9,v10,v11,v12,v13 --depth 4
- name: Checking feature combinations excluding decode/serde_full (native)
uses: actions-rs/cargo@v1
uses: taiki-e/install-action@cargo-hack
with:
command: check
command: hack
toolchain: stable
args: --manifest-path ./frame-metadata/Cargo.toml --no-default-features --features v12
- name: Checking v13
uses: actions-rs/cargo@v1
with:
command: check
toolchain: stable
args: --manifest-path ./frame-metadata/Cargo.toml --no-default-features --features v13
- name: Checking v14
uses: actions-rs/cargo@v1
with:
command: check
toolchain: stable
args: --manifest-path ./frame-metadata/Cargo.toml --no-default-features --features v14
- name: Checking all versions
uses: actions-rs/cargo@v1
with:
command: check
toolchain: stable
args: --manifest-path ./frame-metadata/Cargo.toml --no-default-features --features v12,v13,v14
args: check --manifest-path ./frame-metadata/Cargo.toml --feature-powerset --no-dev-deps --skip decode,serde_full --depth 4