From 9441e52bb2fe3f820674cbc45938c7084a4f9a20 Mon Sep 17 00:00:00 2001 From: ssrlive <30760636+ssrlive@users.noreply.github.com> Date: Fri, 22 Nov 2024 11:15:29 +0800 Subject: [PATCH] config issues --- .cargo/config.toml | 6 ++++++ .github/workflows/publish-exe.yml | 2 +- build-aarch64-apple-ios-debug.sh | 3 +-- build-aarch64-apple-ios.sh | 3 +-- build-apple.sh | 2 +- cbindgen.toml | 3 +++ 6 files changed, 13 insertions(+), 6 deletions(-) create mode 100644 .cargo/config.toml diff --git a/.cargo/config.toml b/.cargo/config.toml new file mode 100644 index 0000000..e7f0866 --- /dev/null +++ b/.cargo/config.toml @@ -0,0 +1,6 @@ +[build] +# target = ["x86_64-unknown-linux-gnu"] +# target = ["aarch64-linux-android"] +# target = ["aarch64-apple-ios"] +# target = ["x86_64-pc-windows-msvc"] +# target = ["x86_64-apple-darwin"] diff --git a/.github/workflows/publish-exe.yml b/.github/workflows/publish-exe.yml index 5f4bc3d..b2058a5 100644 --- a/.github/workflows/publish-exe.yml +++ b/.github/workflows/publish-exe.yml @@ -63,7 +63,7 @@ jobs: else cargo build --all-features --release --target ${{ matrix.target }} fi - cbindgen --config cbindgen.toml -l C -o target/dns2socks-ffi.h + cbindgen --config cbindgen.toml -o target/dns2socks-ffi.h if [[ "${{ matrix.host_os }}" == "windows-latest" ]]; then powershell -Command "(Get-Item README.md).LastWriteTime = Get-Date" powershell Compress-Archive -Path target/${{ matrix.target }}/release/dns2socks.exe, README.md, target/dns2socks-ffi.h, target/${{ matrix.target }}/release/dns2socks.dll -DestinationPath mypubdir4/dns2socks-${{ matrix.target }}.zip diff --git a/build-aarch64-apple-ios-debug.sh b/build-aarch64-apple-ios-debug.sh index f204430..ffcf5e4 100755 --- a/build-aarch64-apple-ios-debug.sh +++ b/build-aarch64-apple-ios-debug.sh @@ -10,11 +10,10 @@ cargo build --target aarch64-apple-ios echo "Generating includes..." mkdir -p target/include/ rm -rf target/include/* -cbindgen --config cbindgen.toml -l C -o target/include/dns2socks.h +cbindgen --config cbindgen.toml -o target/include/dns2socks.h cat > target/include/dns2socks.modulemap < target/include/dns2socks.modulemap < target/include/dns2socks.modulemap <