#build-script #strongly-typed #cargo #instructions #lib #link #warnings

build cargo-lib

Strongly-typed Cargo instructions for your build script

1 unstable release

0.1.0 Jan 16, 2023

#560 in Build Utils

MIT license

5KB
93 lines

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);
}

No runtime deps

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy