That’s an interesting error message that suggests there’s a version mismatch somewhere. As in, the rust library is referencing _kSCNetworkInterfaceTypeIrDA and that symbol isn’t available anymore. It makes sense because I don’t think any new hardware has been created with an IrDA network interface for many years.
I did some digging. The problem is in the system_configuration crate and not libp2p proper. I just pulled the latest rust-libp2p and ran cargo tree --all-features and I’m not seeing that crate in the dependency tree at all. In fact if you look at the error, it suggests that librust_lib.a is the culprit. I would guess that you just need to update your rust toolchain by running rustup update. If that doesn’t work then it might be that the standard library has an out-of-date dependency.
If you’d like further help, you might want to consider asking technical questions like this in the rust-libp2p technical discussion forums on Github: https://github.com/libp2p/rust-libp2p/discussions
Let me know if that fixed it. I’m curious because in my free time I’m working with rust-libp2p in iOS apps build with Swift. I’m using Mozilla’s UniFFI tool to generate the bindings. Here’s an example of a rust component that uses UniFFI to expose an API to Swift. This also shows how to use a build.rs file to generate the Swift bindings and some of the tricks you can do on the Rust side to have an async/multi-threaded Rust component callable from Swift. This doesn’t have any of the Swift code and it doesn’t use rust-libp2p directly but it wouldn’t be very hard to add it.
The problem is still in resolving, but inspired from you, I ran cargo tree --all-features with dependency libp2p = {version = "0.53.2", features = ["tcp"]} in cargo.toml, I found that libp2p-tcp depends on system-configuration v0.5.1, and I can reproduce the problem just depend on system-configuration v0.5.1 , while the latest system-configuration is ok