Skip to content
This repository has been archived by the owner on Aug 15, 2024. It is now read-only.

feat: Make boojum compile with modern compiler #57

Merged
merged 2 commits into from
Aug 5, 2024
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
19 changes: 0 additions & 19 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,6 @@ jobs:
- uses: actions-rust-lang/setup-rust-toolchain@v1
- run: cargo build --verbose
- run: cargo test --verbose --all

build_old:
name: cargo build and test (packed_simd)
strategy:
matrix:
# Needs big runners to run tests
# Only macos-13-xlarge is Apple Silicon, as per:
# https://docs.github.com/en/actions/using-github-hosted-runners/about-larger-runners/about-larger-runners#about-macos-larger-runners
os: [ubuntu-22.04-github-hosted-16core, macos-13-xlarge]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: nightly-2023-05-31

# Still compile the old rust nightly with packed simd - until we have a good replacement in poseidon.
- run: RUSTFLAGS=-Awarnings cargo +nightly-2023-05-31 build --features include_packed_simd
- run: RUSTFLAGS=-Awarnings cargo +nightly-2023-05-31 test --features include_packed_simd

formatting:
name: cargo fmt
Expand Down
5 changes: 0 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ itertools = "0.10"
blake2 = "0.10"
sha2 = "0.10"
num-modular = "0.5.1"
packed_simd = { version = "0.3.9" , optional = true}
pairing = { package = "pairing_ce", version = "=0.28.6" }
crypto-bigint = "0.5"
convert_case = "0.6"
Expand Down Expand Up @@ -61,9 +60,5 @@ opt-level = 3
[features]
# If enabled, logs will be using trace, if disabled, they will be printed to stdout.
log_tracing = ["tracing"]
# Currently packed_simd is no longer working with the newest nightly.
# But we still keep it as a feature, as we didn't migrate all the code, and
# some people might want to use older rust nightly, to be able to gain some performance.
include_packed_simd = ["packed_simd"]
cr_paranoia_mode = []
debug_track = []
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "nightly-2024-05-07"
channel = "nightly-2024-08-01"
4 changes: 2 additions & 2 deletions src/cs/implementations/fast_serialization.rs
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ where
{
fn write_into_buffer<W: Write>(&self, mut dst: W) -> Result<(), Box<dyn Error>> {
// we avoid transmute here
let flattened_self = self[..].flatten();
let flattened_self = self[..].as_flattened();

let len_as_base = flattened_self.len();
let len_le_bytes = (len_as_base as u64).to_le_bytes();
Expand Down Expand Up @@ -346,7 +346,7 @@ where
{
fn write_into_buffer<W: Write>(&self, mut dst: W) -> Result<(), Box<dyn Error>> {
// we avoid transmute here
let flattened_self = self[..].flatten();
let flattened_self = self[..].as_flattened();

let len_as_base = flattened_self.len();
let len_le_bytes = (len_as_base as u64).to_le_bytes();
Expand Down
Loading
Loading