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

Update MSRV to 1.68.2 #596

Merged
merged 3 commits into from
Mar 20, 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
12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
rust: [1.60.0, stable, nightly]
rust: [1.68.2, stable, nightly]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{matrix.rust}}
Expand All @@ -24,7 +24,7 @@ jobs:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: rustup component add clippy
Expand All @@ -34,7 +34,7 @@ jobs:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: rustup component add rustfmt
Expand All @@ -44,7 +44,7 @@ jobs:
name: Check dependencies for security issues
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: cargo install --locked --version "~0.17" cargo-audit
Expand All @@ -56,7 +56,7 @@ jobs:
outputs:
license_changed: ${{ steps.license_diff.outputs.license_changed }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: cargo install --locked --version "~0.5" cargo-about
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/license_update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
steps:
# Clone the repository and check if THIRD_PARTY_LICENSES_RUST_CRATES.html
# is up-to-date.
- uses: actions/checkout@v3.5.0
- uses: actions/checkout@v4
with:
persist-credentials: false
- run: cargo install --locked --version "~0.5" cargo-about
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/summary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
if: ${{ github.repository == "aws/aws-nitro-enclaves-cli" }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: create summary
run: |
# Get list of open PRs through GH CLI formatting by columns
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "1.2.3"
authors = ["The AWS Nitro Enclaves Team <[email protected]>"]
edition = "2018"
license = "Apache-2.0"
rust-version = "1.60"
rust-version = "1.68"

[dependencies]
serde = { version = ">=1.0", features = ["derive"] }
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
![msrv]

[msrv]: https://img.shields.io/badge/MSRV-1.60.0-blue
[msrv]: https://img.shields.io/badge/MSRV-1.68.2-blue

## Nitro Enclaves Command Line Interface (Nitro CLI)

Expand Down
4 changes: 2 additions & 2 deletions SPECS/aws-nitro-enclaves-cli.spec
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ Source0: aws-nitro-enclaves-cli.tar.gz
Source1: nitro-cli-dependencies.tar.gz

BuildRequires: openssl-devel
BuildRequires: rust >= 1.60
BuildRequires: cargo >= 1.60
BuildRequires: rust >= 1.68
BuildRequires: cargo >= 1.68
BuildRequires: make
BuildRequires: llvm
BuildRequires: clang
Expand Down
2 changes: 1 addition & 1 deletion driver-bindings/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ version = "0.1.0"
authors = ["The AWS Nitro Enclaves Team <[email protected]>"]
edition = "2018"
description = "Rust FFI bindings to Linux Nitro Enclaves driver generated using bindgen."
rust-version = "1.60"
rust-version = "1.68"
2 changes: 1 addition & 1 deletion eif_loader/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "eif_loader"
version = "0.1.0"
authors = ["The AWS Nitro Enclaves Team <[email protected]>"]
edition = "2018"
rust-version = "1.60"
rust-version = "1.68"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand Down
2 changes: 1 addition & 1 deletion enclave_build/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "enclave_build"
version = "0.1.0"
authors = ["The AWS Nitro Enclaves Team <[email protected]>"]
edition = "2018"
rust-version = "1.60"
rust-version = "1.68"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand Down
2 changes: 1 addition & 1 deletion samples/command_executer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "command-executer"
version = "0.1.0"
authors = ["The AWS Nitro Enclaves Team <[email protected]>"]
edition = "2018"
rust-version = "1.60"
rust-version = "1.68"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand Down
9 changes: 2 additions & 7 deletions src/common/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,9 @@ const SOCKETS_DIR_PATH: &str = "/run/nitro_enclaves";
const BACKTRACE_VAR: &str = "BACKTRACE";

/// All possible errors which may occur.
#[derive(Debug, Clone, Copy, Hash, PartialEq)]
#[derive(Debug, Default, Clone, Copy, Hash, PartialEq)]
pub enum NitroCliErrorEnum {
#[default]
/// Unspecified error (should avoid using it thoughout the code).
UnspecifiedError = 0,
/// Error for handling missing arguments.
Expand Down Expand Up @@ -180,12 +181,6 @@ pub enum NitroCliErrorEnum {
EIFSignatureCheckerError,
}

impl Default for NitroCliErrorEnum {
fn default() -> NitroCliErrorEnum {
NitroCliErrorEnum::UnspecifiedError
}
}

impl Eq for NitroCliErrorEnum {}

/// The type of commands that can be sent to an enclave process.
Expand Down
1 change: 0 additions & 1 deletion src/enclave_proc/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ use std::collections::HashMap;
use std::io::Write;
use std::os::unix::io::AsRawFd;
use std::os::unix::net::UnixStream;
use std::string::ToString;
use std::sync::{Arc, Mutex};

use crate::common::{receive_from_stream, write_u64_le};
Expand Down
10 changes: 2 additions & 8 deletions src/enclave_proc/resource_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ use eif_loader::{enclave_ready, TIMEOUT_MINUTE_MS};
use libc::c_int;
use log::{debug, info};
use std::collections::BTreeMap;
use std::convert::{From, Into};
use std::fs::{File, OpenOptions};
use std::io::prelude::*;
use std::io::Error;
Expand Down Expand Up @@ -109,8 +108,9 @@ pub struct MemoryRegion {
}

/// The state an enclave may be in.
#[derive(Clone)]
#[derive(Clone, Default)]
pub enum EnclaveState {
#[default]
/// The enclave is not running (it's either not started or has been terminated).
Empty,
/// The enclave is running.
Expand Down Expand Up @@ -180,12 +180,6 @@ impl ToString for EnclaveState {
}
}

impl Default for EnclaveState {
fn default() -> Self {
EnclaveState::Empty
}
}

impl Default for EnclaveBuildInfo {
fn default() -> Self {
EnclaveBuildInfo::new(BTreeMap::new())
Expand Down
2 changes: 1 addition & 1 deletion tools/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ RUN cd /tmp/openssl_src/openssl-${OPENSSL_VERSION} && \
make install_sw

# Setup the right rust ver
ENV RUST_VERSION=1.60.0
ENV RUST_VERSION=1.68.2
RUN source $HOME/.cargo/env && \
ARCH=$(uname -m) && \
rustup toolchain install ${RUST_VERSION}-${ARCH}-unknown-linux-gnu && \
Expand Down
2 changes: 1 addition & 1 deletion vsock_proxy/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "vsock-proxy"
version = "0.1.0"
authors = ["The AWS Nitro Enclaves Team <[email protected]>"]
edition = "2018"
rust-version = "1.60"
rust-version = "1.68"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand Down