Cant install a library from pod in ios which internally uses rust

I am trying to install libsignal-client through the pod. It uses a rust encryption library internally.

Error is given compiling libsignal-ffi:

 Compiling libsignal-ffi v0.9.4 (/Users/tanmoy/Library/Caches/CocoaPods/Pods/External/SignalClient/94c18a0d31671033b99c08bafb98f6e4/rust/bridge/ffi)
    Finished release [optimized + debuginfo] target(s) in 2m 38s
warning: Building using xargo to support tier 3 target aarch64-apple-ios-sim.
error: `rust-src` component not found. Run `rustup component add rust-src`.
note: run with `RUST_BACKTRACE=1` for a backtrace

Based on the source repository,

I used the exact same rust-src

export XARGO_RUST_SRC=/Users/tanmoy/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/src/rust/library

This time another error building std.

 Compiling std v0.0.0 (/Users/tanmoy/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/src/rust/library/std)
error[E0557]: feature has been removed
   --> /Users/tanmoy/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/src/rust/library/core/src/


error: aborting due to 325 previous errors; 7 warnings emitted

Some errors have detailed explanations: E0277, E0307, E0522, E0557, E0658.
For more information about an error, try `rustc --explain E0277`.
error: could not compile `core`

Been trying different solutions but none seems to work. Any insight?

Does rustup toolchain add rust-src work?

rustup toolchain add rust-src

this command generating,
**error:** invalid toolchain name: 'rust-src' output.

Added, rustup component add rust-src still same error.

Right, it needs to be rustup component add rust-src (singular component and not toolchain or plural components). My bad.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.