From 3b59df6931c5fab64f13252960e6773f868a3eaa Mon Sep 17 00:00:00 2001 From: David Hewitt Date: Wed, 5 Jun 2024 13:51:18 +0100 Subject: [PATCH] add MSRV of 1.73.0 (#114) --- .github/workflows/ci.yml | 21 +++++++++++++++++++++ Cargo.toml | 1 + crates/jiter/src/simd_aarch64.rs | 2 +- crates/jiter/src/string_decoder.rs | 2 +- 4 files changed, 24 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6447a9b..a416e0f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,12 +9,33 @@ on: pull_request: {} jobs: + resolve: + + runs-on: ubuntu-latest + outputs: + MSRV: ${{ steps.resolve-msrv.outputs.MSRV }} + steps: + - uses: actions/checkout@v4 + + - name: set up python + uses: actions/setup-python@v5 + with: + python-version: '3.12' + + - name: resolve MSRV + id: resolve-msrv + run: + echo MSRV=`python -c 'import tomllib; print(tomllib.load(open("Cargo.toml", "rb"))["workspace"]["package"]["rust-version"])'` >> $GITHUB_OUTPUT + test-linux: + needs: [resolve] name: test rust-${{ matrix.rust-version }} on linux strategy: fail-fast: false matrix: rust-version: [stable, nightly] + include: + - rust-version: ${{ needs.resolve.outputs.MSRV }} runs-on: ubuntu-latest diff --git a/Cargo.toml b/Cargo.toml index f393c39..fa6feaa 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,6 +15,7 @@ keywords = ["JSON", "parsing", "deserialization", "iter"] categories = ["parser-implementations", "parsing"] homepage = "https://github.com/pydantic/jiter/" repository = "https://github.com/pydantic/jiter/" +rust-version = "1.73.0" [profile.bench] debug = true diff --git a/crates/jiter/src/simd_aarch64.rs b/crates/jiter/src/simd_aarch64.rs index b4d08ff..59adb60 100644 --- a/crates/jiter/src/simd_aarch64.rs +++ b/crates/jiter/src/simd_aarch64.rs @@ -192,7 +192,7 @@ const CONTROL_16: SimdVecu8_16 = simd_const!([32u8; 16]); const ASCII_MAX_16: SimdVecu8_16 = simd_const!([127u8; 16]); #[inline(always)] -pub fn decode_string_chunk( +pub(crate) fn decode_string_chunk( data: &[u8], mut index: usize, mut ascii_only: bool, diff --git a/crates/jiter/src/string_decoder.rs b/crates/jiter/src/string_decoder.rs index 64a8fa8..c44338b 100644 --- a/crates/jiter/src/string_decoder.rs +++ b/crates/jiter/src/string_decoder.rs @@ -146,7 +146,7 @@ fn decode_to_tape<'t, 'j>( } #[inline(always)] -pub fn decode_chunk( +pub(crate) fn decode_chunk( data: &[u8], index: usize, ascii_only: bool,