From 2ce787eafa513a511ed6e6b359710e4cb2648f2e Mon Sep 17 00:00:00 2001 From: John Anderson Date: Sat, 4 May 2024 08:40:20 -0400 Subject: [PATCH] other macos build rectify apple warning --- .github/workflows/build.yaml | 7 ++++++- src/wrapper.cc | 2 +- src/wrapper.h | 4 ++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 01dc262..db953fd 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -39,12 +39,15 @@ jobs: include: - target: x86_64-pc-windows-gnu runs-on: windows-latest + simd-def: RAPIDJSON_SSE42 # - target: x86_64-unknown-linux-musl # runs-on: ubuntu-latest - target: x86_64-unknown-linux-gnu runs-on: ubuntu-latest - - target: x86_64-apple-darwin + simd-def: RAPIDJSON_SSE42 + - target: arm64e-apple-darwin runs-on: macos-latest + simd-def: RAPIDJSON_NEON runs-on: ${{ matrix.runs-on }} steps: @@ -55,6 +58,8 @@ jobs: - run: rustup default nightly - name: compile run: cargo build --release + env: + ${{ matrix.simd-def }}: true - name: upload bin to release if: ${{ runner.os != 'Windows' }} diff --git a/src/wrapper.cc b/src/wrapper.cc index 5fb2368..e2c56c9 100644 --- a/src/wrapper.cc +++ b/src/wrapper.cc @@ -6,7 +6,7 @@ #include "jch/src/rapid.rs.h" // turn on simd instructions -#define RAPIDJSON_SSE42 +// #define RAPIDJSON_SSE42 // TODO vendor or git-submodule this into the build tree #include "rapidjson/fwd.h" diff --git a/src/wrapper.h b/src/wrapper.h index 41487ac..4cccc9d 100644 --- a/src/wrapper.h +++ b/src/wrapper.h @@ -2,8 +2,8 @@ #include "rust/cxx.h" -class RustStream; -class RustHandler; +struct RustStream; +struct RustHandler; void parse(RustHandler & handler, RustStream & incoming); void from_file(rust::String filename, RustHandler & handler);