cargo-lib 0.1.0

Strongly-typed Cargo instructions for your build script
Documentation
  • Coverage
  • 37.04%
    10 out of 27 items documented1 out of 13 items with examples
  • Size
  • Source code size: 4.43 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 2.02 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • MoAlyousef/cargo-lib
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • MoAlyousef

cargo-lib

Strongly-typed Cargo instructions for your build script.

Usage

Add cargo-lib as a build dependency to be able to use it in your build.rs file:

[build-dependencies]
cargo-lib = "0.1"

Then in your build script:

use cargo_lib as cl;

fn main() {
    cl::warning("Running the build script");
    cl::rerun_if_env_changed("CC");
    // you can also use `None` for the second argument
    cl::rustc_link_search("/some/path", cl::SearchLibKind::Framework);
    cl::rustc_link_lib("MyFramework", cl::LibKind::Framework);
    cl::rustc_link_lib("c++", None);
}