diff --git a/.github/workflows/publish-exe.yml b/.github/workflows/publish-exe.yml index 898c3ee..6b89324 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/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" diff --git a/build-aarch64-apple-ios-debug.sh b/build-aarch64-apple-ios-debug.sh index 538865b..9a740d4 100755 --- a/build-aarch64-apple-ios-debug.sh +++ b/build-aarch64-apple-ios-debug.sh @@ -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 < target/include/tun2proxy.modulemap < target/include/tun2proxy.modulemap <