diff --git a/.cargo/config.toml b/.cargo/config.toml index 4c21fff..0bdbb00 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -2,3 +2,8 @@ # when using osx, we need to link against some golang libraries, it did just work with this missing flags # from: https://github.com/golang/go/issues/42459 rustflags = ["-C", "link-args=-framework CoreFoundation -framework Security -framework CoreServices -lresolv"] + +[target.x86_64-unknown-linux-gnu] +# wasmer v2 references __rust_probestack which lld (Rust's default on Linux) can't resolve. +# Force GNU bfd linker to avoid the undefined symbol error. +rustflags = ["-C", "link-arg=-fuse-ld=bfd"] diff --git a/waku-sys/build.rs b/waku-sys/build.rs index 9a1a109..d17d9aa 100644 --- a/waku-sys/build.rs +++ b/waku-sys/build.rs @@ -115,7 +115,11 @@ fn generate_bindgen_code(project_dir: &Path) { println!("cargo:rustc-link-lib=dl"); println!("cargo:rustc-link-lib=m"); // nim-lsquic embeds BoringSSL (C++) — requires C++ runtime - let cpp_lib = if cfg!(target_os = "macos") { "c++" } else { "stdc++" }; + let cpp_lib = if cfg!(target_os = "macos") { + "c++" + } else { + "stdc++" + }; println!("cargo:rustc-link-lib={}", cpp_lib); println!(