Coder Social home page Coder Social logo

cargo-lipo's Introduction

cargo lipo Build Status Crates.io

Provides a cargo lipo subcommand which automatically creates a universal library for use with your iOS application.

Usage

From anywhere you would usually run cargo you can now run cargo lipo or cargo lipo --release to create a universal library for ios, which can be found in $target/universal/{release|debug}/$lib_name.a.

Make sure you have a library target in your Cargo.toml with a crate type of staticlib:

[lib]
name = "..."
crate-type = ["staticlib"]

Installation

Install cargo lipo with cargo install cargo-lipo. cargo lipo can be build with rust 1.8 and later.

You also need a rust compiler which can compile for the iOS targets. If you use rustup all you should have to do is

rustup target add aarch64-apple-ios
rustup target add armv7-apple-ios
rustup target add armv7s-apple-ios
rustup target add i386-apple-ios
rustup target add x86_64-apple-ios

If you use a recent version of multirust

multirust add-target aarch64-apple-ios
multirust add-target armv7-apple-ios
multirust add-target armv7s-apple-ios
multirust add-target i386-apple-ios
multirust add-target x86_64-apple-ios

should work.

Note: both will only work on stable starting with the 1.8 release.

Alternatively you can build a rust compiler with iOS support yourself.

Troubleshooting

Cargo fails with error: can't find crate for `std` : Your rust compiler most likely does not support cross-compiling to iOS.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

cargo-lipo's People

Contributors

jarod avatar timnn avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.