Creating the Rust project
First, follow the instructions on the Usage
cargo-xcode. The instructions that follow are quoted from there, but keep in mind
that it might have become outdated.
Ensure that these lines are present in your
[lib] crate-type = ["lib", "staticlib", "cdylib"]
libis required for non-library targets, such as tests and benchmarks
staticlibis required for iOS
cdylibfor all other platforms
Configure this to suit your needs. Then run this command in
This will generate a
$crate/$crate.xcodeproj that can be imported into other Xcode projects.
You only have to do this once per crate.
Don't open the project yet; we need to configure it through the parent projects first.