From 2b3f9981a108409019172627868e89a84a0dc481 Mon Sep 17 00:00:00 2001 From: Bhargav Annem Date: Fri, 23 Aug 2024 10:36:22 -0700 Subject: [PATCH 1/3] fix: move glob to dev deps --- Cargo.toml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 649c083..f1ab0ed 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,6 @@ serde = { version = "1.0", optional = true, default-features = false, features = "alloc", "derive", ] } -glob = "0.3.1" hex = { version = "0.4.3", default-features = false, features = ["alloc"] } serde_yaml = { version = "0.9", optional = true } once_cell = { version = "1.19.0", default-features = false, features = [ @@ -22,6 +21,9 @@ once_cell = { version = "1.19.0", default-features = false, features = [ ] } bls12_381 = "0.8.0" +[dev-dependencies] +glob = "0.3.1" + [features] default = ["std", "serde"] serde = ["dep:serde", "dep:serde_yaml", "dep:serde_derive"] From 8a138e690b6dad0f92538a1fb526b710f7ebeba8 Mon Sep 17 00:00:00 2001 From: Bhargav Annem Date: Fri, 23 Aug 2024 11:09:01 -0700 Subject: [PATCH 2/3] fix: flag build binaries for std only --- Cargo.toml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index f1ab0ed..d06d49e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,13 +19,13 @@ once_cell = { version = "1.19.0", default-features = false, features = [ "race", "alloc", ] } -bls12_381 = "0.8.0" +bls12_381 = { version = "0.8.0", no-default-features = true } [dev-dependencies] glob = "0.3.1" [features] -default = ["std", "serde"] +default = ["serde"] serde = ["dep:serde", "dep:serde_yaml", "dep:serde_derive"] kzg-test = ['std', 'cache'] std = ["serde/std"] @@ -34,3 +34,4 @@ cache = [] [[bin]] name = "build_binaries" path = "scripts/build_binaries.rs" +required-features = ["std"] From 4aa31f889d744b033346a918baa1b7d8902ca57a Mon Sep 17 00:00:00 2001 From: Bhargav Annem Date: Fri, 23 Aug 2024 11:20:17 -0700 Subject: [PATCH 3/3] fix: yml --- .github/workflows/rust.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 889c170..153005c 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -11,12 +11,20 @@ env: jobs: build: - runs-on: ubuntu-latest - steps: - uses: actions/checkout@v4 - name: Build run: cargo build --verbose --no-default-features --features=cache - name: Run tests run: cargo test --verbose --features=kzg-test + test-no-std: + name: test no_std + runs-on: ubuntu-latest + timeout-minutes: 30 + steps: + - uses: actions/checkout@v3 + - uses: dtolnay/rust-toolchain@stable + with: + targets: riscv32imac-unknown-none-elf + - run: cargo check --target riscv32imac-unknown-none-elf --no-default-features --features=cache