mirror of
https://github.com/huggingface/xet-core.git
synced 2026-06-04 13:30:29 +08:00
bump xet-core to rust 1.86 (#230)
fix #225 . Fixes 225 by skipping ahead to a version where the issue is fixed.
This commit is contained in:
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
@@ -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
|
||||
|
||||
@@ -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}
|
||||
@@ -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 {
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user