Skip to content

Commit

Permalink
cbindgen issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ssrlive committed Nov 18, 2024
1 parent 239ce8f commit 49da343
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/mips-unknown-linux-gnu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
shell: bash
run: |
./.github/workflows/mips-unknown-linux-gnu.sh
cbindgen -c cbindgen.toml -l C --cpp-compat -o ./overtls.h
cbindgen -c cbindgen.toml -o ./overtls.h
zip -j release/overtls-${{ matrix.target }}.zip target/${{ matrix.target }}/release/overtls-bin ./config.json ./overtls.h target/${{ matrix.target }}/release/libovertls.so
- name: Upload
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ jobs:
fi
fi
cbindgen -c cbindgen.toml -l C --cpp-compat -o ./overtls.h
cbindgen -c cbindgen.toml -o ./overtls.h
if [[ "${{ matrix.host_os }}" == "windows-latest" ]]; then
powershell Compress-Archive -Path target/${{ matrix.target }}/release/overtls-bin.exe, ./config.json, ./overtls.h, target/${{ matrix.target }}/release/overtls.dll -DestinationPath release/overtls-${{ matrix.target }}.zip
elif [[ "${{ matrix.host_os }}" == "macos-latest" ]]; then
Expand Down
2 changes: 1 addition & 1 deletion build-aarch64-apple-ios-debug.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ cargo build --target aarch64-apple-ios
echo "Generating includes..."
mkdir -p target/include/
rm -rf target/include/*
cbindgen --config cbindgen.toml -l C --cpp-compat -o target/include/overtls.h
cbindgen --config cbindgen.toml -o target/include/overtls.h
cat > target/include/overtls.modulemap <<EOF
framework module overtls {
umbrella header "overtls.h"
Expand Down
2 changes: 1 addition & 1 deletion build-aarch64-apple-ios.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,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 --cpp-compat -o target/include/overtls.h
cbindgen --config cbindgen.toml -o target/include/overtls.h
cat > target/include/overtls.modulemap <<EOF
framework module overtls {
umbrella header "overtls.h"
Expand Down
2 changes: 1 addition & 1 deletion build-android.sh
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ function build_android() {
cp $BASE/target/$target/${mode2}/lib${name}.a $android_libs/${target_dir}/lib${name}.a
done

cbindgen -c $BASE/cbindgen.toml -l C --cpp-compat -o $android_libs/$name.h
cbindgen -c $BASE/cbindgen.toml -o $android_libs/$name.h
}

function main() {
Expand Down
2 changes: 1 addition & 1 deletion build-apple.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,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 --cpp-compat -o target/include/overtls.h
cbindgen --config cbindgen.toml -o target/include/overtls.h
cat > target/include/overtls.modulemap <<EOF
framework module overtls {
umbrella header "overtls.h"
Expand Down
3 changes: 3 additions & 0 deletions cbindgen.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
language = "C"
cpp_compat = true

[export]
include = [
"over_tls_client_run",
Expand Down

0 comments on commit 49da343

Please sign in to comment.