This commit is contained in:
ssrlive 2024-05-23 21:27:42 +08:00
parent e6360d83a7
commit d062b1b66a
5 changed files with 5 additions and 5 deletions

View file

@ -63,7 +63,7 @@ jobs:
else
cargo build --all-features --release --target ${{ matrix.target }}
fi
cbindgen --config cbindgen.toml -l C -o target/tun2proxy-ffi.h
cbindgen --config cbindgen.toml -l C --cpp-compat -o target/tun2proxy-ffi.h
if [[ "${{ matrix.host_os }}" == "windows-latest" ]]; then
powershell -Command "(Get-Item README.md).LastWriteTime = Get-Date"
powershell -Command "(Get-Item target/${{ matrix.target }}/release/wintun.dll).LastWriteTime = Get-Date"

View file

@ -10,7 +10,7 @@ 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/tun2proxy.h
cbindgen --config cbindgen.toml -l C --cpp-compat -o target/include/tun2proxy.h
cat > target/include/tun2proxy.modulemap <<EOF
framework module tun2proxy {
umbrella header "tun2proxy.h"

View file

@ -10,7 +10,7 @@ cargo build --release --target aarch64-apple-ios
echo "Generating includes..."
mkdir -p target/include/
rm -rf target/include/*
cbindgen --config cbindgen.toml -l C -o target/include/tun2proxy.h
cbindgen --config cbindgen.toml -l C --cpp-compat -o target/include/tun2proxy.h
cat > target/include/tun2proxy.modulemap <<EOF
framework module tun2proxy {
umbrella header "tun2proxy.h"

View file

@ -92,7 +92,7 @@ function build_android() {
cp $BASE/target/$target/${mode2}/lib${name}.so $android_libs/${target_dir}/lib${name}.so
done
cbindgen -c $BASE/cbindgen.toml -l C -o $android_libs/$name.h
cbindgen -c $BASE/cbindgen.toml -l C --cpp-compat -o $android_libs/$name.h
}
function main() {

View file

@ -24,7 +24,7 @@ cargo build --release --target aarch64-apple-ios-sim
echo "Generating includes..."
mkdir -p target/include/
rm -rf target/include/*
cbindgen --config cbindgen.toml -l C -o target/include/tun2proxy.h
cbindgen --config cbindgen.toml -l C --cpp-compat -o target/include/tun2proxy.h
cat > target/include/tun2proxy.modulemap <<EOF
framework module tun2proxy {
umbrella header "tun2proxy.h"