Skip to content

fs-mistrust doesn't compile for iOS

Summary

When compiling fs-mistrust for iOS, it fails:

$ cargo build --target x86_64-apple-ios
   Compiling users v0.11.0
error[E0433]: failed to resolve: could not find `UserExtras` in `os`
  --> /Users/ligasser/.cargo/registry/src/github.com-1ecc6299db9ec823/users-0.11.0/src/base.rs:78:26
   |
78 |         let extras = os::UserExtras::default();
   |                          ^^^^^^^^^^ could not find `UserExtras` in `os`

...

Steps to reproduce:

  1. cd crates/fs-mistrust
  2. cargo build --target x86_64-apple-ios

What is the current bug behavior?

Fails to compile.

What is the expected behavior?

Compiles correctly.

Environment

  • Version: rust: 1.59.0 - arti: 0.5
  • Operating system: Mac OS X
  • Install method: use as a crate

Possible fixes:

I created a PR against rust-users here:

https://github.com/ogham/rust-users/pull/52

The simplest fix before it gets merged is to add the following to crates/fs-mistrust/Cargo.toml:

[patch.crates-io.users]
git = "https://github.com/c4dt/rust-users"
branch = "main"

If rust-users didn't merge and create a new version by August, I'll create a PR with this fix. But in the meantime somebody else might want to use it on iOS and might be happy to find this workaround. It works also if you add these lines to the end of your projects Cargo.toml.

Once the above PR is fixed, I propose to update the version in fs-mistrust/Cargo.toml and all other crates depending on it.

Edited by Linus Gasser