diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fb338856..e1b8afe7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,8 +30,8 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v4 - - name: Install Rust 1.79 - uses: dtolnay/rust-toolchain@1.79.0 + - name: Install Rust 1.86 + uses: dtolnay/rust-toolchain@1.86.0 with: components: clippy - name: Lint diff --git a/cas_client/Dockerfile b/cas_client/Dockerfile deleted file mode 100644 index a623d92b..00000000 --- a/cas_client/Dockerfile +++ /dev/null @@ -1,37 +0,0 @@ -FROM rust:1.58 as builder - -RUN USER=root rustup component add rustfmt -RUN USER=root cargo new --bin cas_client - -WORKDIR ./cas_client -ADD ./utils ../utils -COPY ./cas_client/Cargo.toml ./Cargo.toml -RUN cargo build --release -RUN rm src/*.rs - -COPY ./cas_client . -RUN rm ./target/release/deps/cas_client* - -RUN cargo build --release - -FROM debian:buster-slim -ARG APP=/usr/src/app - -RUN apt-get update \ - && apt-get install -y ca-certificates tzdata \ - && rm -rf /var/lib/apt/lists/* - -ENV TZ=Etc/UTC \ - APP_USER=appuser - -RUN groupadd $APP_USER \ - && useradd -g $APP_USER $APP_USER \ - && mkdir -p ${APP} - -COPY --from=builder /cas_client/target/release/cas_client ${APP}/cas_client -RUN mkdir ${APP}/config - -RUN chown -R $APP_USER:$APP_USER ${APP} - -USER $APP_USER -WORKDIR ${APP} diff --git a/merklehash/src/data_hash.rs b/merklehash/src/data_hash.rs index b874ae89..53359946 100644 --- a/merklehash/src/data_hash.rs +++ b/merklehash/src/data_hash.rs @@ -416,7 +416,7 @@ pub mod hex { // Visitor for deserialization struct HexVisitor; - impl<'de> Visitor<'de> for HexVisitor { + impl Visitor<'_> for HexVisitor { type Value = DataHash; fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { diff --git a/xet_threadpool/src/threadpool.rs b/xet_threadpool/src/threadpool.rs index 9381d803..5a205c73 100644 --- a/xet_threadpool/src/threadpool.rs +++ b/xet_threadpool/src/threadpool.rs @@ -9,6 +9,11 @@ use tracing::debug; use crate::errors::MultithreadedRuntimeError; +const THREADPOOL_NUM_WORKER_THREADS: usize = 4; // 4 active threads +const THREADPOOL_THREAD_ID_PREFIX: &str = "hf-xet"; // thread names will be hf-xet-0, hf-xet-1, etc. +const THREADPOOL_STACK_SIZE: usize = 8_000_000; // 8MB stack size +const THREADPOOL_MAX_BLOCKING_THREADS: usize = 100; // max 100 threads can block IO + /// This module provides a simple wrapper around Tokio's runtime to create a thread pool /// with some default settings. It is intended to be used as a singleton thread pool for /// the entire application. @@ -56,11 +61,6 @@ use crate::errors::MultithreadedRuntimeError; /// /// - `new_threadpool`: Creates a new Tokio runtime with the specified settings. -const THREADPOOL_NUM_WORKER_THREADS: usize = 4; // 4 active threads -const THREADPOOL_THREAD_ID_PREFIX: &str = "hf-xet"; // thread names will be hf-xet-0, hf-xet-1, etc. -const THREADPOOL_STACK_SIZE: usize = 8_000_000; // 8MB stack size -const THREADPOOL_MAX_BLOCKING_THREADS: usize = 100; // max 100 threads can block IO - #[derive(Debug)] pub struct ThreadPool { // This has to allow for exclusive access to enable shutdown when