Skip to content

Commit

Permalink
added so linker looks for dynamic lib in same folder when relese bina…
Browse files Browse the repository at this point in the history
…ry is run, and avoided cross compilation
  • Loading branch information
Crowdedlight committed Oct 25, 2023
1 parent 71541b6 commit 13fc8a3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
- name: Build
uses: actions-rs/cargo@v1
with:
use-cross: true
use-cross: false
command: build
args: --verbose --release --target ${{ matrix.target }}

Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ tokio-util = "0.7.9"
humansize = "2.0.0"

[target.'cfg(unix)']
rustflags = ["-C", "link-arg=-Wl,-rpath,$ORIGIN"]
rustflags = ["-C", "link-arg=-Wl,-rpath,$ORIGIN"]
4 changes: 4 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
fn main() {
#[cfg(target_os="linux")]
println!("cargo:rustc-link-arg=-Wl,-rpath,$ORIGIN");
}

0 comments on commit 13fc8a3

Please sign in to comment.