Skip to content

Commit

Permalink
chore:use protobuf-src to install
Browse files Browse the repository at this point in the history
  • Loading branch information
limuy2022 committed Jun 25, 2024
1 parent bd22c40 commit 5ba72e8
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 6 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/rust_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ jobs:
- uses: actions/checkout@v4
- name: Config Env
run: rustup install nightly && rustup default nightly && rustup component add rustfmt
- name: Install Protoc
uses: arduino/setup-protoc@v2
- name: Build
run: cd gdrust && cargo build --all
- name: Build Release
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/rust_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ jobs:
- uses: actions/checkout@v4
- name: Config Env
run: rustup install nightly && rustup default nightly
- name: Install Protoc
uses: arduino/setup-protoc@v2
- name: Build
run: cd gdrust && cargo build --all
- name: Build Release
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/rust_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ jobs:
- uses: actions/checkout@v4
- name: Config Env
run: rustup install nightly && rustup default nightly
- name: Install Protoc
uses: arduino/setup-protoc@v2
- name: Build
run: cd gdrust && cargo build --all
- name: Build Release
Expand Down
19 changes: 19 additions & 0 deletions gdrust/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions gdrust/proto/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ prost-types = { version = "0", optional = true }

[build-dependencies]
prost-build = "0"
protobuf-src = "2"
1 change: 1 addition & 0 deletions gdrust/proto/build.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
fn main() {
std::env::set_var("PROTOC", protobuf_src::protoc());
println!("cargo:rerun-if-changed=proto");
prost_build::Config::new()
.out_dir("src/proto")
Expand Down
2 changes: 2 additions & 0 deletions rust.gdextension
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ linux.debug.x86_64 = "res://gdrust/target/debug/libgdrust.so"
linux.release.x86_64 = "res://gdrust/target/release/libgdrust.so"
windows.debug.x86_64 = "res://gdrust/target/debug/gdrust.dll"
windows.release.x86_64 = "res://gdrust/target/release/gdrust.dll"
#windows.debug.x86_64 = "res://gdrust/target/x86_64-pc-windows-gnu/debug/gdrust.dll"
#windows.release.x86_64 = "res://gdrust/target/x86_64-pc-windows-gnu/release/gdrust.dll"
macos.debug = "res://gdrust/target/debug/libgdrust.dylib"
macos.release = "res://gdrust/target/release/libgdrust.dylib"
macos.debug.arm64 = "res://gdrust/target/debug/libgdrust.dylib"
Expand Down

0 comments on commit 5ba72e8

Please sign in to comment.