cc-args

crate.io rustdocs

tl;dr

rust bindgen::Builder::merge_cc_args(&self, &pkg_config::Library)

This crate exports CcArgs and MergeCcArgs.

CcArgs

It provides linkpaths, includepaths, frameworkpaths, frameworks, libs, ldargs and defines.

MergeCcArgs

It provides the method merge_cc_args that accept a CcArgs implementation.

Features

Example

build.rs ```rust use std::path::PathBuf;

use ccargs::{bindgen, pkgconfig, MergeCcArgs};

fn main() { let outpath = PathBuf::from(std::env::var("OUTDIR").unwrap()); println!("cargo:rerun-if-changed=wrapper.h"); bindgen::Builder::default() .mergeccargs(&pkgconfig::probelibrary("libzstd").unwrap()) .header("wrapper.h") .parsecallbacks(Box::new(bindgen::CargoCallbacks)) .generate() .unwrap() .writetofile(outpath.join("bindings.rs")) .unwrap(); } ```