Skip to content

Commit 9441e52

Browse files
committed
config issues
1 parent ef4db4c commit 9441e52

File tree

6 files changed

+13
-6
lines changed

6 files changed

+13
-6
lines changed

.cargo/config.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[build]
2+
# target = ["x86_64-unknown-linux-gnu"]
3+
# target = ["aarch64-linux-android"]
4+
# target = ["aarch64-apple-ios"]
5+
# target = ["x86_64-pc-windows-msvc"]
6+
# target = ["x86_64-apple-darwin"]

.github/workflows/publish-exe.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ jobs:
6363
else
6464
cargo build --all-features --release --target ${{ matrix.target }}
6565
fi
66-
cbindgen --config cbindgen.toml -l C -o target/dns2socks-ffi.h
66+
cbindgen --config cbindgen.toml -o target/dns2socks-ffi.h
6767
if [[ "${{ matrix.host_os }}" == "windows-latest" ]]; then
6868
powershell -Command "(Get-Item README.md).LastWriteTime = Get-Date"
6969
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

build-aarch64-apple-ios-debug.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,10 @@ cargo build --target aarch64-apple-ios
1010
echo "Generating includes..."
1111
mkdir -p target/include/
1212
rm -rf target/include/*
13-
cbindgen --config cbindgen.toml -l C -o target/include/dns2socks.h
13+
cbindgen --config cbindgen.toml -o target/include/dns2socks.h
1414
cat > target/include/dns2socks.modulemap <<EOF
1515
framework module dns2socks {
1616
umbrella header "dns2socks.h"
17-
1817
export *
1918
module * { export * }
2019
}

build-aarch64-apple-ios.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,10 @@ cargo build --release --target aarch64-apple-ios
1010
echo "Generating includes..."
1111
mkdir -p target/include/
1212
rm -rf target/include/*
13-
cbindgen --config cbindgen.toml -l C -o target/include/dns2socks.h
13+
cbindgen --config cbindgen.toml -o target/include/dns2socks.h
1414
cat > target/include/dns2socks.modulemap <<EOF
1515
framework module dns2socks {
1616
umbrella header "dns2socks.h"
17-
1817
export *
1918
module * { export * }
2019
}

build-apple.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ cargo build --release --target aarch64-apple-ios-sim
2424
echo "Generating includes..."
2525
mkdir -p target/include/
2626
rm -rf target/include/*
27-
cbindgen --config cbindgen.toml -l C -o target/include/dns2socks.h
27+
cbindgen --config cbindgen.toml -o target/include/dns2socks.h
2828
cat > target/include/dns2socks.modulemap <<EOF
2929
framework module dns2socks {
3030
umbrella header "dns2socks.h"

cbindgen.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
language = "C"
2+
cpp_compat = true
3+
14
[export]
25
include = ["dns2socks_start", "dns2socks_stop", "dns2socks_set_log_callback"]
36
exclude = []

0 commit comments

Comments
 (0)