Skip to content

Commit

Permalink
GRPC Server Support
Browse files Browse the repository at this point in the history
- Deprecates old json-rpc system
- Add GRPC daemon over uds
  • Loading branch information
JettChenT committed Sep 8, 2024
1 parent 3fbb520 commit e4b0f16
Show file tree
Hide file tree
Showing 28 changed files with 1,105 additions and 195 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/build-apple.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Build Apple Apps
on:
push:
branches:
branches:
- main
pull_request:
branches:
Expand Down Expand Up @@ -39,6 +39,7 @@ jobs:
- aarch64-apple-darwin
env:
DEVELOPER_DIR: /Applications/Xcode_16.0.app/Contents/Developer
PROTOC_VERSION: 3.25.1
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -54,6 +55,10 @@ jobs:
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ join(matrix.rust-targets, ', ') }}
- name: Install protoc
uses: taiki-e/install-action@v2
with:
tool: protoc@${{ env.PROTOC_VERSION }}
- name: Build
id: build
uses: ./.github/actions/build-for-testing
Expand Down Expand Up @@ -82,4 +87,4 @@ jobs:
destination: ${{ matrix.destination }}
test-plan: ${{ matrix.xcode-ui-test }}
artifact-prefix: ui-tests-${{ matrix.sdk-name }}
check-name: Xcode UI Tests (${{ matrix.platform }})
check-name: Xcode UI Tests (${{ matrix.platform }})
7 changes: 6 additions & 1 deletion .github/workflows/build-rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ jobs:
CARGO_INCREMENTAL: 0
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
RUST_BACKTRACE: short
PROTOC_VERSION: 3.25.1
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -64,6 +65,10 @@ jobs:
if: matrix.os == 'windows-2022'
shell: bash
run: echo "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\Llvm\x64\bin" >> $GITHUB_PATH
- name: Install protoc
uses: taiki-e/install-action@v2
with:
tool: protoc@${{ env.PROTOC_VERSION }}
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
Expand All @@ -77,4 +82,4 @@ jobs:
run: cargo build --verbose --workspace --all-features --target ${{ join(matrix.targets, ' --target ') }} --target ${{ join(matrix.test-targets, ' --target ') }}
- name: Test
shell: bash
run: cargo test --verbose --workspace --all-features --target ${{ join(matrix.test-targets, ' --target ') }}
run: cargo test --verbose --workspace --all-features --target ${{ join(matrix.test-targets, ' --target ') }}
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,8 @@ target/

.DS_STORE
.idea/

tmp/

*.db
*.sock
9 changes: 8 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,12 @@
"rust-analyzer.inlayHints.typeHints.enable": false,
"rust-analyzer.linkedProjects": [
"./burrow/Cargo.toml"
]
],
"[yaml]": {
"editor.insertSpaces": true,
"editor.tabSize": 2,
"editor.autoIndent": "advanced",
"diffEditor.ignoreTrimWhitespace": false,
"editor.formatOnSave": false
}
}
2 changes: 2 additions & 0 deletions Apple/NetworkExtension/libburrow/build-rust.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ else
CARGO_PATH="$(dirname $(readlink -f $(which cargo))):/usr/bin"
fi

CARGO_PATH="$(dirname $(readlink -f $(which protoc))):$CARGO_PATH"

# Run cargo without the various environment variables set by Xcode.
# Those variables can confuse cargo and the build scripts it runs.
env -i PATH="$CARGO_PATH" CARGO_TARGET_DIR="${CONFIGURATION_TEMP_DIR}/target" IPHONEOS_DEPLOYMENT_TARGET="$IPHONEOS_DEPLOYMENT_TARGET" MACOSX_DEPLOYMENT_TARGET="$MACOSX_DEPLOYMENT_TARGET" cargo build "${CARGO_ARGS[@]}"
Expand Down
Loading

0 comments on commit e4b0f16

Please sign in to comment.