Skip to content

Commit

Permalink
change toolchain to nightly (#1908)
Browse files Browse the repository at this point in the history
related to [this PR](#1898)
we need to change to nightly toolchain to integrate stwo

I kept the toolchain related to riscv to be "nightly-2024-08-01" as it
is handled separately in workflow, so I made the least change to make
stwo integrate-able for now.

fix some clippy issues about the comment format on some files.

---------

Co-authored-by: chriseth <[email protected]>
  • Loading branch information
2 people authored and leonardoalt committed Oct 18, 2024
1 parent 84aa7d7 commit d4fb7a2
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 19 deletions.
30 changes: 17 additions & 13 deletions .github/workflows/pr-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,14 @@ jobs:
- name: Date of the restored cache
run: cat target/cache-build-date.txt
continue-on-error: true
- name: Install Rust toolchain 1.81 (with clippy and rustfmt)
run: rustup toolchain install 1.81-x86_64-unknown-linux-gnu && rustup component add clippy --toolchain 1.81-x86_64-unknown-linux-gnu && rustup component add rustfmt --toolchain 1.81-x86_64-unknown-linux-gnu
- name: Install Rust toolchain nightly-2024-09-21 (with clippy and rustfmt)
run: rustup toolchain install nightly-2024-09-21-x86_64-unknown-linux-gnu && rustup component add clippy --toolchain nightly-2024-09-21-x86_64-unknown-linux-gnu && rustup component add rustfmt --toolchain nightly-2024-09-21-x86_64-unknown-linux-gnu
- name: Install EStarkPolygon prover dependencies
run: sudo apt-get install -y nlohmann-json3-dev libpqxx-dev nasm
- name: Install Rust toolchain 1.81 (stable)
run: rustup toolchain install 1.81.0-x86_64-unknown-linux-gnu
- name: Cargo check with Rust 1.81 (default features)
run: rustup default 1.81.0-x86_64-unknown-linux-gnu && cargo +1.81.0-x86_64-unknown-linux-gnu check --all-targets --no-default-features
- name: Lint no default features
run: cargo clippy --all --all-targets --no-default-features --profile pr-tests -- -D warnings
- name: Lint all features
Expand Down Expand Up @@ -88,9 +92,9 @@ jobs:
path: |
~/pilcom/node_modules
key: ${{ runner.os }}-pilcom-node-modules
- name: Install Rust toolchain 1.81 (with clippy and rustfmt)
run: rustup toolchain install 1.81-x86_64-unknown-linux-gnu && rustup component add clippy --toolchain 1.81-x86_64-unknown-linux-gnu && rustup component add rustfmt --toolchain 1.81-x86_64-unknown-linux-gnu
- name: Install nightly
- name: Install Rust toolchain nightly-2024-09-21 (with clippy and rustfmt)
run: rustup toolchain install nightly-2024-09-21-x86_64-unknown-linux-gnu && rustup component add clippy --toolchain nightly-2024-09-21-x86_64-unknown-linux-gnu && rustup component add rustfmt --toolchain nightly-2024-09-21-x86_64-unknown-linux-gnu
- name: Install nightly-2024-08-01
run: rustup toolchain install nightly-2024-08-01-x86_64-unknown-linux-gnu
- name: Install std source
run: rustup component add rust-src --toolchain nightly-2024-08-01-x86_64-unknown-linux-gnu
Expand Down Expand Up @@ -123,8 +127,8 @@ jobs:
target/
Cargo.lock
key: ${{ runner.os }}-cargo-pr-tests
- name: Install Rust toolchain 1.81 (with clippy and rustfmt)
run: rustup toolchain install 1.81-x86_64-unknown-linux-gnu && rustup component add clippy --toolchain 1.81-x86_64-unknown-linux-gnu && rustup component add rustfmt --toolchain 1.81-x86_64-unknown-linux-gnu
- name: Install Rust toolchain nightly-2024-09-21 (with clippy and rustfmt)
run: rustup toolchain install nightly-2024-09-21-x86_64-unknown-linux-gnu && rustup component add clippy --toolchain nightly-2024-09-21-x86_64-unknown-linux-gnu && rustup component add rustfmt --toolchain nightly-2024-09-21-x86_64-unknown-linux-gnu
- name: Run examples
run: cargo run --example hello_world && cargo run --example sqrt_with_publics

Expand All @@ -145,9 +149,9 @@ jobs:
path: |
~/pilcom/node_modules
key: ${{ runner.os }}-pilcom-node-modules
- name: Install Rust toolchain 1.81 (with clippy and rustfmt)
run: rustup toolchain install 1.81-x86_64-unknown-linux-gnu && rustup component add clippy --toolchain 1.81-x86_64-unknown-linux-gnu && rustup component add rustfmt --toolchain 1.81-x86_64-unknown-linux-gnu
- name: Install nightly
- name: Install Rust toolchain nightly-2024-09-21(with clippy and rustfmt)
run: rustup toolchain install nightly-2024-09-21-x86_64-unknown-linux-gnu && rustup component add clippy --toolchain nightly-2024-09-21-x86_64-unknown-linux-gnu && rustup component add rustfmt --toolchain nightly-2024-09-21-x86_64-unknown-linux-gnu
- name: Install nightly-2024-08-01
run: rustup toolchain install nightly-2024-08-01-x86_64-unknown-linux-gnu
- name: Install std source
run: rustup component add rust-src --toolchain nightly-2024-08-01-x86_64-unknown-linux-gnu
Expand Down Expand Up @@ -195,11 +199,11 @@ jobs:
path: |
~/pilcom/node_modules
key: ${{ runner.os }}-pilcom-node-modules
- name: Install Rust toolchain 1.81 (with clippy and rustfmt)
run: rustup toolchain install 1.81-x86_64-unknown-linux-gnu && rustup component add clippy --toolchain 1.81-x86_64-unknown-linux-gnu && rustup component add rustfmt --toolchain 1.81-x86_64-unknown-linux-gnu
- name: Install Rust toolchain nightly-2024-09-21 (with clippy and rustfmt)
run: rustup toolchain install nightly-2024-09-21-x86_64-unknown-linux-gnu && rustup component add clippy --toolchain nightly-2024-09-21-x86_64-unknown-linux-gnu && rustup component add rustfmt --toolchain nightly-2024-09-21-x86_64-unknown-linux-gnu
- name: Install test dependencies
run: sudo apt-get install -y binutils-riscv64-unknown-elf lld
- name: Install nightly
- name: Install nightly-2024-08-01
run: rustup toolchain install nightly-2024-08-01-x86_64-unknown-linux-gnu
- name: Install std source
run: rustup component add rust-src --toolchain nightly-2024-08-01-x86_64-unknown-linux-gnu
Expand Down
2 changes: 1 addition & 1 deletion analysis/src/vm/batcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ struct Batch<'a> {
}

impl<'a> Batch<'a> {
fn from_statement(s: &'a FunctionStatement) -> Batch {
fn from_statement(s: &'a FunctionStatement) -> Batch<'a> {
Batch {
statements: vec![s],
}
Expand Down
4 changes: 2 additions & 2 deletions executor/src/constant_evaluator/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ mod data_structures;
mod interpreter;
mod jit_compiler;

/// Generates the fixed column values for all fixed columns that are defined
/// (and not just declared).
/// Generates the fixed column values for all fixed columns that are defined (and not just declared).
///
/// @returns the names (in source order) and the values for the columns.
/// Arrays of columns are flattened, the name of the `i`th array element
/// is `name[i]`.
Expand Down
1 change: 1 addition & 0 deletions riscv/src/continuations/bootloader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ pub const REGISTER_NAMES: [&str; 37] = [
pub const PC_INDEX: usize = REGISTER_NAMES.len() - 1;

/// The default PC that can be used in first chunk, will just continue with whatever comes after the bootloader.
///
/// The value is 3, because we added a jump instruction at the beginning of the code.
/// Specifically, the first instructions are:
/// 0: reset
Expand Down
1 change: 1 addition & 0 deletions riscv/src/runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ impl SubMachine {
}

/// Sequence of asm function statements.
///
/// Any of the registers used as input/output to the syscall should be usable without issue.
/// Other registers should be saved/restored from memory, as LLVM doesn't know about their usage here.
#[derive(Clone)]
Expand Down
4 changes: 2 additions & 2 deletions riscv/src/small_field/code_gen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ use crate::CompilerOptions;

use crate::small_field::runtime::Runtime;

/// Translates a RISC-V program to POWDR ASM
/// with constraints that work for a field >24 bits.
/// Translates a RISC-V program to POWDR ASM with constraints that work for a field >24 bits.
///
/// Note that specific submachines have different field size requirements,
/// and the 24-bit requirement is for this machine only.
///
Expand Down
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 = "1.81"
channel = "nightly-2024-09-21"

0 comments on commit d4fb7a2

Please sign in to comment.