diff --git a/.github/workflows/pr-tests.yml b/.github/workflows/pr-tests.yml index 5ff2db230b..b9a74538b5 100644 --- a/.github/workflows/pr-tests.yml +++ b/.github/workflows/pr-tests.yml @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/analysis/src/vm/batcher.rs b/analysis/src/vm/batcher.rs index 35a7f917b3..d781e9e1fb 100644 --- a/analysis/src/vm/batcher.rs +++ b/analysis/src/vm/batcher.rs @@ -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], } diff --git a/executor/src/constant_evaluator/mod.rs b/executor/src/constant_evaluator/mod.rs index 63399df812..2d15378765 100644 --- a/executor/src/constant_evaluator/mod.rs +++ b/executor/src/constant_evaluator/mod.rs @@ -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]`. diff --git a/riscv/src/continuations/bootloader.rs b/riscv/src/continuations/bootloader.rs index da553fa46e..4c8330ee54 100644 --- a/riscv/src/continuations/bootloader.rs +++ b/riscv/src/continuations/bootloader.rs @@ -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 diff --git a/riscv/src/runtime.rs b/riscv/src/runtime.rs index 5048652a26..a07990e5f3 100644 --- a/riscv/src/runtime.rs +++ b/riscv/src/runtime.rs @@ -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)] diff --git a/riscv/src/small_field/code_gen.rs b/riscv/src/small_field/code_gen.rs index d0b24cd206..80040539c6 100644 --- a/riscv/src/small_field/code_gen.rs +++ b/riscv/src/small_field/code_gen.rs @@ -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. /// diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 4cef0b738f..b6930c7af4 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,2 +1,2 @@ [toolchain] -channel = "1.81" +channel = "nightly-2024-09-21"