Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix features #238

Merged
merged 3 commits into from
Oct 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ jobs:

- name: "[blst] Build Linux"
run: |
cargo rustc --manifest-path blst/Cargo.toml --release --target x86_64-unknown-linux-gnu --crate-type=staticlib --features=blst-portable
cargo rustc --manifest-path blst/Cargo.toml --release --target x86_64-unknown-linux-gnu -C target-cpu=x86-64 --crate-type=staticlib
mv target/x86_64-unknown-linux-gnu/release/librust_kzg_blst.a staging/linux/non-parallel/rust_kzg_blst.a
cargo rustc --manifest-path blst/Cargo.toml --release --target x86_64-unknown-linux-gnu --crate-type=staticlib --features=blst-force-adx
cargo rustc --manifest-path blst/Cargo.toml --release --target x86_64-unknown-linux-gnu -C target-cpu=x86-64 -C target-feature=+adx --crate-type=staticlib
mv target/x86_64-unknown-linux-gnu/release/librust_kzg_blst.a staging/linux/non-parallel-force-adx/rust_kzg_blst.a
cargo rustc --manifest-path blst/Cargo.toml --release --target x86_64-unknown-linux-gnu --crate-type=staticlib --features=parallel,blst-portable
cargo rustc --manifest-path blst/Cargo.toml --release --target x86_64-unknown-linux-gnu -C target-cpu=x86-64 --crate-type=staticlib --features=parallel
mv target/x86_64-unknown-linux-gnu/release/librust_kzg_blst.a staging/linux/parallel/rust_kzg_blst.a
cargo rustc --manifest-path blst/Cargo.toml --release --target x86_64-unknown-linux-gnu --crate-type=staticlib --features=parallel,blst-force-adx
cargo rustc --manifest-path blst/Cargo.toml --release --target x86_64-unknown-linux-gnu -C target-cpu=x86-64 -C target-feature=+adx --crate-type=staticlib --features=parallel
mv target/x86_64-unknown-linux-gnu/release/librust_kzg_blst.a staging/linux/parallel-force-adx/rust_kzg_blst.a

- name: "[blst] Compress Linux artifacts"
Expand All @@ -53,13 +53,13 @@ jobs:

- name: "[blst] Build Windows"
run: |
cargo rustc --manifest-path blst/Cargo.toml --release --target x86_64-pc-windows-gnu --crate-type=staticlib --features=blst-portable
cargo rustc --manifest-path blst/Cargo.toml --release --target x86_64-pc-windows-gnu -C target-cpu=x86-64 --crate-type=staticlib
mv target/x86_64-pc-windows-gnu/release/librust_kzg_blst.a staging/windows/non-parallel/rust_kzg_blst.a
cargo rustc --manifest-path blst/Cargo.toml --release --target x86_64-pc-windows-gnu --crate-type=staticlib --features=blst-force-adx
cargo rustc --manifest-path blst/Cargo.toml --release --target x86_64-pc-windows-gnu -C target-cpu=x86-64 -C target-feature=+adx --crate-type=staticlib
mv target/x86_64-pc-windows-gnu/release/librust_kzg_blst.a staging/windows/non-parallel-force-adx/rust_kzg_blst.a
cargo rustc --manifest-path blst/Cargo.toml --release --target x86_64-pc-windows-gnu --crate-type=staticlib --features=parallel,blst-portable
cargo rustc --manifest-path blst/Cargo.toml --release --target x86_64-pc-windows-gnu -C target-cpu=x86-64 --crate-type=staticlib --features=parallel
mv target/x86_64-pc-windows-gnu/release/librust_kzg_blst.a staging/windows/parallel/rust_kzg_blst.a
cargo rustc --manifest-path blst/Cargo.toml --release --target x86_64-pc-windows-gnu --crate-type=staticlib --features=parallel,blst-force-adx
cargo rustc --manifest-path blst/Cargo.toml --release --target x86_64-pc-windows-gnu -C target-cpu=x86-64 -C target-feature=+adx --crate-type=staticlib --features=parallel
mv target/x86_64-pc-windows-gnu/release/librust_kzg_blst.a staging/windows/parallel-force-adx/rust_kzg_blst.a

- name: "[blst] Compress Windows artifacts"
Expand Down
17 changes: 2 additions & 15 deletions blst/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ version = "0.1.0"
edition = "2021"

[dependencies]
# TODO: Use `std` feature once https://github.com/supranational/blst/pull/150 or similar upstreamed
blst = { 'git' = 'https://github.com/supranational/blst.git' }
kzg = { path = "../kzg", default-features = false }
libc = { version = "0.2.137", default-features = false }
Expand All @@ -13,7 +12,7 @@ once_cell = { version = "1.4.0", features = ["critical-section"], default-featur
rand = { version = "0.8.4", optional = true }
rayon = { version = "1.5.1", optional = true }
smallvec = { version = "1.10.0", features = ["const_generics"] }
hex = "0.4.2"
hex = { version = "0.4.2", default-features = false, features = ["alloc"] }

[dev-dependencies]
criterion = "0.4.0"
Expand All @@ -24,9 +23,9 @@ rand = "0.8.4"
default = [
"std",
"rand",
"blst-default"
]
std = [
"hex/std",
"kzg/std",
"libc/std",
"once_cell/std",
Expand All @@ -41,18 +40,6 @@ parallel = [
]
minimal-spec = ["kzg/minimal-spec", "kzg-bench/minimal-spec"]

# By default, compile with ADX extension if the host supports it.
# Binary can be executed on systems similar to the host.
blst-default = ["blst/default"]

# Compile in portable mode, without ISA extensions.
# Binary can be executed on all systems.
blst-portable = ["blst/portable"]

# Enable ADX even if the host CPU doesn't support it.
# Binary can be executed on Broadwell+ and Ryzen+ systems.
blst-force-adx = ["blst/force-adx"]

[[bench]]
name = "das"
harness = false
Expand Down
Loading